webcam streaming (h.264) using imx6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

webcam streaming (h.264) using imx6

4,218 Views
alokkumar
Contributor III

Hi,

I am using webcam 720P from Logitech and I tried successfully mjpeg streaming on iMX6. Below are the commands if it is useful for some one.

iMX6 Server:

/usr/bin/gst-launch-0.10 v4l2src device=/dev/video2 ! 'video/x-raw-yuv,framerate=(fraction)30/1' ! ffmpegcolorspace ! vpuenc codec=12 ! multipartmux ! tcpserversink host=10.10.4.117 port=5000

#default resolution of this webcam is 1280x960

iMX6 Client:

gst-launch tcpclientsrc host=10.10.4.117 port=5000 ! queue ! jpegdec ! autovideosink


The above works fine.

I wanted to do the same with h.264 encoded stream instead of mjpeg, but I could not get to work. pipe says it is playing, but I could not decode it either by using vlc or iMX6 as client.

Any experts throw any idea on following.

1. how to do h.264 tcp streaming (instead of above it was mjpeg) ?

2. For mjpeg I could not use vpudec (actually it was very jerky with vpudec), any ideas why ?

appreciate if some experts share some pointers.

6 Replies

1,852 Views
ChucoChe
NXP Employee
NXP Employee

Hi,

For question 2 when you play the file whit a pipeline (without media server) using the vpudec do you see the issue?

MJPEG should work on Mx6 according with the feature matrix.

I remember back in Mx5 only Baseline DCT MJPEG decoding was supported. I'm not support if that is the case with Mx6.

Is it possible for you to provide a file to test?

If you open the file with hex mode you can find the kind of MJPEG.

HexMarkerMarker NameDescription
0x FFC0SOF0Start of Frame 0Baseline DCT
0x FFC1SOF1Start of Frame 1Extended Sequential DCT
0x FFC2SOF2Start of Frame 2Progressive DCT
0x FFC3SOF3Start of Frame 3Lossless (sequential)

Michel

0 Kudos
Reply

1,852 Views
karina_valencia
NXP Apps Support
NXP Apps Support

No  update from  customer

0 Kudos
Reply

1,852 Views
alokkumar
Contributor III

I could not build up a vpudec pipeline which works with mjpeg files.

This file is captured using step 1) filesink.

I have file with .mjpeg extension, but I dont know how to send it to you. uploading youtube did not work.

0 Kudos
Reply

1,852 Views
ChucoChe
NXP Employee
NXP Employee

Send it to my email b17952@freescale.com. Did you verify the generated file is Baseline DCT?

Michel

0 Kudos
Reply

1,852 Views
LeonardoSandova
Specialist I

Hi Alok,

in case you need live-streaming, here is a document showing a pipeline.

GStreamer Live Streaming

The example uses another bin element (rtp). Try to adapt it to your needs and let me know the result. I believe the above link answers your question 1, but I am not sure about 2. Both has been queried internally.

Leo

1,852 Views
alokkumar
Contributor III

Thank you Leo, appreciate your response.

I will give a try.

0 Kudos
Reply