[gst-devel] Problem with GnlFileSource media_start property

Raaf monraaf at gmail.com
Fri Jun 26 21:12:30 CEST 2009


> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 26 Jun 2009 07:40:09 +0200
> From: Edward Hervey <bilboed at gmail.com>
> Subject: Re: [gst-devel] Problem with GnlFileSource media_start
>        property
> To: Discussion of the development of GStreamer
>        <gstreamer-devel at lists.sourceforge.net>
> Message-ID: <1245994809.2620.1.camel at putamadre>
> Content-Type: text/plain
>
> Hi,
>
> On Thu, 2009-06-25 at 23:50 +0200, Raaf wrote:
>> I'm having trouble with the GnlFileSource media_start property, with
>> audio it all seems to work fine but with video I don't get it to work.
>> For example the code below works fine as long as the media_start
>> property is 0, any other value and I get erratic 'slide show' like
>> playback.  Is there anything I'm missing here?
>
>  The code below looks correct. What kind of files are you using
> (container/codec) ? What version of gnonlin and gstreamer ? Do you see
> any warnings if you run it with GST_DEBUG=2 ?
>
>    Edward
>

Hi, I've tested it with several avi and flv files, with mpeg4 and h264
codecs. Gnonlin and GStreamer are from the gstreamer-developers PPA
repository


https://launchpad.net/~gstreamer-developers/+archive/ppa

Currently installed : gnonlin 0.10.11  gstreamer 0.10.23

With GST_DEBUG=2, the additional warnings I get when media_start
property is not 0 are like this:

ffmpeg gstffmpegdec.c:1695:gst_ffmpegdec_video_frame:<ffdec_mpeg40>
Dropping non-keyframe (seek/init)


>>
>> ---------------------------------
>> import sys, gobject
>> gobject.threads_init()
>> import gst
>>
>> def on_pad_added(composition, pad):
>>     pad.link(colorspace.get_pad('sink'))
>>
>> pipe = gst.Pipeline()
>> composition = gst.element_factory_make('gnlcomposition')
>> colorspace = gst.element_factory_make('ffmpegcolorspace')
>> timeoverlay = gst.element_factory_make('timeoverlay')
>> xvimagesink = gst.element_factory_make('xvimagesink')
>>
>> pipe.add(composition, colorspace, timeoverlay, xvimagesink)
>> gst.element_link_many(colorspace, timeoverlay, xvimagesink)
>>
>> gnlfilesrc = gst.element_factory_make('gnlfilesource')
>> gnlfilesrc.props.caps = gst.caps_from_string('video/x-raw-rgb; video/x-raw-yuv')
>> gnlfilesrc.props.location = sys.argv[1]
>> gnlfilesrc.props.start = 0 * gst.SECOND
>> gnlfilesrc.props.duration = 60 * gst.SECOND
>> gnlfilesrc.props.media_start = 0 * gst.SECOND
>> gnlfilesrc.props.media_duration = 60 * gst.SECOND
>>
>> composition.add(gnlfilesrc)
>> composition.connect('pad-added', on_pad_added)
>>
>> pipe.set_state(gst.STATE_PLAYING)
>> gobject.MainLoop().run()
>>
>> ------------------------------------------------------------------------------




More information about the gstreamer-devel mailing list