Evil Perl scripting

Reencoders rejoice, for I have written a script that given a v2 timecodes file and an output framerate generates an Avisynth script that converts VFRaC to CFR (much like directshowsource(convertfps=true)). It’s very evil, very slow and probably buggy. Don’t use it. I only wrote it because I was promised money for it. If you are still interested, download v0.3 here: vfr2cfr_v0.3.7z
Comes with manual and all.
Edit: not so slow anymore thanks to Plorkyeran. Should also be more accurate than before.

On the todo list: write a script that automagically remuxes segment linked/ordered chapters MKV’s to a single standard file (no virtual timeline).

Comments (4)

  1. checkers wrote:

    yay for not putting the script inline >_>

    Thursday, May 15, 2008 at 11:09 #
  2. Plorkyeran wrote:

    I rewrote the frame selection algorithm to run in O(m+n) time instead of O(m*n), which makes it approximatly 20,000 times faster for 24 minutes of 29.97 FPS video. I also tweaked the frame selection slightly to deal with rounding issues — as written, 29.97 -> 30000/1001 was doing SelectEvery(2, 0, 0) in places. With these changes it appears to do a correct identity transform in under a second, and appears to be correct for actual VFR.

    http://www.sendspace.com/file/qu1qk6

    Thursday, May 15, 2008 at 18:00 #
  3. TheFluff wrote:

    Plorkyeran: nice work! There is, however, a rather disturbing bug, namely the fact that trim(0,0) (generated by your modification) returns the entire clip. This is definitely not what you want; the only way to get just the first frame is trim(0,-1).

    I’ll hack up a quick fix for this after doing the laundry.

    Thursday, May 15, 2008 at 19:28 #
  4. TheFluff wrote:

    Fix hacked in, link updated.

    Thursday, May 15, 2008 at 20:10 #