Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th December 2024, 21:26   #1  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 324
vspreview with vs_align

Like I mentioned before, I have different videos that I want to compare to, but they are out of sync. How do I use vs_align to perfectly align the videos in vspreview?

https://github.com/pifroggi/vs_align
jay123210599 is offline   Reply With Quote
Old 15th December 2024, 03:03   #2  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 364
Again, vs_preview has nothing to do with your thread questions, it is just a previewer that previews whatever is set for output in you vapoursunth/ python script, you confuse yourself and others.

from vs_align, I did not install it, just looked in manual, after you install pytorch and numpy (for precision=1 you might not need that, not sure, it looks like frame stats are used only), you might use temporal alignment,
Code:
clip = vs_align.temporal(clip, ref)
where clip is misaligned clip and ref is "normal" clip (your reference clip), precision=1 is default. Those two videos should be almost identical, just misaligned for precision=1. If those two videos differ in quality and colors a lot, you'd need to choose precision 2 or even 3.
Then, at the end of your script, you set both outputs, clip and ref and compare them in your previewer selecting particular outputs.
_Al_ is offline   Reply With Quote
Old 15th December 2024, 03:20   #3  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 364
but for a simple clips misaligning of your clips you can use trim or slice feature and do it manually,

Code:
clip=core.lsmas.LWLibavSource(r"misaligned.mkv")
ref=core.lsmas.LWLibavSource(r"ref_version.mkv")
#guessing ref is 15 frames ahead of clip, so cut those 15 frames from ref's beginning
ref = ref[15:]
#guessing  clip is 15 frames ahead of ref, so cut those 15 frames from clip's beginning
#clip = clip[15:]
clip.set_output()
ref.set_output(1)
so by error and trial you come up with fine value to match them
_Al_ is offline   Reply With Quote
Old 15th December 2024, 14:42   #4  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 324
I have 5 videos/clips.
jay123210599 is offline   Reply With Quote
Old 15th December 2024, 15:23   #5  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,600
Quote:
Originally Posted by jay123210599 View Post
I have 5 videos/clips.
Align each one to the reference
poisondeathray is offline   Reply With Quote
Old 15th December 2024, 22:08   #6  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 324
Quote:
Originally Posted by poisondeathray View Post
Align each one to the reference
Which video should be the reference?
jay123210599 is offline   Reply With Quote
Old 15th December 2024, 22:33   #7  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 364
It does not matter. Your choice. Maybe the best quality. But it has to be explained that way, what is reference video and and what video is adjusted.
_Al_ is offline   Reply With Quote
Old 15th December 2024, 22:54   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,600
I would choose that has the most similar shared frames to the others as reference

e.g if you have 5 versions, perhaps different edits, different cuts - pick the one that the most shared frames with all the others . If you pick one that has the most missing frames compared to the others, it will not be as good candidate for reference
poisondeathray is offline   Reply With Quote
Reply

Tags
scripts, vapoursynth, video comparison, video player

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.