Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to change the playback speed of a video, but can't use mencoder to do it. Changing the speed that a video plays at seems like the sort've thing that any video encoding software should be able to do, but mencoder is the only one that I've seen with a built-in option. Mencoder is also the only one that I've seen that does it fast. There are examples on the web of changing the speed with ffmpeg by converting to raw video frames and then putting them back together, but mencoder is clearly doing something faster because speed changes happen in nearly the time it takes to simply copy the file.

Does anyone know how mencoder is changing the playback speed with the -speed option?

share|improve this question
up vote 0 down vote accepted

Further research suggests that it's the "presentation timestamp" that's being changed. In ffmpeg, this can be set with the setpts video filter.

share|improve this answer

The -speed option in mencoder , changes the frame rate. By only changing the one header item , the player then plays the video back at the new rate.

you can also do this trick in virtdub, in video frame rate. Which can take the audio out of sync.

share|improve this answer
Using ffmpeg, the `-r' option sets the frame rate, but it's not doing the same thing as mencoder because it doesn't work as well. Playback software ignores the rate setting if it's out of some range, or not the right container format, &c. Mencoder is doing more than just changing the frame rate. – blahdiblah Oct 7 '11 at 21:27
Thats true, if the frame rate was way to high, no payer is going to play it like that. So it would have to drop frames out. for Slow it could not processes it quick, unless it was frame doubling, because frame interpolation requires processing. – Psycogeek Oct 8 '11 at 6:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .