Hi there I hope u can help me ()
I am making xViD/DivX avi edits with VDubMod 1.5.10.
As much as I love this program, it pains me to have to disable audio streams on almost all my edits because the sync is out. Its happening on my DVD rips, mpeg edits, avi re-encs, everything i do with this app, and I still havent figured out what setting is causing the audio to go out of sync, progressively when i append multiple encodes.
My settings are as follows:
Interleave audio/video every 1 FRAME
Preload audio 0 ms
Offset audio to maintain A/V sync ON (off in video->select range)
Cut audio at end ON (off in video->select range, if it makes any difference)
When i go Video->Frame Rate, the video/audio lengths are sometimes different.
In a chopped up scene its the worst.
When i rip from DVD, the audio sync is fine from VOB_01, but VOB_02 onwards have out-of-sync.
The thing is, my settings create some perfectly fine sync'd videos (or maybe its out a little out and I dont notice) and others that are definately OoS.
Help me out here... What am I doing wrong?
+ Reply to Thread
Results 1 to 22 of 22
-
-
Ok just finished an edit. All i did was recomp an mpeg to xvid@3kbps 2pass and audio 128kbps Lamemp3 in just 1 rip of 400 frames or so. I open it up and see this:
More like "changing the framerate will cause audio/video synchronization"
From what I've been reading, it seems VDub is choosing to drop audio frames with silence when I encode.
Do i really need to mux the audio off every rip and time stretch it to PRESERVE FPS?
Won't I get a different sampling rate then so they wont join?
If i change the FPS on each video, they will all be synced, but they wont join.
Help... someone... plssssssssss"Youth is wasted on the young." -
I'm pulling my hair out over this, any advice guys?
"Youth is wasted on the young." -
I believe that default is 500ms.
As for your VOBs, try ripping as one big Vob instead of multiple VOBs so you have one video and one audio stream. There are instructions that tell the player when to start the audio for each VOB and this can cause sync problems. Also, try demuxing the audio and converting it or save an uncompressed wave file before trying to edit the files. I have had problems trying to edit MPEG-2 files with AC3 in VDub before.
If you're working with XviD and DivX files, make sure the audio is not VBR. If it is then you'll need to fix this before editing the video or you will get sync problems.
I had a handfull of MPEG-1 files that the audio was longer than the video and there was absolutely nothing that I could do to fix the sync problem. Not sure what the person that encoded these files did to mess them up. If the audio is shorter than the video then you can try and use the time warp feature in Goldwave to stretch the audio but if the audio is longer than the video, Goldwave will not smash the file shorter. -
I'd use VOB2MPG to rip one MPEG from the DVD, then process that in VDM. Are you doing framerate conversions like PAL<>NTSC? It's not really clear from your posts. Those type of conversions can cause sync loss.
And if you are cutting up files, are you cutting on keyframes? Not using keyframes when cutting with VDM will cause sync problems with some video formats.
I assume your source video is MPEG, so VBR shouldn't be there to cause sync problems like it does with some AVI type formats. But VDM would warn you about VBR.
And welcome to our forums. -
I assume your source video is MPEG, so VBR shouldn't be there to cause sync problems
-
Thanks for the welcome RedWudz, and the positive comments from others.
Its happening on everything i edit, which is mostly VOB files and MPEG2 video with AC3 audio.
Originally Posted by redwudz
Originally Posted by redwudz
Heres a perfect example - an MPEG2 (@25.000 FPS) with AC3 audio that i just encoded to xViD in 5 parts i want to join. I opened them up after 2passing em and this is what VDM said the FPS would have to be to sync them:
1) 25.036 fps <-- first scene.
2) 25.126 fps
3) 25.083 fps
4) 25.194 fps
5) 26.619 fps <-- high, this was the last scene to end of file.
Is there an app that can join avis of different FPS?
I'm beginning to think this is happening cuz the audio is already compressed and I'm compressing it again?
If this is the case, then converting the audio to raw wav PCM, doing all my edits, joining the files, then comping the audio to mp3 and direct streaming the video might just be the ticket!
I sure hope this works. Anything else i can try?"Youth is wasted on the young." -
Ok re-ripped this video at hand, but this time from wav and not the original AC3:
1) 25.000 fps
2) 25.000 fps
3) 25.000 fps
4) 25.000 fps
5) 26.130 fps
We're getting somewhere.. but the final clip is out. Close, but no cigar!
When i joined them, the resultant clip wanted an FPS of 25.075. If i appended another 25 FPS clip after this file (with varying stream lengths), that would be pushed out of sync.
When i go File->File Information it lists video length as 27.32 sec and audio as 27.23 sec. Shall i tap 0.09 secs of silence onto the end?
It wont pain me too much to do this to every final file of a rip. I hate workarounds tho, I'd rather just be doing this CORRECT.
Update: Manually edited the mp3, even added a fadeout at the end, but couldnt improve on 25.007 for some reason. I'm so close, help me crack this nut guys..."Youth is wasted on the young." -
Just RIP the DVD normal like. I would use DVD Decryper or DVDFab Decrypter etc.
Run the DVD rip through DGIndex. This program creates a D2V project file and demuxes the video.
Use a program to convert the audio to a standard 16-bit 48k 2 channel PCM WAV audio file. DGIndex can do this although I don't know how well it does this ... in the past I've used something else like BeSweet or HeadAC3he etc.
Now you create an AviSynth script that looks like this:
Code:LoadPlugin("C:\DVD_Stuff\DGMPGDec\DGDecode.dll") vid=MPEG2SOURCE("C:\MOVIE\VIDEO_TS\filename.d2v") aud=WAVSOURCE("C:\MOVIE\VIDEO_TS\filename.wav") AudioDub(vid,aud)
Line two loads the D2V file that you created. Again the "path" may be different.
Line three loads the WAV file you created. Again the "path" may be different.
Line four combines the video with the audio.
Now load this into VirtualDubMod. This wonderful version of VirtualDub has a built-in script editor so you go ahead and do your edits as you normally would right? Then you go to TOOLS and under that select SCRIPT EDITOR ... and your script pops up. Go to the end of it of the script. At the top of the Script Window go to EDIT and under that make sure the option called SCRIPT HANDLING is set to AviSynth (it should by default but double check it). Now under EDIT select IMPORT FRAME SET AS TRIMS.
This will add your trims to your AviSynth script. You will see something that looks something like this:
Code:LoadPlugin("C:\DVD_Stuff\DGMPGDec\DGDecode.dll") vid=MPEG2SOURCE("C:\MOVIE\VIDEO_TS\filename.d2v") aud=WAVSOURCE("C:\MOVIE\VIDEO_TS\filename.wav") AudioDub(vid,aud) Trim(344,22665) ++ Trim(32677,47725) ++ Trim(51051,77018) ++ Trim(85055,101699) ++ Trim(107309,154994)
- John "FulciLives" Coleman"The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
When i go File->File Information it lists video length as 27.32 sec and audio as 27.23 sec. Shall i tap 0.09 secs of silence onto the end?
I will go out on a limb and say that you are either compressing the audio to ABR MP3 with the Lame codec which is the same as VBR MP3 except that Virtualdub will not see it as VBR and will not give a warning. ABR MP3 will be out of sync also...or the wave file that you are using is not an uncompressed wave but the original AC3 file with a .wav extension. You need to make sure you choose Full Processing mode under Streams > Stream List an make sure that uncompressed is chosen. Then save the Wave file.
I would also recommend cutting the parts out that you don't want instead of making 5 different files and trying to append them back together.
I use the new version of Virtualdub 1.7.1 to do most of my editing now. I can use smart render to exact frame edit AVI and I can use filters with the blend option and the curve editor to insert transitions wherever I make a cut.
If you play each clip by themselves and they're not out of sync, you might try opening each clip in VDub and go to the last frame then step back one frame at a time until you see movement. Check the length of the audio under stream List and see if it matches the time and set the out marker. Using direct stream copy or smart render (Virtualdub 1.7.1) under Video, you should get a clip where the audio and video match. Not sure how you got a clip that was 26.130 unless you have some messed up settings somewhere. This clip would have to be fixed before VDub will append it (25fps with insync audio)
If i appended another 25 FPS clip after this file (with varying stream lengths), that would be pushed out of sync. -
Thx for the suggestions, i will give Trim scripts and 48k wav (i dont think i specified this) and the blend option on the curve editor for transitions a go (didnt know u could do transitions in VDub), as well as cutting out the bits that i dont want instead.
And no, I'm compressing to CBR audio not ABR, if only it was as easy as this, and the 26fps clip i kept at 25.000FPS and appended (i didnt match stream lengths). I'll try turning the cut off audio at end off for this last clip, as its at the end anyway.
Very nice technical suggestions there, thank you and keep em coming"Youth is wasted on the young." -
Update: Full processing mode then save wav, and demux that seems to be working, it maintains sync.
Right now i have an edited file IN-SYNC but with raw uncomp wav audio.
When i then encode the wav to Lame mp3@128Kbps CBR (with VDubMod) it b0rks the file.
I'm thinking the problem may lie with the the way VDM encodes audio.
I demux'd the wav file and converted to 256kbps mp3 FraunhofferII (with CoolEditPro), muxed it in and i have a synced clip at last (well it worked for this one video, I'll try some more).
Lesson learnt: Don't COMPRESS audio with VDM, u can full process an uncomp wav, but make sure you compress it outside of the application or you will experience sync issues.
G-Spot on my final edit (i think 256kbps audio is a bit overkill but hey, its synced baby!):
"Youth is wasted on the young." -
Lesson learnt: Don't COMPRESS audio with VDM, u can full process an uncomp wav, but make sure you compress it outside of the application or you will experience sync issues.
I just took a VOB and edited out four or five scenes, compressed the video to XviD and converted the 48000Hz audio to 44100Hz 16bit Stereo and compressed to 44100Hz 128kbps Stereo MP3 with no sync issues at all. Since this was an MPEG-2 file and I was Full Processing the video and audio, I was able to do frame exact editing.
Here is my GSpot screencap
-
Thanks DarrellS, I was about to say you gave among the best advice here.
Could u tell me why u downsampled to 44100Hz and how that helped you?
Also, under Mpeg Layer 3 Audio Compression i have no 128Kbps so I've always been using Lamemp3, screenie below shows all i get with that:
If i click show all formats it doesnt go above 24000Hz"Youth is wasted on the young." -
Could u tell me why u downsampled to 44100Hz and how that helped you?
http://en.wikipedia.org/wiki/MP3
A sample rate of 44.1 kHz is almost always used since this is also used for CD audio, the main source used for creating MP3 files. A greater variety of bitrates are used on the internet. 128 kbit/s is the most common since it typically offers very good audio quality in a relatively small space. 192 kbit/s is often used by those who notice artifacts at lower bitrates. By contrast, uncompressed audio as stored on a compact disc has a bit rate of 1411.2 kb/s (16 bits/sample × 44100 samples/second × 2 channels).
Also, under Mpeg Layer 3 Audio Compression i have no 128Kbps so I've always been using Lamemp3, screenie below shows all i get with that:
Here are my Lame mp3 codec settings I think i might have some wrong causing this desync help! -
Cheers Darrell, I think i gotta come clean.
I think all my Out-of-Sync edits have been down to VBR source audio now.
I can't tell if these vids I'm working on now are VBR tho. They're in a MPEG2 container which lists as VBR on the video side, and nothing on the audio side in GSpot, odd....
They work fine with uncomp wav, but when i convert it to mp3 it seems to like changing the audio duration, this is with Lamemp3 in VDB, Lamemp3 in Audacity, and FrauhofferII mp3 in Cool Edit Pro.
I seperated the video and wav file, both are the same length 59.000 secs, to combine later with AviMux-GUI.
When i convert the wav to mp3 (48 or 44.1Khz) 256Kbps CBR it changes the length to 59.040 (which needs a 25.020 FPS)
I did 2 things. Time stretched the mp3 preserving pitch to 59.000 secs, and trimmed the mp3 to 59.000 secs, but the length reverted back in both cases which is very strange.
Why when i convert a 59.000 secs wav to Lame mp3 does the length change to 59.040 secs?
This is just a 1 minute vid, I'd imagine the effect would be more pronounced if it was film-length.
How.. very... annoying!"Youth is wasted on the young." -
DVD does not use VBR audio.
I assume a PAL DVD uses MPEG2 audio.
I've given as much help as I know how to give. If you can't rip as one VOB, edit out what you don't want and encode to AVI with MP3 and the file still be insync then I don't know what else to say.
Maybe someone here from PAL land can be of more help.
EDIT: You might try using TMPGEnc to convert to AVI before trying to edit or maybe a program like AutoGK. Make sure CBR MP3 is selected. -
Thx for all the help guys. I'm gonna give SyncView a try, it can crop audio to match video length, which seems better than adjusting video FPS to match audio length in VDM.
Theres a great tutorial I'm gonna absorb here: https://forum.videohelp.com/topic307254.html"Youth is wasted on the young." -
I've just worked it out. Its not just VDM, but any application i use to make mp3s....
Its happening when i re-encode AC3/wav audio to mp3.
The culprit is surely a rounding bug from the codec (I'm using Lame but some .dlls might have got confused with FrauhofferII) or a missing Directshow or ffdshow filter, as I keep creating mismatch mp3 length from any other format it seems.
I made an xViD encode from a video i cut parts out of, but direct streamed the AC3 audio and the stream lengths were the same, and in-sync.
Edit: Problem solved if i encode the audio outside of VDM using Soopa's AVI Gain v05.
It encoded to mp3 and remuxed perfectly, see his thread here:
https://forum.videohelp.com/topic314909.html"Youth is wasted on the young."
Similar Threads
-
Delaying parts of an audio stream (vdubmod)
By denadel in forum Newbie / General discussionsReplies: 1Last Post: 24th May 2010, 06:16 -
Audio Sync Problems
By eon_designs in forum Blu-ray RippingReplies: 2Last Post: 8th Dec 2009, 09:49 -
Sync basics (DGIndex/VDubmod)
By Gew in forum Newbie / General discussionsReplies: 2Last Post: 7th Apr 2009, 02:39 -
Audio sync problem converting 2nd part VOBs->avi with VDubMod [fixed]
By blueprint in forum Video ConversionReplies: 5Last Post: 13th Dec 2007, 00:07 -
Having Problems converting h.264 mp4 to xvid using avisynth & vdubmod
By Rusty Shackleford in forum Video ConversionReplies: 3Last Post: 8th May 2007, 03:34