Seamlessly change video stream while playing

Christophe Dongieux christophe.dongieux at
Fri Jun 24 01:17:54 PDT 2011


I'm currently developing a source plugin that gets ISO MP4 streams from a
server. These streams are the same video, but with different
bitrate/resolution, hence different quality.
I need to be able to change the stream quality, seamlessly, while the
gstreamer pipeline is playing.
The typical pipeline looks like this:
              source ! qtdemux ! ffdec_h264 ! ffmpegcolorspace ! xvimagesink

I already tried 2 solutions for the change to take effect, but with no luck:
1/ send the new MP4 file header (ftyp+moov boxes), then the movie fragments
(moof+mdat boxes). The problem is that qtdemux thinks it's a new video
stream, hence creates a new source video pad.
2/ don't send the new MP4 header, simply send the new movie fragments. Nor
qtdemux or ffdec_h264 notice the change, ffdec_h264 produces decoding
errors, the output video is scrambled.

Do you have any idea how I can achieve this?

Christophe Dongieux.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list