mp4forge 0.3.0

Rust library and CLI for inspecting, probing, extracting, and rewriting MP4 box structures
Documentation

  • Typed MP4 and ISOBMFF box model with registry-backed custom box support
  • Low-level traversal, extraction, stringify, probe, and writer APIs
  • Thin typed path-based helpers and byte-slice convenience wrappers for common extraction, rewrite, and probe flows
  • Built-in CLI for dump, extract, probe, psshdump, edit, and divide
  • Shared-fixture coverage for regular MP4, fragmented MP4, encrypted init segments, and QuickTime-style metadata cases

Installation

[dependencies]

mp4forge = "0.3.0"

Install the CLI from crates.io:

cargo install mp4forge --locked

Install the current checkout locally:

cargo install --path . --locked

The published crate includes both the library and the mp4forge binary from src/bin/mp4forge.rs.

CLI

USAGE: mp4forge COMMAND [ARGS]

COMMAND:
  divide       split a fragmented MP4 into track playlists
  dump         display the MP4 box tree
  edit         rewrite selected boxes
  extract      extract raw boxes by type
  psshdump     summarize pssh boxes
  probe        summarize an MP4 file

For example:

mp4forge dump input.mp4

mp4forge probe input.mp4

mp4forge psshdump encrypted_init.mp4

Feature Flags

mp4forge currently ships without public Cargo feature flags.

See the examples/ directory for the crate's low-level and high-level API usage patterns.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in mp4forge by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.