Quantcast VirtualDub: Audio Sync and Bad Frames in Divx - digitalFAQ.com Forums [Archives]
  #1  
02-25-2003, 12:12 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
Hi, I have a DivX file with CBR mp3 audio with some visible bad frames and freezes in it when I watch it in media player. After the freezing there is some audio sync for maybe a minute but then it suddenly resolves itself. However when I make my KVCD using this avi the audio stays out of sync after hitting the error point. Loading the avi in VDub I tried Scan Video Stream For Errors but it found none. Can someone please tell me a step-by-step guide as to what I should do to fix this? Thanks!

Update: I just rried VDubMP3freeze to check video for freezes and it said there were none! Now I'm really at a loss as to what to do... However DivFix DOES say there are erorrs, but when I rebuild the index the resulting file is not playable in WMP (I did check on remove bad frames). Help me pleeeeease!
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
03-11-2003, 12:50 PM
PyRoMaNiA PyRoMaNiA is offline
Free Member
 
Join Date: Jan 2003
Location: a PAL land (UK)
Posts: 408
Thanks: 0
Thanked 0 Times in 0 Posts
Open DivFix and scan for bad frames. Then open VirtualDub and click Edit, Go to...take your first DivFix bad frame and subtract 1. Type this number in VirtualDub, then click Edit, Set Selection Start. Now press Edit, Go to... again and add 1 to your first DivFix bad frame, type in this number. Click Edit, Set Selection end. Then press Delete. Repeat the process with every bad frame that DivFix found, then click Video, Direct Stream Copy and Audio, Direct Stream Copy, then save your fixed AVI.

Hope this helps.
Reply With Quote
  #3  
03-11-2003, 12:53 PM
CheronAph CheronAph is offline
Free Member
 
Join Date: Feb 2003
Location: Espoo, Finland
Posts: 494
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to CheronAph
Thanks for the tip Pyro!
__________________
¨¨°º©©º°¨¨°º©CHERONAPH©º°¨¨°º©©º°¨¨
Reply With Quote
  #4  
03-11-2003, 07:31 PM
urban tec urban tec is offline
Free Member
 
Join Date: Nov 2002
Location: West Australia
Posts: 272
Thanks: 0
Thanked 0 Times in 0 Posts
This is what I use if I have a similar problem, basically it uses an avs script to cut out the bad frames and keep the audio in sync.

I do not take credit for writing this, I copied it from a post I saw here and now I cant remember who posted it, if they see this Thanks.

Here is the original script

Code:
LoadPlugin("E:\DVD Backup\2 - DVD2SVCD\MPEG2Dec\MPEG2DEC2.dll") 
# 
# ------ avi File Number 1 ------ 
video=avisource("D:\Temp\movie01.avi") 
audio=WAVSource("D:\Temp\audio01.wav") 
# 
# ------ Remove A/V Frames in File 1 ------ 
part1=trim(AudioDub(video,audio),0,12620) 
part2=trim(AudioDub(video,audio),15575,21844) 
part3=trim(AudioDub(video,audio),30009,62366) 
part4=trim(AudioDub(video,audio),63509,0) 
clip1=part1+part2+part3+part4 
# 
# ------ avi File Number 2 ------ 
video2=avisource("D:\Temp\movie02.avi") 
audio2=WAVSource("D:\Temp\audio02.wav") 
clip2=AudioDub(video2,audio2) 
# 
# ------ avi File Number 3 ------ 
video3=avisource("D:\Temp\movie03.avi") 
audio3=WAVSource("D:\Temp\audio03.wav") 
clip3=AudioDub(video3,audio3) 
# 
# ------ avi File Number 4 ------ 
video4=avisource("D:\Temp\movie04.avi") 
audio4=WAVSource("D:\Temp\audio04.wav") 
clip4=AudioDub(video4,audio4) 
# 
# ------ Join All avi Files ------ 
unalignedsplice(clip1,clip2,clip3,clip4) 
# 
# ------ Resize ------ 
LegalClip() 
Grip(704,480,overscan=1) 
GripSize() 
TemporalSmoother(2,2) 
GripBorders() 
LegalClip() 

The wav file are used to keep it in sync with video when using Trim 
to remove frames. I use this with Tmpgenc to encode audio and video.
And here is a copy of a more simplified version I used recently

Code:
LoadPlugin("C:\Program Files\AviSynth2\plugins\MPEG2DEC.dll")
LoadPlugin("C:\Program Files\AviSynth2\plugins\fluxsmooth.dll")
LoadPlugin("C:\Program Files\AviSynth2\plugins\blockbuster.dll")
LoadPlugin("C:\Program Files\AviSynth2\plugins\legalclip.dll")
LoadPlugin("C:\Program Files\AviSynth2\plugins\GripFit_preview.dll")
LoadPlugin("C:\Program Files\AviSynth2\plugins\Sampler.dll")

video=Mpeg2Source("D:\encode\movie.d2v")
audio=WAVsource("D:\encode\movie.wav")



part1=trim(AudioDub(video,audio),0,45113)
part2=trim(AudioDub(video,audio),45122,0)

unalignedsplice(part1,part2)

LegalClip()
GripCrop(352, 288, source_anamorphic=false)
GripSize(resizer="BilinearResize")
FluxSmooth()
BlockBuster(method="noise")
GripBorders()
LegalClip()

#Sampler(length=24)
I was getting divide by zero errors in Tmpg and this was the only way I could get around it after trying everything else.

Hope this helps.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording Video: Dropped Frames and Audio sync errors! the viking Video Capturing / Recording 19 01-06-2005 10:42 AM
audio gets out of sync merging in VirtualDub? bigggt Video Encoding and Conversion 3 08-21-2004 05:34 PM
Audio sync problem, but no bad frames in xvid? pixeldotz Video Encoding and Conversion 3 05-16-2003 11:12 AM
VirtualDub: Bad frames how to cut out and keep audio in sync reman Video Encoding and Conversion 8 12-11-2002 04:07 PM
VirtualDub: Audio sync problems andybno1 Video Encoding and Conversion 3 07-30-2002 07:15 PM

Thread Tools



 
All times are GMT -5. The time now is 01:04 PM  —  vBulletin © Jelsoft Enterprises Ltd