[MPlayer-users] Re: Converting 23.976 to 25fps

Martin Emrich martin at emmerator.dyndns.org
Mon Jan 12 17:43:49 CET 2004


Am So, den 11.01.2004 schrieb Martin Emrich um 19:53:

> But I won't open the champagne unless the SVCD plays in 
> the DVD player... ;-)

*foomp* ;-) It works, just tested in the standalone DVD player.
This is what I did:

--------
0. free up some space (approx. 5-7GB temp should suffice ;-)
1. Recode avi to PCM audio

mencoder ${SOURCE_AVI} -o movie-with-pcm.avi -oac pcm -ovc copy

2. Hack source avi:

AVI Header: replace source frame time 
1/23.976 * 10^6 µs = 41708 = 0xA2EC = EC A2 00 00 with 
1/25.000 * 10^6 µs = 40000 = 0x9C40 = 40 9C 00 00

Video STREAM Header: replace source frame rate 
23.976fps * 10^4 = 239759 = 0x3A887 = 8F A8 03 00 with 
25.000fps * 10^4 = 250000 = 0x3D090 = 90 D0 03 00

Audio: replace source sampling freq 
44100Hz = 0xAC44 = 44 AC 00 00 with 
45983Hz = 0xB39F = 9F B3 00 00
# (or whatever the original sample rate is - bc knows the answer)

Audio: replace source data rate 
176400 byte/sec = 0x2B110 = 10 B1 02 00 with
183932 byte/sec = 0x2CE7C = 7C CE 02 00

(use the search option of your favourite hex editor. hexedit likes files
>2GB, so I use it.)

3. extract audio
mplayer movie-with-pcm.avi -dumpaudio -dumpfile moviesound.raw

4. resample audio to 44100 Hz
sox -w -s -c 2 -r 45983 -t .raw moviesound.raw -r 44100 moviesound.wav \
resample
rm moviesound.raw

5. multiplex new sound back in
mencoder movie-with-pcm.avi -o new-movie-file.avi -audiofile \
moviesound.wav -oac copy -ovc copy

6. recode to svcd or whatever
# Don't forget to rescale/expand to correct aspect ratio/resolution.
 
recoder -i new-movie-file.avi -o ${SOURCE_AVI}.mpg -p svcd -a mp2 -b 160
-S 800 -f scale=480:576 -c 1
--------

Thanks for all your hints!

Ciao

Martin




More information about the MPlayer-users mailing list