[FFmpeg-devel] libavformat / vapoursynth update

Stefan Oltmanns stefan-oltmanns at gmx.net
Sun Jun 16 01:19:29 EEST 2024


Hello,

I updated the VapourSynth input module from the old API to the "new" API
(the "new" API was introduced 4 years ago).

The greatest advantage of the new API is, that it requires only a single
import from the VapourSynth library, optimizing it for runtime loading
instead of linking to the library during the build process.

Currently almost no one builds ffmpeg with VapourSynth enabled:
Understandable, because VapourSynth is not just an external library, but
an entire application with its own dependencies. Making ffmpeg load the
VapourSynth library at runtime only when a VapourSynth script is opened
would allow building ffmpeg binaries with VapourSynth enabled, that do
not require VapourSynth to be installed on the user system (unless the
user would want to open a VapourSynth script).

I have already successfully tested this approach on different platforms
(Linux, macOS and partly Windows).

There are a few options on how to do it exactly:

-Remove linking at build time all together and disable VapourSynth on
platforms that do not support LoadLibrary or dlopen (as VapourSynth is
based on plug-ins, on platforms that do not have these function it won't
work at all) or make it selectable at build time.

-Include the header files directly in ffmpeg (VapourSynth is LPGL 2.1 or
later just like ffmpeg, so no license issue), this would allow for
building ffmpeg with VapourSynth support without the need to have
VapourSynth installed on the build machine. The alternative would be to
use the header files installed on the system if available.
(In case additional files should be avoided, the header files could of
course be copied into the vapoursynth.c, or at least merged into a
single header file).

What do you think about this? Should I prepare a patch for this? What
option should I choose?

Best regards,
Stefan


More information about the ffmpeg-devel mailing list