This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Too fast streaming h.264 encoded video over UDP

Hi,

I'm trying to stream a h264 video using updsink element (using EZSDK 5.03.01.15)

The video is 2 minutes long, it was created it by encoding videotestsrc. I was able to play the video on EVM's LCD, it took exactly 2 minutes.

When it's redirected to udpsink, it looks that all frames are sent at once and  gst-launch exits after a while:

>gst-launch -v filesrc location=videotest.264 ! 'video/x-h264,width=800,height=480,framerate=30/1' ! queue ! h264parse ! gstperf ! rtph264pay ! udpsink 192.168.0.1 port=5000

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, width=(int)800, height=(int)480, framerate=(fraction)30/1, framed=(boolean)false
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, width=(int)800, height=(int)480, framerate=(fraction)30/1, framed=(boolean)false
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, width=(int)800, height=(int)480, framerate=(fraction)30/1, framed=(boolean)false
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, width=(int)800, height=(int)480, framerate=(fraction)30/1, framed=(boolean)false
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, width=(int)800, height=(int)480, framerate=(fraction)30/1, framed=(boolean)false, stream-format=(string)byte-stream, alignment=(string)au
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = video/x-h264, width=(int)800, height=(int)480, framerate=(fraction)30/1, framed=(boolean)false, stream-format=(string)byte-stream, alignment=(string)au
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = video/x-h264, width=(int)800, height=(int)480, framerate=(fraction)30/1, framed=(boolean)false, stream-format=(string)byte-stream, alignment=(string)au
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, width=(int)800, height=(int)480, framerate=(fraction)30/1, framed=(boolean)false, stream-format=(string)byte-stream, alignment=(string)au
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"J0KAKouVAZB7IAA\\=\\,KN4BriAA\", payload=(int)96, ssrc=(uint)1846700495, clock-base=(uint)1497008918, seqnum-base=(uint)25245
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 1497008918
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 25245
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"J0KAKouVAZB7IAA\\=\\,KN4BriAA\", payload=(int)96, ssrc=(uint)1846700495, clock-base=(uint)1497008918, seqnum-base=(uint)25245
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
frames: 1957    current: 1955.41         average: 1955.41       arm-load: 3
Got EOS from element "pipeline0".
Execution ended after 1777736451 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/Gstperf:perf0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...

Is there a way to slow down the streaming, so that the frames are outputted in synch? Do I miss an element in my pipeline?

  • Hi,

    Try to enable sync in udpsink. I might help.

    Regards,

    Jun

  • Hello,

    thanks for the suggestion. Unfortunatelly, from what I can see, sync in enabled by default:

    > gst-inspect udpsink | grep -A2 sync
      sync                : Sync on the clock
                            flags: readable, writable
                            Boolean. Default: true Current: true
    --
      async               : Go asynchronously to PAUSED
                            flags: readable, writable
                            Boolean. Default: true Current: true

    Any ideas?