After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 123815 - Variable-speed playback on any stream
Variable-speed playback on any stream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-10-04 05:40 UTC by Luke Hutchison
Modified: 2005-08-15 01:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Luke Hutchison 2003-10-04 05:40:37 UTC
There is a utility for Windows which lets you set the playback speed for
any windows media window to anywhere between 0.5 and 2.0x the original
speed.  It's an awesome feature which is especially useful for lectures
that come on CD/DVD, or for audiobooks.  Very quickly you get used to
absorbing information at twice the speed, and listening/watching at the
original speed is just painful.

How hard would it be to add this feature to gst-player, or to the gstreamer
framework in general?  I am requesting it here with a hope that it will be
something that you can at least design the APIs/the framework around, for
future addition, before the system gets completely set in concrete...  Thanks!
Comment 1 alexander.winston 2003-12-23 20:08:52 UTC
Isn't this possible with the speed plug-in
<URI:http://gstreamer.net/status/?category=5> that "changes
speed/pitch by arbitrary amounts using linear interpolation"?
Comment 2 Luke Hutchison 2003-12-23 21:02:53 UTC
It does look like that's exactly what it does -- has anyone tried it?
 How could I test it out (do I have to write code)?

Comment 3 alexander.winston 2003-12-31 17:56:12 UTC
Yep, this is definitely what it does. You can try it out by running
something like this (no code is necessary):

gst-launch-0.7 filesrc location=Barry_White.ogg ! vorbisfile ! speed
speed=2 ! osssink

Be prepared to laugh, or similar. :)
Comment 4 Luke Hutchison 2003-12-31 18:46:49 UTC
Nice :->

Unfortunately the sound quality is seriously degraded by this -- what
is the resampling algorithm used?  Doesn't Gstreamer already have a
high-quality resampler?

I also get:
WARNING **: element speed0 performs a yield, please fix the element

And it takes two Ctrl-C's to interrupt the pipeline (weird).

Is it possible to insert an element as a preprocessor to a sink, so it
is always used, i.e. so that osssink runs through speed for the whole
desktop?  (It would be nice to have an applet that sets the speed for
all gst apps, without needing to set up their pipelines explicitly.)
Comment 5 Leif Johnson 2003-12-31 23:32:24 UTC
if you'd like to have this speed plugin used as a preprocessor in many
GNOME based GStreamer applications, you can put it into your GConf
settings, under /system/gstreamer/default/audiosink : set the key to
something like "speed speed=2 ! osssink". in fact, this key accepts
any valid gst-launch syntax, so you could come up with other equally
interesting preset sinks to use.

the drawback of this approach is that you can't modify the speed once
an application starts running. but until this feature creeps its way
into the gst-player, it might be a good solution for you.
Comment 6 Luke Hutchison 2003-12-31 23:55:19 UTC
Awesome, thanks.  

Just one other question then before I close the bug -- is it possible
to get better resampling quality?  Does "speed" use gstreamer's
built-in resampler?
Comment 7 Luke Hutchison 2004-03-03 06:25:22 UTC
Actually, I take that back -- does this work for video stream
framerates too?  i.e. is it a clock rate fixer, or is it just a sound
resampler?  (I don't have any video playback mechanism for GStreamer
right now to test the video on.)

Also, would it be possible to interpolate video frames to produce
"in-betweens", using e.g. MPEG2 motion vectors to interpolate, to
double the framerate or halve the playback speed?  24fps always seemed
jerky to me -- imagine playing back a DVD at 48fps... it would also be
nice if we had real video in-between support for slow playback speeds.
 (That would be needed e.g. for a non-linear video editor for some
speed-related effects.)
Comment 8 David Schleef 2004-03-06 03:40:24 UTC
Speed doesn't use libaudioresample, but should.

Video resampling ("pulldown") is always done framewise, since
interpolating frames is impossible.
Comment 9 Luke Hutchison 2005-01-15 20:40:44 UTC
This might be useful too:

http://scizzor.sourceforge.net/
Comment 10 Tim-Philipp Müller 2005-02-14 15:44:49 UTC
Can this bug be closed?

The speed plugin should be fixed in CVS (not using libaudioresample though).

And isn't providing variable-speed playback on any stream something that should
be taken care of at the application level rather than at the GStreamer level in
any case?

Cheers
 -Tim
Comment 11 Luke Hutchison 2005-02-14 21:37:09 UTC
Sure, closing bug.  Thanks.