Finally the first test version of audio support is ready and this post will describe how it works. Spoiler: It doesn’t work like in Avisynth.
In Python scripts audio nodes are just another unique type. They aren’t stuck together with a video track like in Avisynth. This can be both an advantage and a disadvantage, for example cutting audio and video at the same time by frame numbers will currently require a bit of user scripting. On the other hand with the correct helper functions it’ll be possible to manipulate multiple audio and video tracks as a group easily. Audio also always has a constant format unlike video.
Feedback and downloads are on the Doom9 forum as usual for highly experimental things.
- BestAudioSource – a new sample accurate but somewhat slow FFmpeg based source filter (usage: core.bas.Source(“rule6.mp4”))
- BlankAudio – a classic
- AudioSplice and AudioTrim – with the expected Python overloads of course
- VSPipe – outputs raw pcm audio and using the -y switch adds wave64 headers
- AVFS – uses the audio node assigned to output slot 1
- VFW – uses the audio node assigned to output slot 1 and video must be assigned to slot 0
An output example
import vapoursynth as vs
audio = vs.core.bas.Source("somefile.mp3", track=-1)
video = vs.core.std.BlankClip()
API Notes and Changes
Currently the API isn’t completely stable but only minor changes are expected at this point so starting to port plugins. The only mildly breaking change is that the clip type in function argument strings now has been renamed to vnode and obviously the new anode type has been introduced which may confuse existing software tries to parse the argument strings.
The best way to think of audio nodes is as a type completely separate from video nodes that only happen to share some functions to manipulate them. For example you can’t mix audio and video nodes in the same VSMap key or in any other context.
After several weeks of testing R48 is finally done. As you may suspect from the title the biggest change this time is optimizations. Now most internal functions have proper AVX2 optimizations and in addition to that the Expr filter was greatly improved and can now rewrite and optimize expressions much better. In addition to that a lot of bugs were fixed and the installer got a few more options. Users of R47 should definitely upgrade.
Since R46 was a release with some big changes in regards to the installer this one simply cleans up all the minor issues that were found. And one annoying zimg bug that could cause a crash on some invalid conversions.
- All assembler was removed in favor of intrinsics, this means that x86inc.asm will no longer be installed as a public header
- NASM obviously isn’t required anymore
The yearly slowdown is over so now it’s time for a maintenance release which will probably still manage to introduce a lot of new issues due to the windows installer changes. Here’s a list of the main changes:
- Separate installers for 32 and 64 bit
- It’s now possible to install without administrator privileges
- The Python module is now a proper package
As usual there are also a few possibly breaking changes:
- The 32 bit VapourSynth registry entries are now stored in a key called VapourSynth-32 in order to better distinguish it from the 64 bit version
- The installer no longer installs the VS2013 runtimes by default due to VapourSynth not actually needing them for many years
I finally made a new release. It’s extremely not so exciting maintenance and switches to Python 3.7 on windows. VSRepo also happens to be included just as an experiment so go try it out for all your plugin and script installation needs.
I’ve spent the past two weeks writing a simple package manager for VapourSynth called VSRepo. It can already install most common plugins and scripts with all of their dependencies. Installing havsfunc is no longer a treasure hunt across the internet!
Go visit the doom9 thread where the link to the latest test versions are posted if you want to try it out or help add more plugins and scripts. The plan is to include it in the installer with the next VapourSynth release.
There’s a new maintenance release and it updates a few things and fixes some minor issues. Upgrading is recommended. The more interesting news will be in the next post.
It’s that time of the year again. Expect huge slowdowns in development.
R41 changed quite a few things internally and that created regressions. New zimg branch, added alpha support and a pile of changes behind the scenes in the python module caused problems. The release fixes several zimg bugs, a vspipe hang on error, vsscript functions not being threadsafe and a few more things.
Possibly (un)breaking changes:
- get_output() in python only returns a tuple when alpha is set, this more or less restores the previous behavior
This release fixes a VSScript regression when setting variables that would make players like mpv fail in R41. Go upgrade!
Another crash bug managed to sneak into the optimized transpose so one more regression fixed now. (the +.1 update)