[gst-devel] help with event-based seeking in MPEG1 video

Jeremy Gwinnup jgwinnup at mbvlab.wpafb.af.mil
Thu Oct 9 17:12:17 CEST 2003


sorry it took me so long to get back to you.

I'm using the default gstreamer packages in debian sid, and I am playing
a simple mpeg1 video with no audio channel in gst-player 0.6.0

When I start playback, I the seek bar immediately goes to the right and
the time counter increases with playback. If I drag the slider during
playback I get the following message:

(gst-player:3781): GStreamer-WARNING **: abnormal clock request diff:
ABS(3266510144) > 2000000000

The clock keeps tickin, but the video is frozen.

If I pause the video, then drag the slider to the left, then the video
will not engage again.

Different question:

How do/can I determine the length of an MPEG1/2 video in frames? I'm
trying to use something like this:

(this code attempts to grab the total length of video in nanoseconds)
GstPad * fpad =  gst_element_get_pad(filesrc, "src");
GstFormat fmt = GST_FORMAT_TIME;
gint64 answer;

gst_pad_query(fpad, GST_QUERY_TOTAL, &fmt, &answer);
g_print("clip end is: %lld\n", answer);

With the above code, 'answer' does not get set.
it also yields the same result if I use the src pad on the mpeg2dec
element in my pipeline...

Thanks for your help

On Tue, 2003-10-07 at 05:15, Ronald Bultje wrote:
> Hi Jeremy,
> On Mon, 2003-10-06 at 19:57, Jeremy Gwinnup wrote:
> > I've tried viewing my source video in gst-player 0.6.0 (on a debian box)
> > and the seek-bar on gst-player does not work. 
> That's weird, because that works here. Surely, it's supposed to work,
> what's a media player without a seek bar? ;).
> > The big question is this: Is event-based seeking (a la windows media
> > player) supported for MPEG 1/2 streams, and if so, where can I find an
> > example to get help with this?
> There's some seek tests in our CVS. And yes, it's supported for MPEG
> 1/2, I don't understand why it doesn't work.
> Ronald
Jeremy Gwinnup
Software/Systems Engineer
General Dynamics Advanced Information Systems
phone: (937) 904-9023
fax:   (937) 656-7425
email: jgwinnup at mbvlab.wpafb.af.mil

More information about the gstreamer-devel mailing list