[MPlayer-users] mpeg2->divx

clemenswaechter clemenswaechter at yahoo.com
Thu Oct 18 10:20:14 CEST 2001


Hi,

> 	That I do not know how to do - I believe it requires some very
> 	expensive equipment.   

I believe it doesn't. There must be a software solution, too; since most
hardware is made of DSPs and microprocessors ;-)

> 	Also the audio needs to be converted and
> 	I am not sure that can be done easily without altering the pitch.

I've got an idea of how to convert the audio.

I think it can be done using a conversion from the "time domain" of 
wave audio (which stores the ampitude each 1/48000 sec) to the 
"frequency domain" (which stores the amplitudes for the corresponding
frequencies). 

What you do is:

1. Convert the audio to the frequency domain
2. Shift the frequencies
3. Convert it back

If you play it back with a different sampling rate you have altered the
pitch 2 times. And if you have done that properly the pitch remains
the same in the end.

This process is descibed in the Book "Numerical Recipes in C"; you can
find a sample of it on the web:
http://www.ulib.org/webRoot/Books/Numerical_Recipes/

Have a look at the chapters 12 and 13 which describe it well I think.
Its a pity that you cannot use their source but I think that it would not
be too hard to write a own implementation.

You could also try to skip/interpolate some samples to alter the pitch
before it is played back with the different sampling rate but I think
that this degraded the audio quality while the process described above 
does not; or at least it minimizes losses.

For the video though I have no idea how to smoothly convert it....
Perhaps this can be done by interpolation somehow.


Clemens Wächter

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the MPlayer-users mailing list