0

I would like to stream the webcam data over UDP in mpegts format.

At Sending End::

gst-launch-1.0 -v v4l2src device=/dev/video1 ! videoconvert ! video/x-raw,width=720,height=576,framerate=25/1,format=I420 ! videoparse width=720 height=576 framerate=25/1 ! x264enc bitrate=2048 ref=4 key-int-max=20 byte-stream=true tune=zerolatency speed-preset=3 sliced-threads=true threads=4  ! video/x-h264,stream-format=byte-stream,profile=main ! queue ! mpegtsmux ! rtpmp2tpay ! udpsink host=192.168.2.149 port=8888 sync=true async=false qos=true qos-dscp=46

At Receiving End::

GST_DEBUG=4 gst-launch-1.0 -v udpsrc port=8888 caps=application/x-rtp,media=video,encoding-name=MP2T buffer-size=524288 ! rtpmp2tdepay ! tsdemux name=demuxer  demuxer. !  queue max-size-buffers=0 max-size-time=0 ! h264parse ! avdec_h264 ! videoconvert ! xvimagesink qos=true sync=true async=false 

For few seconds, video is coming good, but after that it is getting disturbed, and not at all coming, struck at single frame.

And when i used GST_DEBUG=4, i observed below error:

0:00.000000000, position 0:00:10.397114020, duration 99:99:99.999999999
0:00:10.396195300   536 0x7f1328001300 ERROR                  libav :0:: cabac decode of qscale diff failed at 4 26
0:00:10.396212221   536 0x7f1328001300 ERROR                  libav :0:: error while decoding MB 4 26, bytestream -1
0:00:10.396255836   536       0xe03320 INFO                   libav :0:: concealing 1215 DC, 1215 AC, 1215 MV errors

But, if I stream the Data to localhost, then it is perfectly working.

After setting cabac=false on x264enc,

0:00.000000000, position 0:00:14.796602703, duration 99:99:99.999999999
0:00:15.020440888 15449 0x7f69dc4fe2c0 ERROR                  libav :0:: out of range intra chroma pred mode at 18 14
0:00:15.020464168 15449 0x7f69dc4fe2c0 ERROR                  libav :0:: error while decoding MB 18 14
0:00:15.020694828 15449      0x2513320 INFO                   libav :0:: concealing 1215 DC, 1215 AC, 1215 MV errors

What is the problem here? is this because of network bandwidth or any other else? And how to solve this problem?

0 Answers0