Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python3
  2.  
  3. import vapoursynth as vs
  4. import easyvfr
  5. import sys
  6.  
  7. core = vs.Core()
  8. std = core.std
  9. cc = easyvfr.ChapterClip
  10.  
  11. std.LoadPlugin('G:/vsplugins/d2vsource_beta4_v2.dll')
  12.  
  13. def ivtc(clip, offset, cycle=10, tff=True):
  14.     sf = std.SeparateFields(clip, tff)
  15.     dw = std.DoubleWeave(sf, tff)
  16.     return std.SelectEvery(dw, cycle, offset)
  17.  
  18. def bob(clip, tff=True):
  19.     sf = std.SeparateFields(clip, tff)
  20.     return core.resize.Bicubic(sf, height=clip.height)
  21.  
  22. src = core.d2v.Source(r"D:\Source\sample_01.d2v", nocrop=True)
  23.  
  24. clips = []
  25. for f in range(500):
  26.     clips.append(ivtc(src[f * 100: f * 100 + 40], [1, 4, 6, 9]))
  27.     clips.append(src[f * 100 + 40: f * 100 + 70])
  28.     clips.append(bob(src[f * 100 + 70: f * 100 + 100]))
  29.  
  30. clips = [cc(clips[i], name='%05i' % i) for i in range(len(clips))]
  31.  
  32. vfr = easyvfr.EasyVFR(core, clips)
  33. vfr.write_tcq(r"G:\workspace\easy_test")
  34. last = vfr.splice_clips()
  35. last.output(sys.stdout, y4m=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement