Log in

View Full Version : Encoding problems


prismejon
07-25-2003, 12:15 PM
I have problems with the sound getting out of sync in the DivX-files I encode. I have mpg-files that are about 25 min. long and use VirtualDub to encode them on my PIII 800Mhz laptop. The sound lag just increases, and after 10 min. it's so big that it’s really annoying. I have a Toshiba E755 (Using PocketMVP), but my PocketPC isn’t the problem as the same lag appears on my laptop which normally plays DivX just fine. If I just open the file (without starting to play it) and jump to about 10 min. the same sound lag appears.

I use VirtualDub with DixX Pro 5.0.3. The settings I adjust after opening the mpg-file are:
- Audio -> Full Processing Mode
- Audio -> Compression -> MPEG Layer-3 -> 32 kBit/s, 22,050 Hz, Mono – 4Kb/s
- Video -> Compression -> DivX Pro 5.0.3 Codec -> Configure -> Variable bitrate mode: Multipass 1st pass, Encoding bitrate: 150 kbps, everything under General Parameters and Profiles is unchecked
- Video -> Filters: Add a resize and rotate filter
- Video -> Frame Rate -> Frame rate conversion set to “Process every other frame (decimate by 2)”

Then I encode it and change the Variable bitrate mode to “Multipass nth pass” and encode again.

Any suggestions on what I’m doing wrong?

GingerTommy
07-25-2003, 01:59 PM
You could try changing the audio interleaving to milliseconds instead of frames - I have found this to offer better results.

Select Interleaving from the Audio menu and enter 500 in the textbox. Change the option from frames to ms.

KayMan2k
07-25-2003, 04:34 PM
The error is introduced most liekly because you decimate frames by 2. A VCD MPEG really is 29.97 frames per second - not 30 so when you divide by 2 there will always be a little offset. Sounds like that offset is building up over time and bcomes noticable at 10mins or so. You can try to offset the interleaving, that does sometimes help (for reasons I do not know). But the only way to ensure 100% sound sync is to not change the framerate since audio is extremly related to framerate.

Talyn
07-28-2003, 11:09 PM
You didn't quite explain what your "sound lag" is doing, but installing and using the Lame MP3 codec instead of the Fraunhofer codec solved all of my audio sync issues.

Pat Logsdon
07-28-2003, 11:24 PM
I've encountered the same problem in the past with my movies - sometimes up to 10 seconds lag time for the audio. What I've been doing is saving the audio to a wav file, and then compressing from that instead of from the source audio.

Of course, I was also messing around with different codecs when I was having this problem, so I may have installed the MP3 codec that Talyn mentions.

I'd also set the rotate filter above the resize filter. For some reason, the encoding seems to work better if the filters are in that order.

Talyn
07-29-2003, 01:46 AM
The main reason I originally switched to the Lame codec is that I was having a terrible time with audio sync, but only when playing on the Pocket PC. The audio would play approximately 1sec prior to the point it should, and would go out of sync almost immediately. This was encoding with the Fraunhofer codec in mono. If I encoded with Fraunhofer stereo, I didn't have the problem, but that makes the file larger.

After reading several technical articles that basically said Fraunhofer will go out of sync over a period of time, regardless how it's encoded, I decided to install the Lame codec, which came highly recommended. And while it's a minor pain that it seems to prefer stereo defaults in VirtualDub more often than not, I can easily select the 'Show all formats' and select the same 22050 kHz 32kbps mono that I was using with Fraunhofer. My audio sync problems have disappeared.