Log in

View Full Version : How to recompress mpeg4v2/ac3 to divx5/vbrmp3


engel
11th March 2002, 17:25
The starting point: a ~1.5 GB file, several problems with playing back, obviously does not fit on one single CDrom

Hardware: Sony Vaio PCG-F808K, W2K, PIII 750 MHz, 256 MB RAM, comes with DVgate & Premiere 5.1 LE, a (not very usable) Sony software DVD player and a (pretty much hidden!) (MS?) DVD player which is more useful

Software: ac3fix03, "audiofilters" and " WaveOut-DSound" (both are not further specified, both downloaded from doom9), LameGuiv0.3/Lame389beta, DivXPro5, headac3he-0.22b, VirtualDub 1.4.9, nanDub1.0rc2

invaluable help from: www.doom9.org, divxvid.net (German site with quite useful how-to's)

Here's a summary of steps being taken along with the result - perhaps this is useful for other people! I do not claim to be an expert - the gurus are invited to correct my interpretations if I am wrong.

After obtaining the much sought after movie file and trying to play it (MS windows media player 6.4.09.1109) I got a message "codec download" and then, after some 10-20 seconds something like "codec downloaded but does not work properly". Still the movie started to play ok. This happened always after switching off and on the laptop (i.e. the codec had to be downloaded repeatedly) and in my opinion points towards mpeg4v2.

Otherwise, the video signal appeared to be ok all over the movie. But there was no audio! Premiere would not accept that movie, both VirtualDub (VD) and nanDub (nd) reported "DivX ;-) MPEG4 low motion" for the video and "tag2000"/unknown for the audio.

After looking and inquiring in several forums I figured that the audio was ac3/Dolby surround and with several packs (obtained from doom9) I even got the media player 6.4 to play the audio. So the file itself was ok.

Again, after turning the laptop off and on, I would have to reinstall those audio packs in order to hear the sound - is this a bug, a feature, or just my stupidity?

Now that the file itself turned out to be ok, I decided to recompress it in order to fit it on one cd and at the same time to replace that ac3 and video codecs by ones which would play back on my computer without reinstallation upon use being required.

I saved both the audio track (~.5 GB) and the video (~1.0GB) via nandub (rename the audio to ".ac3"!!) and checked both visually and by listening: ok. Reencoding the audio by headac3he, however, all too soon resulted in an error message "either your file is corrupt or frames are missing". After applying ac3fix this problem was cured, but the resulting file would not play back through the media player any longer (I am not quite sure whether this was due to the ac3fix treat or whether I had switched off my laptop in the meantime, thereby requiring reloading of those audiofilters). I proceeded to conversion via headac3he, since I was short on hd space I first converted the audio file into wav followed by conversion into vbr mp3 with Lame (settings: mode stereo/keep all frequencies/use vbr new routine/quality 7/minimum bitrate 64/maximum bitrate 224/anything else untouched i.e. default settings). This gave me ~.12 Gb of vbrmp3 audio, sounded ok. Encoding times: 5 min for getting the ac3, ~30 min for ac3fix, ~1h for headac3he, ~20 min for Lame (the movie is ~2.5h).

I calculated the required bitrate for recompressing the video track with nd (~1 Gb --> ~.6Gb ~550 kb/s) and ran the recompression with vd/DivX 5.0 in 2 passes, default settings as suggested by Divx 5.0. Took 8 h or so. Result was ok - actually the recompressed movie looked (to me!) better than the "original" in that the original in places showed clearly discernible "digitizing effects" which were "washed away" after recompression. Sorry for not being able to get this effect across more clearly! Let's say: The resulting movie was "softened" a little more, but still very satisfying, even at full screen playback (15 inch tft).
Fully sufficient if one, like me, watches these movies on a rainy Sunday morning in the bed with the laptop on your knees :-)

Finally, I merged vbrmp3 audio with DivX5.0 via nd (video - direct stream copy/audio - (vbr)mp3 audio/audio interleaving - enable/preload 160 ms/interleave every 160 ms (not frames!!)/skew 0 ms).

The resulting movie played back both video and audio without problems!