[MPlayer-dev-eng] Fast Forward and Slow Motion Patch

Struan Bartlett struan at NewsNow.co.uk
Fri Feb 7 16:59:53 CET 2003


Dear Jonas et al, Thanks for your feedback.

Jonas Jermann wrote:

>You forgot to add [PATCH].
>
Sorry I didn't find the documentation previously. Why don't you stick 
some advice on the mailing list web page telling me to first read 
DOCS/tech/patches.txt and DOCS/tech/cvs-howto.txt ?

>>I understand there's a feature-freeze going on, but is there any chance 
>>this small but useful (and hopefully uncontroversial) patch could make 
>>it into rc4?
>>    
>>
>I dout, but again: I don't know much about coding...
>
>>>>>I tried a short hack to mplayer, to alter the 'playback_speed' 
>>>>>setting while the movie is playing. It worked fine, except that 
>>>>>          
>>>>>
>>Press ']' to speed up playback first x2, then x4, then x8, assuming your 
>>video driver can handle the speed.
>>    
>>
>Hmm, why not specify the factor over mplayer's input system?
>
Fair point - I'll look into that. But for those who want to press a 
button multiple times to get a cumulative effect, I don't imagine the 
input system has much bearing.

>>You'll observe that audio is *not* 
>>accelerated, because this is harder to do. I've left the audio switched 
>>on, because it's more fun that way.
>>    
>>
>oho! I don't know much about coding, but that really looks
>ugly. Btw: Did you test it? I tried to do something similar 
>myself but it crashed because of the audio buffer size.
>
I don't know you, but suspect you're being self-deprecating about your 
coding abilities!

I certainly did test it, but as it says in cvs-howto I didn't 
"over-test" it, as it worked for me I assumed it would work for others 
too. The audio played fine albeit at a different rate from the video 
while the video was fast forward or slow motion.

>>I imagine another patch could easily mute the audio during fast forward 
>>or slow motion.
>>    
>>
>I imagine it's not easy. Especially the A/V sync...
>
>Anyway, I somehow didn't like your patch (sorry): Why add a new 
>configure option?
>
Well, I took my cue from --enable-edl and the #ifdefs in the code for 
USE_EDL.

I now understand, having read cvs-howto, that I ought to avoid changes 
to the configure script.

>Why not add an upper limit, I'm not sure, but 
>x16 speed is bad IMHO.
>
There is an upper limit, x8: "if(playback_speed < 8)"

>Why not add an upper limit? a=a*2 is 
>better written as a*=2 (IMHO), especially for long "a" as in 
>your patch.
>
Fair play!

>And I'm still not sure if playback speed is the 
>right approach. Why not just skip frames instead of raising 
>speed? It doesn't waste performance and works longer (ok, it 
>needs keyframes).
>
That's a good point, but as you say it needs keyframes and is not smooth 
like a good quality VHS player. Also, I don't suppose this would handle 
the slow motion. Also, I'm not forcing anyone to use this feature if 
they don't want to waste performance.

Please could you be more specific about what looks ugly?

With kind regards,

Struan




More information about the MPlayer-dev-eng mailing list