Use input-selector with filesrc elements on input

Petr ptahal at gmail.com
Thu Sep 1 07:48:04 UTC 2016


Sebastian Dröge-3 wrote
> On Tue, 2016-08-30 at 05:33 -0700, Petr wrote:
>> Hi, 
>> I would like to be able (in a program written in C) to switch between two
>> different MP4 videos 
>> using input-selector and send the output it to RTMP. Switching would be
>> triggered by a user action. 
>> 
>> I can start the first video, I can see it, but after an attempt to switch
>> to
>> the other source the stream
>> ends (looks like it reached the end of the file). I am trying to use just
>> "active-pad" property to switch.
>> Using this method I can select the source before the start but not after
>> playing is started.
>> 
>> I found some old posts (2010), people were not able to make it working
>> (using Gstreamer 0.10),
>> for instance 
>> http://gstreamer-devel.966125.n4.nabble.com/Switching-two-video-sources-with-input-selector-td2966941.html#a2969452
>> 
>> I am using GStreamer 1.8.2. Can anybody confirm/regret it should work? Or
>> maybe even give some direction how to achieve the described scenario?
> 
> You need to demux the MP4, and parse the audio/video stream before the
> input-selector. Then it should work, assuming the configuration of both
> streams is compatible and compatible with the server.
> 
> As RTMP is very picky about such details, you might only have luck when
> re-encoding the stream.

Thank you for the advice, it solved the problem of output stream ending
after switching.

Just for the record (for people reading archives), the whole chain
(gstreamer based program sending RTMP to Wowza and watching it by VLC) still
does not work well, the output stream is blocked for a few second after
switching, sometimes it looks like the key frame of the new source
is not used, maybe there is some problem with timing. I need to examine it
more in detail. 

P.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Use-input-selector-with-filesrc-elements-on-input-tp4679289p4679340.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list