A modern C++20 library for building professional audio, video, and media applications.
Status: Work in Progress — libpromeki is under active development. The core APIs, pro A/V subsystems, and networking stack are functional and in daily use, but interfaces may change without notice. Bug reports and feedback are welcome.
libpromeki provides the foundational building blocks that professional media software needs: timecode, frame rates, image and audio descriptors, pixel formats, color science, networking, memory management, signal/slot event systems, and more. It is designed so that you can focus on your application logic instead of reinventing infrastructure.
In-depth topic guides, browsable directly on GitHub or as part of the hosted Doxygen output:
General-purpose C++ infrastructure that the rest of the library is built on.
List, Map, Set, HashMap, Deque, Queue, Stack, PriorityQueue, ArraySharedPtr, Buffer (reference-counted memory blocks), MemPool, BufferPool, SecureMemDataStream (binary), TextStream, AnsiStream (ANSI terminal), and a family of I/O devices (File, BufferedIODevice, BufferIODevice, StringIODevice)File, Dir, FileInfo, FilePath, plus a compiled-in resource filesystem (CIRF) for embedding assetsThread (with built-in event loop), Mutex, ReadWriteLock, WaitCondition, Atomic, Future/Promise, ThreadPool, StrandObjectBase with parent/child hierarchy, Signal/Slot connections (including cross-thread dispatch), EventLoop, timersDateTime, Timestamp, Duration, ElapsedTimerJsonObject / JsonArray via nlohmann/jsonUUID, FourCC, Enum (reflection), Random, CommandLineParser, Logger, Process, Benchmark, VariantDatabase, ConfigOption, HistogramMatrix, Point, Size2D, Rect, Line, RationalClasses for working with professional media formats, images, audio, color science, and timecode.
Descriptors & formats:
ImageDesc — image dimensions, planes, and pixel layoutAudioDesc — sample type, rate, and channel layoutMediaDesc — combined frame rate, image layers, audio groups, and metadata for a complete media streamPixelMemLayout / PixelFormat — extensive pixel format registry with 78 pixel formats and 132 pixel descriptors covering interleaved, planar, and semi-planar layouts (RGB, YCbCr, Bayer, DPX-packed, and more)Image processing:
Image — raster image container with multi-plane supportPaintEngine — software rasterization for interleaved and planar pixel formatsFont / FastFont — FreeType-based font rendering with glyph caching and alpha compositingAudio processing:
Audio / AudioBuffer — audio sample containersAudioFile — audio file I/O (WAV, AIFF, OGG via libsndfile)AudioGen — signal generators (sine, square, sawtooth, noise, etc.)AudioLevel — level measurementAudioTestPattern — standard test audio patternsLtcEncoder / LtcDecoder — Linear Timecode (LTC) encode and decode on audio streamsColor science:
Color — color values with multiple color model supportColorModel — color model descriptors (sRGB, Rec. 709, Rec. 2020, DCI-P3, CIE XYZ, and more)Timecode:
Timecode — SMPTE and non-standard timecode (backed by libvtc)TimecodeGenerator — frame-accurate timecode generationFrameRate — frame rate descriptors with drop-frame supportVideo & frames:
Frame — unified image + audio + metadata at a single timestampVideoTestPattern — color bars, grids, ramps, and other standard test patternsImgSeq — image sequence handling with frame range and naming patternsMetadata — typed key-value metadata containerMedia I/O framework:
An extensible pipeline for reading, writing, and transforming media, built around MediaIO (registry/factory) and MediaIOTask backends:
PROMEKI_REGISTER_MEDIAIO()Pipeline orchestration:
High-level classes that wire a DAG of MediaIO stages from a declarative configuration:
MediaPipelineConfig — shareable description of stages + routes + metadata; validates the DAG, round-trips through JSON and DataStream, and saves/loads as JSON preset filesMediaPipeline — instantiates the stages, drives signal-based frame flow on the caller's EventLoop, handles fan-out and back-pressure, exposes a build / open / start / stop / close lifecycleMediaPipelineStats — per-stage MediaIOStats map plus a pipeline- layer PipelineStats bucket (frames produced, write retries, errors, back-pressure, uptime); round-trips through JSON and DataStreamBSD-socket abstractions and real-time media transport protocols.
TcpSocket, TcpServer, UdpSocket, RawSocket, PrioritySocket, LoopbackTransportSocketAddress, NetworkAddress, IPv4Address, IPv6Address, MacAddressRtpSession, RtpPacket, RtpPayload (RFC 3550); SdpSession, SdpMediaDescriptionPacketTransport, UdpSocketTransport, MulticastManager, MulticastReceiverMidiNote / MidiNoteNames — MIDI note representation and lookupMusicalNote — note with frequency and pitchMusicalScale — scale descriptors (major, minor, modes, custom)NoteSequenceParser — parse note strings (e.g. "C4 D4 E4 C5")An optional shared library providing a terminal widget toolkit.
TuiSubsystem, TuiScreen, TuiPainter, TuiPaletteLabel, LineEdit, TextArea, Button, CheckBox, ProgressBar, ListView, Frame, ScrollArea, Splitter, TabWidget, StatusBar, MenuAn optional shared library for SDL3-based applications (off by default).
SdlSubsystem, SDLWindow, SDLVideoWidget, SDLAudioOutputSDLPlayer — MediaIO-backed player with video display and audio outputlibpromeki is organized into one main shared library and two optional UI libraries:
promeki — the core library. Networking, pro A/V, music, and other feature areas can be independently enabled or disabled via CMake feature flags.
promeki-tui — terminal UI widget library (optional).
promeki-sdl — SDL3-based GUI library (optional, off by default).
All third-party libraries that promeki depends on are vendored as git submodules, built as static libraries with -fPIC, and absorbed directly into libpromeki.so. Alternatively, each dependency can be switched to use system-installed versions via PROMEKI_USE_SYSTEM_* CMake options.
When you install libpromeki, you get a shared library and a set of headers. Your application links against promeki::promeki — no chasing down system packages, no version mismatches, no transitive dependency surprises.
Vendored dependencies: zlib-ng, libspng, libjpeg-turbo, FreeType, libsndfile, nlohmann/json, libvtc, SVT-JPEG-XS, Highway, CIRF.
| Program | Description |
|---|---|
promeki-info | Print library build information (version, date, build type) |
mediaplay | CLI media player and pipeline builder with –in/–out/–converter stages; pass --memstats to dump per-MemSpace allocation counters at exit |
promeki-bench | Unified benchmark driver (CSC pair matrix now, other suites land here over time); writes JSON for baseline tracking and prints a delta table against a previous run |
imgtest | Image file I/O test utility |
CMake auto-initializes only the thirdparty/* submodules the active configuration needs on first configure, so a plain git clone (without --recurse-submodules) is enough. See the build guide's Submodule auto-init section for the details, including how to redirect submodule fetches at an internal mirror.
The default all build excludes the unit-test executables to keep incremental rebuilds fast — use the check target (build + run) or tests (build only) when you need them.
For the complete build, install, and downstream-integration guide — including every CMake feature flag, vendored-vs-system dependency switch, build-performance option, test and install targets, mirror configuration, documentation build, and consumer CMake usage — see the Building and Installing libpromeki guide:
See CONTRIBUTING.md at the repository root for the development workflow, including the scripts/precommit.sh gate that every commit should pass.
If you build the library in Debug mode (-DCMAKE_BUILD_TYPE=Debug), the promekiDebug() logging function is enabled. Each source file that wants to use it must register a debug channel:
Then enable channels at runtime via the PROMEKI_DEBUG environment variable (comma-separated):
The bulk of the code that makes up libpromeki started out life as code that existed across multiple libraries originally developed by my (now defunct) company, SpectSoft, for our video disk recorder product called RaveHD. During its run, it was used in post production, VFX, animation, and other media related sectors. At that time, the entire application stack was built on top of the Qt framework. The Qt design patterns, aesthetic, and general way of doing things has certainly informed much of how this library was architected.
What you see now is a library that takes the good bits from that old code base and has removed the Qt coupling and replaced it with modern C++ native STL. Hopefully you'll find it as useful as I have over the years. –jth
libpromeki is licensed under the [MIT License](LICENSE).
Third-party library licenses and attribution notices are documented in [THIRD-PARTY-LICENSES](THIRD-PARTY-LICENSES).