Quantcast Avisynth: Ensurevbrmp3sync - digitalFAQ.com Forums [Archives]
  #1  
02-06-2003, 07:41 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
How does this filter work?
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  
02-07-2003, 04:34 AM
Fiz Fiz is offline
Free Member
 
Join Date: Jan 2003
Location: London, UK
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
I had to use this for the first time recently. It maintains audio sync with the video.

My situation was I had a divx avi in 3 parts, plus a deleted scene.

My aim was to include the deleted scene into the video and trim off some excess from the end and in between. So my avs script looked like this.

Code:
plugindir = "D:\Avisynth\"
LoadPlugin(plugindir + "mpeg2dec.dll") 
LoadPlugin(plugindir + "GripFit_preview.dll") 
LoadPlugin(plugindir + "blockbuster.dll") 
LoadPlugin(plugindir + "legalclip.dll") 
LoadPlugin(plugindir + "sampler.dll") 
LoadPlugin(plugindir + "dustv5.dll") 
LoadPlugin(plugindir + "temporalcleaner.dll") 


disc1=AviSource("D:\DivX\LDisc1.avi") 
disc2=AviSource("D:\DivX\LDisc2.avi") 
disc3=AviSource("D:\DivX\LDisc3.avi") 
delscenes=AviSource("D:\DivX\LDelscenes.avi") 

part1=disc1.trim(0,147972)
part2=disc2.trim(1000,41460)
part3=delscenes.trim(0,26577)
part4=disc2.trim(41461,121691)
part5=disc3.trim(0,49103)


movie = fizconvert(part1+part2+part3+part4+part5).sampler(length=24)

return movie


function FizConvert(clip l)
{
return l.ConvertToYUY2().
\LegalClip().
\GripCrop(528, 576, overscan=2).
\GripSize().
\SpaceDust().
\TemporalCleaner().
\LegalClip()
}
The video was formed perfectly and I then loaded the AVS into vdub and did a save WAV. The problem I had was that whereever I had trimmed the video and the start frame was not 0, the audio had not trimmed at the right place. I was forever confused as to why some parts of the movie were completely out of sync.

I then used EnsureVBRMP3Sync in the line before each trim
e.g.
part2=disc2.EnsureVBRMP3Sync.trim(1000,41460)

and did an audio extract from vdub. Hey presto, it was perfectly in sync!

Hope this helps.
__________________
Fizzy Wizzy Lets get Bizzy!
Reply With Quote
  #3  
02-07-2003, 02:09 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
Hey that helps me a lot! I wasn't loading my .avs into vdub- just the appended avi's- so I guess that's why this filter wasn't working btw- that's a very cool script
Reply With Quote
  #4  
02-10-2003, 04:26 AM
Fiz Fiz is offline
Free Member
 
Join Date: Jan 2003
Location: London, UK
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
thanks , I'm trying to create all my avs scripts with a similar template. I know the filters I want to use so I keep them in a function and only change the bits at the top. Still learning the ropes though!
__________________
Fizzy Wizzy Lets get Bizzy!
Reply With Quote
Reply




Thread Tools



 
All times are GMT -5. The time now is 06:12 AM  —  vBulletin © Jelsoft Enterprises Ltd