I’ve been experimenting with Andrew Kelley’s zig fork of ffmpeg, and so far so good.
But I’m wondering, how can I compile this zig fork with just a few codecs?
One way to do this in the standard ffmpeg build is to pass this flag to the compiler, and the flags of what you want to compile: “–disable-all”
I see that in ffmpeg’s zig.build there is a “config_components_h” structure, which has values such as: " .CONFIG_VORBIS_DECODER = true", will it be enough to just disable them with false? Or are there other configuration files apart from build.zig.zon and build.zig that I should check?
Thanks.
The codecs need to have options exposed in the build script like this and then based on those new options, the corresponding config values need to be updated.
Of course if you only want to experiment then you can fork and hard code the changes you want to test. What I described above could be contributed upstream and maintained by the aycb community.
Hey, thanks, that did the trick.
But, I found out that actually the zig implementation of ffmpeg is already pretty well optimized.
What I was aiming for was to reduce the resulting fast mode executable, but removing codecs doesn’t have much impact on that. It would be better to remove libraries. But due to the nature of my program, there are no libraries to remove. So it all comes down to the type of task one wants to implement.