Take the 2-minute tour ×
Sound Design Stack Exchange is a question and answer site for sound engineers, producers, editors, and enthusiasts. It's 100% free, no registration required.

I have a video in an AVI container. The video is H264 AVC and the audio is VBR MP3. (I don't know if this is relevant— I recorded it in from an analog video capture card, from a VHS. The frame rate can vary when playing VHS tapes.)

When I reencode the video or audio or both, the result comes out very off sync near the end, almost a full second. I've been using avidemux, cropping the edges of the VHS image and trim the static off the beginning and end, but all the reencoding software I've tried has the same problem. I've even used avidemux's audio mapping functionality which sounds like it's intended to correct this kind of thing.

Is the issue the VBR audio? In retrospect I should probably have made sure it was CBR, but it was lengthy and I'd rather not rerecord it. Is there anything else I can I can do to resolve this?

share|improve this question
add comment

migrated from avp.stackexchange.com Jan 24 at 12:01

This question came from our site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation.

2 Answers

up vote 2 down vote accepted

If the audio is in sync at the beginning and out at the end, check your frame rate on your sequence. You may have imported at 24 but the sequence is set to 23.976 or something like that. I had this happen to me in FCP7 with DSLR footage and double system audio. If you close your project and reimport your video footage to a timeline with matching audio you should be ok.

share|improve this answer
add comment

Ah, this used to be a notorious problem for people braving the new world of DivX ;-) 3.1 video with VBR MP3 audio tracks. It used to be commonplace for people to have to edit the framerate in VirtualDub (later VirtualDubMod); VDubMod provides a facility to adjust the video framerate to compensate for audio lag.

Golden rule for audio accompanying video tracks: make sure it's digitised and encoded at 48 kHz. 48000 can be divided nicely into 24, 25 and 30. 44100 doesn't go quite as well. (All to do with timing from back in ye olde dayze). Also, some software copes perfectly well with audio supplied at 48 kHz whereas 44.1 kHz audio tracks desync during playback (even if they're theoretically aligned perfectly in the file) due to bugs with MP3 support in the playback software and the AVI wrapper (it's all one big dirty hack; AVI was never designed to support MP3 bitstreams, nor H.264).

If you're encoding with H.264, I would drop AVI altogether unless it's unavoidable for hardware format support reasons. Wherever possible, use MKV or MP4 to wrap your streams -- MKVMerge for making Matroska files or MP4Box for MP4 files (YAMB is a very functional Windows GUI for MP4Box). Both of those formats are far more efficient and can handle far more in terms of streams (subtitles, both converted and native vobsub, chapters, multiple audio streams and multiple video streams). My recommended software combo for playback is either 1) Media Player Classic with CoreAVC for video, AC3Filter / FFDShow's audio component for audio and Haali Media Splitter for demuxing the streams at playback... or 2) VLC / SMPlayer / UMPlayer as a "no fuss" alternative (not quite as good quality though IMHO).

share|improve this answer
    
Good call on the 48k. When you use certain settings so long, sometimes you take them for granted! –  Bryce Alan Flurie Sep 6 '11 at 20:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.