playbin2 with MJPEG streams over http: long delay before playback starts, and buffering delays on each frame

Hoyt, David hoyt6 at llnl.gov
Wed Jun 29 17:16:29 PDT 2011


> 1)  Playback doesn't start for about 35 seconds.  During this time, frames are received but I see "Buffering... 0%".  After about 30 seconds, the output window appears and all the frames that piled up during this time are displayed very quickly.

I’ve dealt with this exact same problem. The problem is that one of the elements is waiting to see if another pad will need to be created in case another type of stream is muxed into the multipart stream. That is, some cameras will intermix audio and video in the same stream so you'll have some parts in the multipart stream as the jpeg image and others that are audio. The trick is to emit the no-more-pads signal as soon as possible. There's an enhancement for this described here: https://bugzilla.gnome.org/show_bug.cgi?id=616686

To use that, you'll need to find when playbin2 adds a uridecodebin and then find when the uridecodebin adds a decodebin and then locate the multipartdemux in the decodebin and set the property.

> 2)  Once the output window is created and playback starts,  playback pauses and buffers for about 3s between each set of frames... making the real-time experience basically unusable.   It will pause and buffer for 3s, and then quickly show all the frames received during those 3s, and then pause and buffer again [repeat].

I believe setting the single-stream=true property on multipartdemux using the method I described above will resolve this as well.


More information about the gstreamer-devel mailing list