I have tried and tried to do this... I've gotten close, but still no perfect sync.
I'm not even documenting the many times I tried to do this using lame ACM in virtual dub or VD mod to a VBR mode because that never works.
Attempt #1
1. Load MPEG-2 file from PVR into VDM
2. Edit out commercials with VDM
3. Save WAV file of resulting edited video
4. Compress wav with lame.exe--alt-preset standard
5. Compress to 2 pass XviD without audio in VDM
6. Load resulting avi file and then add the mp3 audio stream
7. Save new file with audio (mux)
FAILS to sync!
Attempt #2
Did steps 1-5
6. Load resulting avi file and mp3 file in AVIMux_GUI and made new muxed avi
Looks like it synced, but if you watch closely, it didn't. Plus LINUX mplayer cannot seek with the resulting file!
Attempt #3
Did steps 1-5
6. Load avi in nandub 1.0rc2 and mp3 file as vbr mp3 and made new muxed avi
FAILS to sync!
I know this can be done because I have watched avi files that have VBR mp3 streams and they are perfectly synced.
Does anyone know what the f*ck I am doing wrong?
Thanks![]()
+ Reply to Thread
Results 1 to 14 of 14
-
http://encoding.n3.net <-- for all your DVD and CD backup needs!
-
A lot of times from what I've seen, the audio is shorter than the video and there's something like a .5s offset at the beginning. Usually if that's the case I'll add a half sec of nothing to the beginning of the audio and everything is good again.
-
Have you ever tried saving the audio as Ogg Vorbis? You said you are using mplayer to play videos back, which supports Vorbis. I would give that a try as I encode everything with vbr Vorbis and have never had sync probs. I convert AC3/WAV-> Vorbis with Headac3he then mux with either Vdubmod or OggMux. Quality is better than MP3 too (IMO).
-Suntan -
I assume that the original mpeg is in sync. Have you tried the audio and video conversion together in vdub? Finally, how did you get Vdub to do a 2-pass conversion with xvid? I just asked this question elsewhere. I have been able to do your conversion using a picvideo avi and one-pass conversion along with the wav to mp3. Everything was in sync. So it may either be your mpeg file or the the 2 pass conversion.
-
If you are just archiving stuff from your PVR, don't bother; VBR MP3 in AVI is inherently flawed; though you should be getting sync, it can be extremely difficult to do properly. Avery Lee has a great rant on the Virtualdub website about why VBR MP3 is bad.
As suntan said, Ogg Vorbis audio in an OGM container works perfectly (but the format was designed from the start to handle it, so..) -
Originally Posted by winifreidhttp://encoding.n3.net <-- for all your DVD and CD backup needs!
-
Originally Posted by iantri
Thanks!http://encoding.n3.net <-- for all your DVD and CD backup needs! -
Ogg is a container format, like AVI. It can contain XVID video and MP3 audio, just like an AVI; but it can also contain Ogg Vorbis audio (and Ogg Theora video, if you wish, but that is still in a very early stage).
Definitely mplayer can play it. VirtualDubMod can make them.. also OggMux. -
Ok, so I used Oggmux with the avi and the ogg file I made from the wav. When it finished, I get a XviD file of the same filesize as the original with no audio...? Same thing with VDM when I add the ogg to the stream list and then save the avi in direct stream copy mode.
What am I doing wrong?http://encoding.n3.net <-- for all your DVD and CD backup needs! -
Two things:
Is OggDS installed? You need the Ogg directshow filters to hear the audio.
Are you saving as OGM? -
This is my question in another thread (although no one has responded:
https://www.videohelp.com/forum/viewtopic.php?t=236009
Have you checked your source mpeg for sync? I doubt it has to do with the audio codec. -
Well, it may be better to first extract the audio from your mpeg-2 file, convert it to wav, and use this wave as your audio source. VDM might not like editing mp2 audio, or whatever audio your source mpeg has.
You might also try just encoding the whole thing to xvid, and then editing the resulting avi. Commercials will generally be seen as scene changes by the encoder, and so there should be convenient keyframes when you go to edit the commercials. The problem is, you can only cut at certain frames of an mpeg2, and this may cause cutting restrictions that are even more prohibitive than in an xvid. I realize that these restriction don't affect your video when you do re-encoding...BUT, it is always possible that when you save out the audio, VDM is actually taking the mpeg2 cut-points into account, and slightly adjusting your edit points to compensate. I really don't know, but you can test this theory by editing only at allowable mpeg-2 cut-points, and see if the result is in synch.
Third thing to try. After editing, do your xvid encode of the video, and do full-processing/no-compression with the audio. This should leave you with an xvid with PCM audio. You can test this xvid to see if it's in synch. -
Two things, in OggMux did you remember to hit "ADD" in the audio area after you loaded the Vorbis stream?
In VDM you said
Same thing with VDM when I add the ogg to the stream list and then save the avi in direct stream copy mode.
-Suntan -
Thanks for all the replies. To answer some questions:
OggDS is installed and no, I'm saving it as a .mkv. Although I think the extension is pretty arbitrary because you can drag/drop the file into mplayerc and it'll play regardless of the extension.
Yes, the MPEG-2 is synced.
LisaB: good idea, I'll try that and see if it's a function of the XviD, but I'm very sure it is not. I can encode it to CBR mp3 and it's properly synced
Suntan: no, I didn't tell VDM to make an OGM. I used AVIMux_GUI.http://encoding.n3.net <-- for all your DVD and CD backup needs!
Similar Threads
-
SYNC PROBLEM: X264 AC3/DTS MKV --->>> Xvid with VBR mp3?
By Randm in forum Video ConversionReplies: 6Last Post: 30th Jul 2013, 17:57 -
Audio out of sync after converting AC3 to MP3 in AVI with VD
By huykin in forum AudioReplies: 6Last Post: 1st Oct 2009, 13:27 -
Gordian Knot AUDIO PROBLEM: DTS to VBR MP3? (HD 720p.mkv to SD XviD.avi)
By Randm in forum Video ConversionReplies: 2Last Post: 31st Jul 2009, 01:49 -
SOLVED: Audio out of sync or no audio - mkv/h.264 to avi/xvid
By dwoozle in forum Video ConversionReplies: 3Last Post: 2nd Feb 2009, 16:14 -
Joining Xvid files with MP3 audio (VBR) without loosing synch?
By fk in forum EditingReplies: 6Last Post: 31st Jul 2007, 19:19