Robert Martens
7th November 2017, 06:48
Download (https://github.com/ItEndsWithTens/SickJumps/releases)
Speed ramping for Avisynth. Or "time remapping" if you want to sound smart. This plugin:
Processes both video and audio
Lets you specify how long, in seconds, each output ramp should last
Allows separate start and end speeds (e.g. start at 1x, speed up to 8x, then come back down to 3x on the way out)
Optionally sets a script variable per-frame for the runtime environment, should you want to overlay the current input frame number, or the speed multiplier (sample script included with source)
Keeps no state between GetFrame or GetAudio calls, and should be MT friendly, assuming I haven't done too many ass-backward things
Requires Avisynth 2.6 or Avisynth+, as well as the Visual C++ 2015 Redistributable. I won't link that here, new versions are released periodically and the link would get stale quickly.
Time to brush the cobwebs off this account! According to the little widget I haven't logged in for over two years. Yikes. Not trying to be a stranger, just not much going on plugin wise.
Until now! Like so many people I've caught the Let's Play bug, and a video I worked on back in September called for some fast-forwards. Almost ten hours of wandering around a custom Quake map (The Forgotten Sepulcher, from the latest update to Arcane Dimensions; if you like old games but haven't played it, get to stepping (http://simonoc.com/pages/design/sp/ad.htm)) had me desperate to save people the trouble. Plain cuts would have been serviceable, but they lose the ability to see what I did during the lost time. Speed increases are a nice compromise, since if they're not too severe you can still get a sense of where the player's going and what they're doing; that's my main focus with the videos I upload, to show mappers and modders what an ordinary rube does when he plays their map sight unseen.
In the past I'd either jumped straight to full speed, or stepped up in big chunks, but I wanted a smooth increase this time, for my fanciest pants production yet. Researching the issue led me to a couple of threads:
https://forum.doom9.org/showthread.php?t=151567
https://forum.doom9.org/showthread.php?p=1512077
What I could piece together from those, unfortunately, didn't process both video and audio, let me dictate the output timing (i.e. specify that the resulting ramp should take X seconds), or allow non-linear ramps. I haven't managed to crack that last one yet, since my first attempt used Invoke to call Avisynth's Spline function, but after a bit I had to refactor some things and that became unfeasible. I could have replaced it with my own straight C++ spline function, but I would have had to write tests and make sure everything worked as expected, and I was burning out on this project, so I just stripped that out for now. I only mention it because it was a motivation to write a custom solution.
That solution started as a script, trying to harness ChangeFPS and TimeStretch, but I couldn't beat the latter into submission in that form, with audio blips all over the place. I eventually decided to bite the bullet, abandon my dream of pitch preservation, and just write a plugin. About two weeks after recording that gameplay footage, I'd finished a hacky preliminary version, put the video together, and uploaded it: https://www.youtube.com/watch?v=8GKwLZZATVI See the description for some timestamps marking various points of interest, namely the speed changes.
After that, I had a Quake map of my own to get back to making, but I wanted this plugin polished up and released first. We all know how that goes. "A few last fixes" turns into "tangents and distractions and rabbit holes, oh my", and suddenly it's been literally five more weeks. Bit of advice: when the Avisynth header says INT24 audio "is a stupid thing to code", it's not kidding. Jesus Christ. I still don't know if I'm testing that right, but it sounds like it works, so yay! Let's turn off the lights and leave before everything blows up.
As much fun as I've had here over the years learning Avisynth, and tinkering with plugins, I can't say I'll definitely be hanging around more frequently than I have since 2015, but I found this plugin useful, and thought it was worth sharing. Enjoy! Or don't, I'm not your mother.
Speed ramping for Avisynth. Or "time remapping" if you want to sound smart. This plugin:
Processes both video and audio
Lets you specify how long, in seconds, each output ramp should last
Allows separate start and end speeds (e.g. start at 1x, speed up to 8x, then come back down to 3x on the way out)
Optionally sets a script variable per-frame for the runtime environment, should you want to overlay the current input frame number, or the speed multiplier (sample script included with source)
Keeps no state between GetFrame or GetAudio calls, and should be MT friendly, assuming I haven't done too many ass-backward things
Requires Avisynth 2.6 or Avisynth+, as well as the Visual C++ 2015 Redistributable. I won't link that here, new versions are released periodically and the link would get stale quickly.
Time to brush the cobwebs off this account! According to the little widget I haven't logged in for over two years. Yikes. Not trying to be a stranger, just not much going on plugin wise.
Until now! Like so many people I've caught the Let's Play bug, and a video I worked on back in September called for some fast-forwards. Almost ten hours of wandering around a custom Quake map (The Forgotten Sepulcher, from the latest update to Arcane Dimensions; if you like old games but haven't played it, get to stepping (http://simonoc.com/pages/design/sp/ad.htm)) had me desperate to save people the trouble. Plain cuts would have been serviceable, but they lose the ability to see what I did during the lost time. Speed increases are a nice compromise, since if they're not too severe you can still get a sense of where the player's going and what they're doing; that's my main focus with the videos I upload, to show mappers and modders what an ordinary rube does when he plays their map sight unseen.
In the past I'd either jumped straight to full speed, or stepped up in big chunks, but I wanted a smooth increase this time, for my fanciest pants production yet. Researching the issue led me to a couple of threads:
https://forum.doom9.org/showthread.php?t=151567
https://forum.doom9.org/showthread.php?p=1512077
What I could piece together from those, unfortunately, didn't process both video and audio, let me dictate the output timing (i.e. specify that the resulting ramp should take X seconds), or allow non-linear ramps. I haven't managed to crack that last one yet, since my first attempt used Invoke to call Avisynth's Spline function, but after a bit I had to refactor some things and that became unfeasible. I could have replaced it with my own straight C++ spline function, but I would have had to write tests and make sure everything worked as expected, and I was burning out on this project, so I just stripped that out for now. I only mention it because it was a motivation to write a custom solution.
That solution started as a script, trying to harness ChangeFPS and TimeStretch, but I couldn't beat the latter into submission in that form, with audio blips all over the place. I eventually decided to bite the bullet, abandon my dream of pitch preservation, and just write a plugin. About two weeks after recording that gameplay footage, I'd finished a hacky preliminary version, put the video together, and uploaded it: https://www.youtube.com/watch?v=8GKwLZZATVI See the description for some timestamps marking various points of interest, namely the speed changes.
After that, I had a Quake map of my own to get back to making, but I wanted this plugin polished up and released first. We all know how that goes. "A few last fixes" turns into "tangents and distractions and rabbit holes, oh my", and suddenly it's been literally five more weeks. Bit of advice: when the Avisynth header says INT24 audio "is a stupid thing to code", it's not kidding. Jesus Christ. I still don't know if I'm testing that right, but it sounds like it works, so yay! Let's turn off the lights and leave before everything blows up.
As much fun as I've had here over the years learning Avisynth, and tinkering with plugins, I can't say I'll definitely be hanging around more frequently than I have since 2015, but I found this plugin useful, and thought it was worth sharing. Enjoy! Or don't, I'm not your mother.