Gstreamer don't stream h264

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

Gstreamer don't stream h264

2,044 Views
volodymyrmakhit
Contributor II

Hi all!

I try to stream h264.

i.MX:

gst-launch -v v4l2src device=/dev/video1 ! 'video/x-raw-yuv,width=640,height=480,framerate=30/1' ! ffmpegcolorspace ! vpuenc codec=6 ! rtph264pay ! tcpserversink host=192.168.0.2 port=500

PC:

gst-launch-1.0 -v tcpclientsrc host=192.168.0.2 port=500 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false

Got error:

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

ERROR: from element /GstPipeline:pipeline0/GstGDPDepay:gdpdepay0: Could not decode stream.

Additional debug info:

gstgdpdepay.c(396): gst_gdp_depay_chain (): /GstPipeline:pipeline0/GstGDPDepay:gdpdepay0:

GDP packet header does not validate

ERROR: pipeline doesn't want to preroll.

Setting pipeline to NULL ...

Freeing pipeline ...

Any suggestion please?

Thanks!

Labels (1)
0 Kudos
4 Replies

1,105 Views
volodymyrmakhit
Contributor II

I captured video to file and it play by gplay.

But VLC could play it.

Video recorded by command:

gst-launch v4l2src device=/dev/video1 num-buffers=1000 ! 'video/x-raw-yuv,width=640,height=480,framerate=30/1' ! ffmpegcolorspace ! vpuenc codec=6 ! mp4mux ! filesink location=/home/root/h264.mp4

VLC error:

[0x7f3320007b78] main demux debug: looking for demux module matching "mp4": 63 candidates

[0x7f3320c0e878] mp4 stream debug: found an empty box (null size)

[0x7f3320c0e878] mp4 stream debug: found an empty box (null size)

[0x7f3320c0e878] mp4 stream debug: dumping root Box "root"

[0x7f3320c0e878] mp4 stream debug: |  + ftyp size 32

[0x7f3320c0e878] mp4 stream debug: |  + free size 8

[0x7f3320c0e878] mp4 stream debug: |  + mdat size 2905871

[0x7f3320007b78] mp4 demux debug: unrecognized major file specification (mp42).

[0x7f3320007b78] mp4 demux error: MP4 plugin discarded (no moov,foov,moof box)

[0x7f3320007b78] ts demux debug: TS module discarded (lost sync)

[0x7f3320007b78] mod demux debug: MOD validation failed (ext=mp4)

0 Kudos

1,105 Views
Yuri
NXP Employee
NXP Employee

It is needed  to wrap the coded data of the i.MX6 VPU to a proper (say, MP4) file format.

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,105 Views
volodymyrmakhit
Contributor II

Yuri, it is not clear for me. I thought that mp4mux should be enough for wrap coded data. What I should add to pipeline? 

0 Kudos

1,105 Views
Yuri
NXP Employee
NXP Employee

You may try adding a parser before mp4mux :  h264parse ! mp4mux

~Yuri.

0 Kudos