[MPlayer-dev-eng] [PATCH] af_scale* command-line only
Robert Juliano
juliano.1 at osu.edu
Fri Sep 7 06:09:07 CEST 2007
On Thu, Sep 06, 2007 at 02:53:01PM -0700, Scott Lamb wrote:
> I tried out your June 13th patch. [1] Is this the
> latest version?
I did some work on it after that but haven't posted anything.
I wasn't getting much feedback from people who actually tried
it or found it useful. So my new job got my attention. When
I got back around to it, I implemented it for another framework.
> * on first run of "mplayer -af scalepitch=1.5 speed=1.5 file.avi", it
> crashed somewhere in audio decoding. Unfortunately, I had not compiled
> with --enable-debug, and when I did the error went away.
Yeah, if some piece of code overwrites af_scale* memory, it
will most likely crash. I've noticed with newer revisions,
that some of my test files produce crashes. I've haven't
looked into it yet.
> * 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 ...
> ** an "-af scalepitch_auto" filter (like the "-af scaletempo_auto" you
> had in the previous patch set) that follows my "[" and "]" keypresses
> would be extremely useful. With it, people could take advantage of this
> feature without even being conscious of it, which I think is the ideal
> thing.
If they still patch, I would try the first three patches from
my earlier set *. 1 and 3 are essential. You could also try
4, it automagically inserts scaletempo, so no need for the
commandline -af. Otherwise just use 'mplayer -af scaletempo
filename' and then '[' ']' 'BS' to adjust the speed.
* http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-June/052312.html
I know I have some new patches lying around. I'll see if I
can get them posted within the next week or so.
ciao,
robert
More information about the MPlayer-dev-eng
mailing list