Bento4: an MP4 toolkit built for the parts players hide
Full-featured MP4 format, MPEG DASH, HLS, CMAF SDK and tools
At a glance
- What is it?
- Bento4 reads and writes the box structure of an MP4 file, which is exactly what you need when the container is the problem rather than the codec. The command line tools and the DRM coverage are the interesting parts.
- Who is it for?
- Bento4 earns its place in a stack that has to treat media containers as something to inspect and rewrite rather than a black box. Its edge is that it exposes the box structure directly, ships eighteen command line tools built on the same API, and covers the DRM schemes that real deployments actually meet: CENC, PlayReady, Widevine, Marlin, OMA DCF and ISMA.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository last received commits 101 days ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 28, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What the library actually gives you
Bento4 is described as a C++ class library and tools designed to read and write ISO-MP4 files, and it is specific about which parts of the specification that covers: ISO/IEC 14496-12, 14496-14 and 14496-15. It also notes the format's origin as a derivative of Apple's QuickTime file format, which is why the same code handles most QuickTime files.
The design section is the part that distinguishes this from most media projects. The SDK is cross-platform, the code is very portable, and it can be compiled with any sufficiently modern C++ compiler. The implementation does not rely on any external library. All the code necessary to compile the SDK and tools is included in the standard distribution.
That last sentence is the important one. No ffmpeg, no libavcodec, no Boost, nothing to resolve. For a library that has to be linked into a player, a packager or a test harness, having zero transitive dependencies is a real property and not just a boast, because it eliminates an entire class of build and licensing problems. The cost is that everything is implemented here, including the parsing and muxing of H.264 and AAC elementary streams.
Four build systems are supported and the README is clear that you are not forced into one: pre-configured IDE project files for macOS, iOS and Windows, SCons, CMake, or plain Make.
The eighteen command line tools
The applications table in the README is the most practically useful part of the documentation, because it tells you what problems the project considers common enough to solve with a binary. The tools fall into recognisable groups.
Inspection comes first: `mp4info` for high level information including tracks and codec details, and `mp4dump` for the entire atom and box structure. Then structural editing: `mp4edit` to add, insert, remove or replace box items, `mp4extract` to pull a box out, `mp4tag` for iTunes-style and other metadata, and `mp4compact`, which converts stsz tables into stz2 tables to produce smaller files.
Fragmentation has its own pair. `mp4fragment` creates a fragmented MP4 from a non-fragmented one, or re-fragments a file that is already fragmented, and `mp4split` takes a fragmented file and splits it into discrete files. Those two are the daily tools for anyone doing CMAF or DASH packaging.
Then there is the streaming conversion set: `mp42hls` produces an HLS presentation including segments and the .m3u8 playlist, `mp42ts` converts to MPEG2-TS, and `mp4-dash` builds a DASH output from one or more MP4 files with optional encryption. `mp4-dash-clone` is the unusual one, making a local copy of a remote or local DASH presentation, optionally encrypting segments as they are cloned.
Cryptography has `mp4encrypt` and `mp4decrypt`, both supporting multiple schemes, plus `mp4dcfpackager` for OMA DCF output. Elementary stream work covers `mp42aac`, `mp42avc` and `mp4mux` for going the other direction.
DRM coverage is the reason most people arrive
The feature list reads like a checklist of everything that has ever been asked of an MP4 encryption library, and the DRM entries are the densest part of it. MPEG Common Encryption as specified in ISO/IEC 23001-7 is the foundation, and on top of it the README lists support for multiple DRM systems compatible with MP4-formatted content, naming Marlin, PlayReady and Widevine specifically. It also covers ISMA encryption and decryption, OMA 2.0 and 2.1 DCF and PDCF encryption, PIFF for encrypted HTTP Smooth Streaming, and the UltraViolet DECE Common File Format.
Some of those formats are effectively historical. UltraViolet and PIFF were both products of the early 2010s that did not take off commercially. Their presence in the library tells you something real about the codebase: it has absorbed the requirements of deployments that were built and then had to keep working, and the formats stayed because removing them would break someone.
The codec list is similarly wide. Beyond H.264 and AAC, the README names H.265 (HEVC), AC-3, EC-3 for Dolby Digital Plus, AC-4, Dolby Atmos, DTS and ALAC. Note that this is a container library, so those codec names refer to what it can carry and parse headers for, not to encoding. Bento4 does not transcode. That boundary is worth stating plainly because `mp4mux` taking H264 and AAC elementary streams can read like an encoder is included.
For CMAF, which is ISO/IEC 23000-19 and is what most modern streaming pipelines converge on, fragmentation plus CENC is the combination this library handles best.
Building it on Linux, macOS or Windows
The README gives per-platform instructions, and the CMake path is the one most people will use. On Linux or any other platform, CMake generates Makefiles, Xcode projects or Visual Studio project files as needed:
mkdir cmakebuild
cd cmakebuild
cmake -DCMAKE_BUILD_TYPE=Release ..
makeThe Xcode variant swaps the generator, and the Visual Studio variant keeps the release flag but changes the build invocation to `cmake --build . --config Release`. A separate section covers building against the Android NDK, again starting from a `cmakebuild` directory.
For the IDE routes the README names exact paths, which is helpful because the target directory naming scheme takes some decoding. Platform-specific files live under `Build/Targets/` where the directory name has the form architecture, vendor and operating system. So the Linux x86 build files are under `Build/Targets/x86-unknown-linux`, the macOS XCode project sits at `Build/Targets/universal-apple-macosx/Bento4.xcodeproj`, and the Windows solution is `Build/Targets/x86-microsoft-win32-vs2010/Bento4.sln`.
The top-level tree confirms the layout: `Source/` for the library, `Build/` for the target project files, `CMakeLists.txt` and `SConstruct` side by side for the two build systems, plus `Scripts/`, `Test/`, `tasks/` and `Documents/`.
The win32-vs2010 in that Windows path name is a small signal worth noting. It suggests the Visual Studio project files have not been regenerated for recent toolchain versions, which matters if you plan to build with a current Visual Studio.
Licensing and packaging are the unusual parts
The metadata for this repository does not record a license file, and the README explains why in a deliberately indirect way: the library is open source with a dual-license model, and the details are on the project's About page at bento4.com. The Developers page is said to carry specific information about where to obtain the source and documentation, and the Downloads page carries pre-built SDKs and tools.
A dual-license model in a media toolkit usually means something specific: the code is available under one set of terms for some users and another set for others, often with commercial terms available for organizations that do not fit the open-source terms. That is a common arrangement for a project maintained by a company whose business is selling support, and the practical consequence for you is that you need to read the About page before assuming which terms apply to your use.
The packaging story follows from the same arrangement. There is no Homebrew formula, no Debian package, no pip wheel. You either build from source with one of the build systems above, or you download a prebuilt SDK from the project site. For a library with no external dependencies, building from source is a short job, and for a company with a reproducible build process, it is a five-line CMake invocation.
The project is C++, Apache-style directory conventions, and the default branch is `master` rather than `main`, which is one of the older choices in this repository. It is not archived, carries about 2,500 stars and 529 forks, and the last recorded push on the default branch is 2026-06-27.
Where this sits against the obvious alternative
If you are reaching for a media container library, the honest comparison is against ffmpeg, and the comparison is not close on general capability. ffmpeg can decode and encode every codec you are likely to meet, Bento4 does not transcode at all. Anyone choosing Bento4 over ffmpeg is making a specific decision.
The decision is usually one of three. First, you need to inspect or modify the box structure without touching the media payload, and a full transcoding stack is the wrong tool for that. Second, you need a library with no transitive dependencies, because you are linking into something with its own dependency constraints. Third, you are building a packager for DASH, HLS or CMAF with multi-DRM encryption and want box-level control over how the segments are produced.
The third case is where the tool set earns its keep. Fragmenting, splitting, extracting, editing metadata, encrypting and cloning a DASH presentation are all first-class commands that share one API, rather than a sequence of ffmpeg invocations assembled by a script you have to maintain.
The caveat worth carrying into any decision is the issue queue. 629 open issues against roughly 2,500 stars is a high ratio, and combined with a release history this repository does not record, the practical question is what happens when you hit a bug. For a stable media pipeline that changes rarely, that is a manageable risk. For something you need to patch yourself, the fact that there is no external dependency also means there is no upstream project to send the fix to.
Editorial conclusion
Bento4 earns its place in a stack that has to treat media containers as something to inspect and rewrite rather than a black box. Its edge is that it exposes the box structure directly, ships eighteen command line tools built on the same API, and covers the DRM schemes that real deployments actually meet: CENC, PlayReady, Widevine, Marlin, OMA DCF and ISMA. Its cost is that it is a media tool, not a streaming server, and the packaging story is unusual because the license is dual and the prebuilt binaries live on the project site rather than a package manager. With roughly 2,500 stars, 629 open issues and a last recorded push on 2026-06-27, this is a mature codebase with a much larger issue queue than a healthy project usually carries, which is the thing to weigh before depending on it.
Frequently asked questions
What is Bento4 used for?
It is used to read and write the box structure of MP4 files: inspecting them, editing atoms, fragmenting and splitting them, packaging them for DASH, HLS or CMAF, and encrypting or decrypting them. It is a container library, not a transcoder, so it moves and inspects media without re-encoding it.
Does Bento4 support HLS?
Yes, through the `mp42hls` tool, which converts an MP4 file into an HLS presentation including the media segments and the .m3u8 playlist. The same tool set also covers MPEG DASH with `mp4-dash`, and `mp4-dash-clone` makes a local copy of a remote presentation while optionally encrypting segments.
Is MPEG-4 the same as MP4?
MP4 is the file extension and MPEG-4 is the standard family, and Bento4 targets the specific parts of ISO/IEC 14496-12, 14496-14 and 14496-15 rather than the whole MPEG-4 specification. The format derives from Apple's QuickTime file, which is why the same library also handles most QuickTime files.
How to install mp4decrypt?
There is no package manager install for it. You build the tools with CMake on Linux, or open the preconfigured Xcode project or Visual Studio solution, or download a prebuilt SDK from the project's Downloads page. The resulting binary is `mp4decrypt`, which handles several encryption schemes.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/axiomatic-systems-bento4)