Skip to content

Instantly share code, notes, and snippets.

@motbob
Created September 21, 2019 19:51
Show Gist options
  • Save motbob/00377df14a2ffb293e577c0b8c8e9bd8 to your computer and use it in GitHub Desktop.
Save motbob/00377df14a2ffb293e577c0b8c8e9bd8 to your computer and use it in GitHub Desktop.
import vapoursynth as vs
core = vs.get_core()
import mvsfunc as mvf
offset = 3000
n = 10
space = 1000
width = 1920
height = 1080
video2 = core.lsmas.LWLibavSource(source=r"C:\Storage\Downloads\Zoku・Owarimonogatari\BDMV\STREAM\00001.m2ts")[24:]
video1 = core.ffms2.Source(source=r"C:\Storage\Downloads\Work\zokuowari\01\resync.mkv")
#video2 = core.ffms2.Source(source=r"C:\Storage\Downloads\Work\random stuff\spice2\OVA\[Okay-Raws] Spice and Wolf II - OVA.mkv")
video1 = core.resize.Spline36(video1, width=width, height=height, format=vs.RGB24, matrix_in_s="709", dither_type="error_diffusion")
video2 = core.resize.Spline36(video2, width=width, height=height, format=vs.RGB24, matrix_in_s="709", dither_type="error_diffusion")
blank1 = core.std.BlankClip(width=width, height=height, format=vs.RGB24, length=1, fpsnum=24000, fpsden=1001)
blank2 = core.std.BlankClip(width=width, height=height, format=vs.RGB24, length=1, fpsnum=24000, fpsden=1001)
for i in range(1, n+1):
blank1 += video1[offset + int(i*space)]
blank2 += video2[offset + int(i*space)]
shots = core.imwri.Write(blank1[1:], 'PNG', r'C:\Users\motbob\Desktop\image comparisons\MTBB%02d.png')
shots = shots + core.imwri.Write(blank2[1:], 'PNG', r'C:\Users\motbob\Desktop\image comparisons\source%02d.png')
shots.set_output()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment