[MPlayer-dev-eng] [PATCH] af_scale* command-line only

Scott Lamb slamb at slamb.org
Sat Sep 8 01:50:13 CEST 2007


Robert Juliano wrote:
>> * I don't understand the point of scaletempo= or scalerate=.
> 
> scaletempo scales just tempo.  scalepitch scales just pitch.
> scalerate scales both tempo and pitch (replicates -speed).
> 
> scaletempo does the magic and does what you want.  scalerate
> exists to implement scalepitch.  That is: scalerate (both
> tempo and pitch) - scaletempo (unscale tempo) = scalepitch.
> 
> Any two gets you the third.  So with a little algebra, and
> we have what you did below.
> 
>> ** it seems to *increase* the pitch by the given factor, so when used 
>> with -speed, the numbers need to be reciprocals to maintain the original 
>> pitch. E.g., I am running it with the rather ugly command "mplayer -af 
>> scalepitch=.76923076923076923076 -speed 1.3 file.avi". It would be more 
>> convenient if I didn't have to use a calculator to generate the correct 
>> command.
> 
> While this would do:
> bash$ mplayer -af scalepitch=$( echo 1/1.3 | bc ) -speed 1.3 ...
> 
> I suggest:
> mplayer -af scaletempo=1.3 -speed 1.3 ...

Hmm, I wonder if vanilla mplayer behavior has changed since your writing 
the patch and my trying it. That would explain my confusion.

Here's what I see:

"mplayer -speed 1.3 file.avi" alone yields 1.3X video speed, 1.3X tempo, 
and 1.3X pitch, so the audio and video are in sync but the people sound 
like chipmunks. Is this not what it did before?

"mplayer -af scaletempo=1.3 -speed 1.3" yields 1.3X video speed, 1.69X 
tempo, and 1.3X pitch; the audio and video are not in sync and people 
still sound like chipmunks. I don't know why anyone would ever want this.

"mplayer -af scalepitch=.76923076923076923076 -speed 1.3" yields 1.3X 
video speed, 1.3X tempo, and 1X pitch; the audio and video are in sync 
and the people sound normal. This is what I want.

Best regards,
Scott



More information about the MPlayer-dev-eng mailing list