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. |
12th December 2024, 11:24 | #1 | Link |
Registered User
Join Date: Nov 2023
Posts: 18
|
shift video to audio synch with another source
PHP Code:
Thanks! Last edited by buddha9; 16th December 2024 at 16:06. |
12th December 2024, 11:53 | #3 | Link |
Registered User
Join Date: Nov 2023
Posts: 18
|
Thanks for quick reply
I need add a +5245 (positive shift) offset frames/milliseconds to the clipv2 And what about need to -3520 (negative shift) offset frames/milliseconds? Does trim support negative values? How can I do? Has Trim function this parameter?
__________________
AviSynth+ 3.7.3 Last edited by buddha9; 12th December 2024 at 13:42. |
12th December 2024, 12:46 | #4 | Link |
Banana User
Join Date: Sep 2008
Posts: 1,066
|
Be aware that you desync with audio by "shifting" video frames:
PHP Code:
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 12th December 2024 at 12:51. |
12th December 2024, 13:29 | #5 | Link | |
Registered User
Join Date: Nov 2023
Posts: 18
|
Quote:
You can insert positive/negative millisecond values for a video/audio track. I need something like that on AVS+ Is there any addons? Thanks Trim and BlankClip aren't not good for my needs
__________________
AviSynth+ 3.7.3 Last edited by buddha9; 12th December 2024 at 13:37. |
|
12th December 2024, 13:48 | #6 | Link |
Banana User
Join Date: Sep 2008
Posts: 1,066
|
It does what you described.
Why it's not good?
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
12th December 2024, 14:22 | #7 | Link | |
Registered User
Join Date: Nov 2023
Posts: 18
|
I need possibility to shift forward/backward (specifying frames or milliseconds) video (w/o audio desynch)
It wolud be nice to have something like this Quote:
__________________
AviSynth+ 3.7.3 Last edited by buddha9; 12th December 2024 at 14:36. |
|
12th December 2024, 14:40 | #8 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,599
|
Quote:
eg. Code:
StackHorizontal(clip1, clip2.offset(5344) ) Code:
function Offset(clip c, int "frames") { frames = Default(frames, 0) c1=BlankClip(c,length=frames)+c return c1 } |
|
12th December 2024, 14:42 | #9 | Link | |
Registered User
Join Date: Nov 2023
Posts: 18
|
Quote:
does it work with a negative need?
__________________
AviSynth+ 3.7.3 |
|
12th December 2024, 14:46 | #10 | Link | |
Banana User
Join Date: Sep 2008
Posts: 1,066
|
Quote:
And of course MKVToolNix doesn't do such nonsense.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 12th December 2024 at 14:49. |
|
12th December 2024, 14:52 | #11 | Link |
Registered User
Join Date: Nov 2023
Posts: 18
|
Example:
You have a movie (OPEN MATTE version). [vid1] You have also the same movie but "standard" version. [vid2] These 2 are from different sources. Vid1 from HDTV, vid2 from DVD. Same FPS but the "real" movie (on vid2) starts after some milliseconds comparing with first version [vid1] You can play with Audacity. But my solution (with AVS+) is more "visual" PHP Code:
__________________
AviSynth+ 3.7.3 Last edited by buddha9; 12th December 2024 at 17:52. |
12th December 2024, 15:26 | #13 | Link | |
Registered User
Join Date: Nov 2023
Posts: 18
|
Quote:
PHP Code:
Thanks so much! Ps maybe do you have also a version with milliseconds?
__________________
AviSynth+ 3.7.3 Last edited by buddha9; 12th December 2024 at 15:31. |
|
12th December 2024, 15:28 | #14 | Link |
Banana User
Join Date: Sep 2008
Posts: 1,066
|
Then we back again, why Trim and BlankClip is not good for you?
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
12th December 2024, 17:02 | #16 | Link | |
Registered User
Join Date: Nov 2023
Posts: 18
|
Quote:
I calculate ms (difference btw 2 points on timeline) with help of AVS+ status bar Thans so much for support! PHP Code:
__________________
AviSynth+ 3.7.3 Last edited by buddha9; 12th December 2024 at 17:06. |
|
12th December 2024, 21:13 | #17 | Link |
Banana User
Join Date: Sep 2008
Posts: 1,066
|
So, in the end BlankClip IS good.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
13th December 2024, 02:40 | #18 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,042
|
Nifty Offset() function PDR.
Possibility of 0 or -ve Length not mentioned on Wiki. Some time ago, Pinterf [EDIT: qyot27] was gonna throw error (I think) on BlankClip(Length=0), because it caused some problem if not used correctly. I was a bit miffed about it (I used Length=0 in some scripts), but accepted decision to make it illegal, but then I think he changed his mind and accepted as legal again. Looks like he also allowed for -ve length [as your Offset() func works], maybe could do with a mention of it on wiki. [Dont know if Length=-ve also accepted in v2.60 Std or v2.58.] EDIT: I think the problem with allowing 0 length clip was the possibility of trying to display a zero length clip in VDub/Player which caused some kind of exception/illegal instruction. [but only if used incorrectly, ie trying to show a 0 len clip] BlankClip on Wiki:- http://avisynth.nl/index.php/BlankClip
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 13th December 2024 at 17:33. |
13th December 2024, 03:06 | #19 | Link | |||
Registered User
Join Date: Sep 2007
Posts: 5,599
|
Quote:
Honestly I had no idea (-) would work. I just wrapped VoodooFX's suggestion into a helper function. ( "Wrapped" because some people like presents to be wrapped this time of year ) Quote:
https://github.com/AviSynth/AviSynth...aa2621d4b333a8 Quote:
Code:
a=colorbars().trim(0,9).showframenumber() #10 total frames #a.offset(-9) #works; 1 total frame #a.offset(-10) #zero frames # error message in avspmod about display_pitch, but still usable , can edit script, open other videos # vdub2 doesn't crash , still usable, can open other scripts/videos # mpchc doesn't crash, still usable, can open other vids/scripts |
|||
13th December 2024, 17:46 | #20 | Link | |||||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,042
|
by ssS
Quote:
by PDR Quote:
https://github.com/AviSynth/AviSynth...eee829223d1d54 Avisynth Developement thread, post about illegal Length=0, https://forum.doom9.org/showthread.p...58#post1986258 And a thread from about same time as above changes about Length=0, actually using Length=0 example. https://forum.doom9.org/showthread.p...D0#post1986352 Post in avs/devs where qyot27 got a bit spooked by the Length=0 whotsit Quote:
Post in avs/devs where qyot27 reverted from the illegal Length=0 thingy. Quote:
Quote:
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 13th December 2024 at 17:58. |
|||||
Thread Tools | Search this Thread |
Display Modes | |
|
|