Use input-selector with filesrc elements on input

Sebastian Dröge sebastian at centricular.com
Wed Aug 31 06:57:06 UTC 2016


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.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160831/2c189770/attachment.sig>


More information about the gstreamer-devel mailing list