|
avcpp 3.1.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
|
A C++17 wrapper for FFmpeg that turns its C API into types with constructors, destructors and error codes.
FFmpeg is a set of C libraries with manual memory management, out-parameters and integer error codes. avcpp keeps the same model — no hidden copies, no buffering you did not ask for — but wraps it into RAII types in the av namespace:
| FFmpeg | avcpp |
|---|---|
| AVFrame | av::VideoFrame, av::AudioSamples, av::SubtitleFrame |
| AVPacket | av::Packet |
| AVCodecContext | av::CodecContext2 and its encoder/decoder subclasses |
| AVFormatContext | av::FormatContext |
| AVStream | av::Stream |
| AVFilterGraph | av::FilterGraph |
| AVDictionary | av::Dictionary, av::DictionaryArray |
| AVRational | av::Rational |
| AVBufferRef | av::BufferRef |
Call av::init() once before using anything else, then link against avcpp::avcpp. The rest of the setup — package managers, FetchContent, add_subdirectory, configuration options — is on the Building and installing page.
The groups of the API reference: Core utilities, Containers and I/O, Codecs, Frames and formats, Filtering, Hardware acceleration, Subtitles.
Example programs live in example/api2-samples/ in the repository; each one is a self-contained .cpp file that can be built and run on its own.