03.09.2024, 04:37
Porting:
to Vapoursynth should be easy.
Should be:
So you could save that in a file named replaceframes.py (in your 'Hybrid/64bit/vsscripts'-folder) and then use it in a custom section through:
Got no time to test, but this should work.
One could also use https://github.com/Irrational-Encoding-W...emapFrames in a custom section.
Cu Selur
function ReplaceFrames(clip source, int start1, int end1, int start2, int end2) {
# Extraire les segments à garder
segment1 = source.Trim(0, start1 - 1)
segment2 = source.Trim(start2, end2)
segment3 = source.Trim(end1 + 1, source.FrameCount - 1)
# Assembler les segments
return segment1 ++ segment2 ++ segment3
}
Should be:
def ReplaceFrames(clip: vs.VideoNode, start1: int, end1: int, start2: int, end2: int) -> vs.VideoNode:
# Extraire les segments à garder
segment1 = source.Trim(0, start1 - 1)
segment2 = source.Trim(start2, end2)
segment3 = source.Trim(end1 + 1, source.num_frames - 1)
# Assembler les segments
return segment1 + segment2 + segment3
}
import replaceframes
# Remplacement des frames 43125 à 43129 par 43120 à 43124
clip = replaceFrames.ReplaceFrames(clip, 43125, 43129, 43120, 43124)
# Remplacement des frames 43301 à 43304 par 43275 à 43278
clip = replaceFrames.ReplaceFrames(clip, 43301, 43304, 43275, 43278)
# Remplacement de la frame 22261 par 22257
clip = replaceFrames.ReplaceFrames(clip, 22261, 22261, 22257, 22257)
# Remplacement de la frame 22262 par 22257
clip = replaceFrames.ReplaceFrames(clip, 22262, 22262, 22257, 22257)
# Remplacement de la frame 22263 par 22256
clip = replaceFrames.ReplaceFrames(clip, 22263, 22263, 22256, 22256)
# Remplacement de la frame 22264 par 22258
clip = replaceFrames.ReplaceFrames(clip, 22264, 22264, 22258, 22258)
# Remplacement de la frame 22437 par 22441
clip = replaceFrames.ReplaceFrames(clip, 22437, 22437, 22441, 22441)
# Remplacement de la frame 22438 par 22442
clip = replaceFrames.ReplaceFrames(clip, 22438, 22438, 22442, 22442)
# Remplacement de la frame 22439 par 22443
clip = replaceFrames.ReplaceFrames(clip, 22439, 22439, 22443, 22443)
# Remplacement de la frame 22440 par 22444
clip = replaceFrames.ReplaceFrames(clip, 22440, 22440, 22444, 22444)
# Remplacement de la frame 22454 par 22453
clip = replaceFrames.ReplaceFrames(clip, 22454, 22454, 22453, 22453)
clip = replaceFrames.ReplaceFrames(clip, 22440, 22440, 22444, 22444)
return clip
One could also use https://github.com/Irrational-Encoding-W...emapFrames in a custom section.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.