multitrack video

Tim-Philipp Müller t.i.m at zen.co.uk
Thu Jul 25 04:07:25 PDT 2013


On Thu, 2013-07-25 at 09:50 +0200, Miroslav Míšek wrote:

> 
> I added it after line:
> self.player.set_state(gst.STATE_PLAYING)

You need to wait until the pipeline has 'prerolled', that is playbin has
read data already.

You can do that by waiting for an ASYNC_DONE message on the pipeline's
(playbin's) GstBus, or do a _get_state() with a timeout after
set_state(). If it returns SUCCESS, it's prerolled.

Cheers
- Tim

> On Thu, Jul 25, 2013 at 9:14 AM, Ian Davidson
> <id012c3076 at blueyonder.co.uk> wrote:
>         Hi,
>         
>         Where did you add your code?
>         
>         Did you allow the software to open the media file before you
>         examined the property?
>         
>         Regards
>         
>         
>         On 24/07/2013 23:55, Miroslav Míšek wrote:
>         
>         > Hi, 
>         > 
>         > 
>         > thanks for replay.
>         > I tried that and it does not work for me unfortunatelly.
>         > num = self.player.get_property('n-audio')
>         > 
>         > return 0, even if avi file has 2 audio streams.
>         > 
>         > 
>         > I just added this to Example 2.3
>         > of http://pygstdocs.berlios.de/pygst-tutorial/playbin.html
>         > 
>         > 
>         > Any idea what I am doing wrong please?
>         > 
>         > 
>         > Thanks,
>         > Miroslav Misek
>         > 
>         > 
>         > On Tue, Jul 23, 2013 at 2:50 PM, Tim-Philipp Müller
>         > <t.i.m at zen.co.uk> wrote:
>         >         On Tue, 2013-07-23 at 13:14 +0200, Miroslav Míšek
>         >         wrote:
>         >         
>         >         Hi,
>         >         
>         >         > I am new to gstreamer, I would like to write
>         >         simple vidoe player in
>         >         > it, but I found one problem. I have movie file
>         >         (avi) with more than
>         >         > one audio track. Is it possible somehow to get
>         >         list of these audio
>         >         > tracks and choose one of them for output?
>         >         
>         >         
>         >         Yes, playbin (playbin2 in 0.10) has properties for
>         >         that, like "n-audio",
>         >         and "current-audio", and you can get more
>         >         information about the tracks
>         >         via the action signals, see gst-inspect-1.0 playbin.
>         >         
>         >         Cheers
>         >          -Tim
>         >         
>         >         
>         >         _______________________________________________
>         >         gstreamer-devel mailing list
>         >         gstreamer-devel at lists.freedesktop.org
>         >         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>         > 
>         > 
>         > 
>         > 
>         > _______________________________________________
>         > gstreamer-devel mailing list
>         > gstreamer-devel at lists.freedesktop.org
>         > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>         
>         
>         -- 
>         --
>         Ian Davidson
>         239 Streetsbrook Road, Solihull, West Midlands, B91 1HE
>         --
>         Facts used in this message may or may not reflect an
>         underlying objective reality. Facts are supplied for personal
>         use only.
>         Recipients quoting supplied information do so at their own
>         risk. Facts supplied may vary in whole or part from widely
>         accepted standards.
>         While painstakingly researched, facts may or may not be
>         indicative of actually occurring events or natural phenomena.
>         The author accepts no responsibility for personal loss or
>         injury resulting from memorisation and subsequent use. 
>         
>         _______________________________________________
>         gstreamer-devel mailing list
>         gstreamer-devel at lists.freedesktop.org
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>         
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list