Hi everyone,
I heard that some people use a AVS script to compare two videos and synchronize them by matching them, then they save and work the audio track.
Can anyone tell me which script to use, please?
Thanks
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 15 of 15
Thread
-
-
With the script I was able to compare the two videos but I don't know how to calculate the frame difference, does anyone have a video guide, please?
-
Open a script like this in VirtualDub:
Code:v1 = LWlibavVideoSource("video1.ext").ShowFrameNumber() v2 = LWlibavVideoSource("video2.ext").ShowFrameNumber() StackHorizontal(v1, v2)
-
I copied the text and saved in .avs file this VirtualDub error
[Attachment 59427 - Click to enlarge]
in AvsPmod.exe i am using this script
a=DSS2("C:\video\file1.mkv").blackmanresize(688,49 6)
b=DSS2("C:\video\file2.mkv").blackmanresize(688,49 6)
finala=Trim(a,0,0)
finalb=Trim(b,0,0)
Stackhorizontal(finala, finalb)
but then I don't know how to go on -
You have to install the LSMASH source plugin to use LWlibavVideoSource(). Since you have DSS2() working you can just use that.
Find some identifiable frame near the start of the video -- as shot change, a spot on the film, whatever. Identify which frame it is in each video. Calculate the difference, then add that to one of your trims. For example, if the identified frame is at frame 100 in video A, but at 110 in video b, the difference is 10 frames. So remove 10 frames from the beginning of video B:
Code:a=DSS2("C:\video\file1.mkv").blackmanresize(688,49 6) b=DSS2("C:\video\file2.mkv").blackmanresize(688,49 6) finala=Trim(a,0,0) finalb=Trim(b,10,0) Stackhorizontal(finala, finalb)
-
After I find the frame of video A I can't figure out how to see the frame of video B because they move together and I can't remember exactly the frame.
It would be great if you could stop the frame of Video A and slide only Video B so as to compare the same frames and calculate the difference.
I hope I have explained
Reload the script and verify the two are now synced at frame 100. Check the rest of the video to see if they remain in sync. They probably won't. In which case it gets much more complicated. -
This is where a script-based tool, such as AVISynth, is vastly inferior to gui-based NLEs. Using those, you just cut & slide the appropriate layer (having temp preset the layers to be 50%opacity), working your way through the video in near-realtime. You would be done by now.
Scott -
-
Open the 2 videos videos in two VDubs (or 2 VDub2s, no need for a script then). Find the 'marker' frame in one and then adjust the 2nd video until you find it again. Note the frame numbers at the bottom of the VDubs.
Or write down the frame numbers that you can't seem to remember. -
-
I have no idea what you're wanting to do so I have no advice.
If you want to delay the audio by the amount of the frame difference between the 2 videos, then figure out that frame difference in milliseconds and DelayAudio by the same amount. -
-
Last edited by jagabo; 14th Jun 2021 at 21:56.
-
Again, I have no idea what you're doing. Maybe someone else can help.
The problem is that probably the 2 videos do not have the same lenght, because there can be different initial and end credits, different cuts, different black portions inside the programs, etc...
To sync using avisynth is a nightmare, you have to go one small portion at the time removing/adding frames (sometimes in both of the clips).
Just to give an example, I mixed a dvd video source with an audio tv capture and ended up with someting like this :
Code:# aprire il video rai video_rai=AviSource("C:\Users\giuse\Videos\Acquisizioni\ufo_s1a_amtv.avi").killAudio() # aprire il video dvd video_dvd=AviSource("C:\Users\giuse\Videos\Acquisizioni\avs_scripts\gma\00e- match dvd\ufo_dvd_01_d2v_vfapi.avi").convertToYUY2() # sequenza video rai trimmata video_rai_trim=video_rai.trim(392,68937) # sequenza video dvd trimmata video_dvd_trim=\ video_dvd.trim( 386, 655)+video_dvd.trim( 680, 735)+video_dvd.trim( 752, 864)+video_dvd.trim( 957,1155)+video_dvd.trim( 1172, 1393)\ +video_dvd.trim( 1448, 1635)+video_dvd.trim( 1678, 1827)+video_dvd.trim( 1840, 1990)\ .loop(2,1990)\ +video_dvd.trim (1991, 2004)+video_dvd.trim( 2031, 3846)+video_dvd.trim( 3863, 9230)+video_dvd.trim( 9250,9342)+video_dvd.trim(10181,10184)\ +video_dvd.trim(10343,10535)+video_dvd.trim(10714,11694)+video_dvd.trim(11704,13489)\ .loop(2,13489)\ +video_dvd.trim(13490,13490)\ .loop(3,13490)\ +video_dvd.trim(13491,13803)+video_dvd.trim(14590,20535)+video_dvd.trim(22351,27286)\ .loop(2,27286)\ +video_dvd.trim(27287,27369)\ .loop(3,27369)\ +video_dvd.trim(27370,30237)\ .loop(15,30237)\ +video_dvd.trim(30238,41522)\ .loop(28,41522)\ +video_dvd.trim(41523,43640)\ .loop(2,43640)\ +video_dvd.trim(43641,44914)\ +video_dvd.trim(44917,45316)\ .loop(2,45316)\ +video_dvd.trim(45317,46559)+video_dvd.trim(46561,46648)\ .loop(2,46648)\ +video_dvd.trim(46649,47190)+video_dvd.trim(47192,50811)+video_dvd.trim(50819,53725)\ .loop(2,53725)\ +video_dvd.trim(53726,53886)\ .loop(2,53886)\ +video_dvd.trim(53887,63326)+video_dvd.trim(63451,64151)\ .loop(3,64151)\ +video_dvd.trim(64152,64744)\ .loop(3,64744)\ +video_dvd.trim(64745,64745)\ .loop(28,64745)\ +video_dvd.trim(64746,68392)\ .loop(3,68392)\ +video_dvd.trim(68393,68395)\ .loop(2,68395)\ +video_dvd.trim(68396,71511)+video_dvd.trim(73570,73570).crop(0,0,-10,-20).addborders(10,20,0,0)\ .loop(1462,73570).crop(0,0,-10,-20).addborders(10,20,0,0)\ ++video_dvd.trim(73861,73861)\ .loop(107,73861) # verifica allineamento sequenze #stackhorizontal(video_dvd_trim, video_rai_trim) ........... # estrazione audio da filmato rai #audio_rai=AviSource("C:\Users\giuse\Videos\Acquisizioni\ufo_s1a_amtv.avi").trim(392,68937).SoundOut() # doppiaggio video da filmato dvd e audio da filmato rai #video_dvd_trim_logo_titoli_audio_rai=audiodub(video_dvd_trim_logo_titoli, audio_rai) #return(video_dvd_trim_logo_titoli_audio_rai)
Last edited by lollo; 15th Jun 2021 at 18:28.
Similar Threads
-
Need help with writing an AviSynth script?
By EHarlen in forum RestorationReplies: 8Last Post: 28th Jun 2019, 11:54 -
Need a particular 3D avisynth script
By mazinz in forum Video ConversionReplies: 8Last Post: 25th Feb 2018, 05:55 -
Avisynth script this guy is using?
By digicube in forum RestorationReplies: 9Last Post: 24th Apr 2017, 01:41 -
Need help with AVISynth script
By duffbeer in forum DVD RippingReplies: 13Last Post: 8th Sep 2016, 17:05