ffmpeg.ffmpeg
importFFmpeg 8.1.2 C++ modules for mcpp (import ffmpeg.av;) on top of the compat.ffmpeg source build
import ffmpeg.av;
Module name taken from the upstream manifest's own description.
mcpp add ffmpeg.ffmpeg@8.1.2
Usage
From this repository's own test project — built and run by CI, not written for the website.
// Public ffmpeg module package end-to-end assertion: import-only consumption
// (`import ffmpeg.av;`), libavutil version of the FFmpeg 8.1.x train, core
// decoders present, demuxer registry populated. Builds on linux+macOS+windows.
import std;
import ffmpeg.av;
int main() {
unsigned v { avutil_version() };
std::println("libavutil {}.{} module package ok", v >> 16, (v >> 8) & 0xff);
if ((v >> 16) != 60u) { // libavutil major of the FFmpeg 8.1.x train
return 1;
}
for (auto name : { "h264", "hevc", "av1", "aac" }) {
const AVCodec* dec { avcodec_find_decoder_by_name(name) };
if (dec == nullptr) {
std::println("decoder {} MISSING", name);
return 2;
}
}
void* it { nullptr };
// …
tests/examples/ffmpeg-module/tests/ffmpeg_module.cpp · project tests/examples/ffmpeg-module
Build · upstream manifest
- modules
ffmpeg.av- targets
ffmpeg (lib)- manifest version
8.1.2- dependencies
compat- source
https://raw.githubusercontent.com/mcpplibs/ffmpeg-m/v8.1.2/mcpp.toml