Expand description
transmux — an any-to-any media container muxing hub (ISO/IEC 14496-12,
13818-1, 23009-1, RFC 8216/3550, [MS-SSTR]).
transmux demuxes any supported container into one neutral in-memory
intermediate representation (Media / Track) and muxes from it into any
supported container — the demux and mux spokes meet at the IR, so every
{input} → {output} combination composes, with one documented exception:
WebM’s VP8 and Vorbis tracks (CodecConfig::Vp8/CodecConfig::Vorbis)
have no ISOBMFF sample entry in this crate, so they do not participate in
the fMP4/CMAF mux path — {WebM} → {CMAF/progressive-MP4/TS/DASH/LL-DASH/ CMAF-HLS/LL-HLS/Smooth} fails on those tracks with
Error::UnsupportedCodec; only WebM → WebM/MkvMux round-trips them.
It never encodes or decodes media: it parses codec config/parameter
headers only to build container boxes and derive metadata; coded samples
pass through opaque. no_std + alloc.
The spokes are expressed through the two abstract traits in broadcast_common:
Unpackage (container → IR) and
Package (IR → container), the inverse pair
mirroring Parse / Serialize.
- Demux (
Unpackage) inputs: MPEG-2 TS (TsDemux, a thin batch wrapper over the event-drivenStreamingTsDemux— issue #555), fMP4/CMAF (Fmp4Demux), progressive (non-fragmented) MP4 (ProgressiveDemux— issue #561), MPEG Program Stream (PsDemux), WebM/Matroska (WebmDemux— laced blocks are a hard error, not silently skipped; real ffmpeg/mkvmerge captures without lacing demux fine, see the module docs), FLV (FlvDemux— non-AVC video and non-AAC audio tracks are silently skipped, no event/error, see the module docs), RTMP (RtmpDemux). - Mux (
Package) outputs: CMAF/fMP4 (CmafMux), progressive single-file MP4 (ProgressiveMux), MPEG-2 TS (TsMux), Matroska (MkvMux), CMAF-HLS (HlsPackager), TS-segment HLS (TsHlsPackager), DASH MPD (DashPackager), low-latency DASH (LlSegmenter/LlDashPackager), Microsoft Smooth Streaming (SmoothPackager— H.264 video + AAC-LC audio only, every other codec rejected), RTMP (RtmpMux), low-latency HLS (LlHlsSegmenter, live-edge open segments viabroadcast_hls::OpenSegment). - Transforms: resegment / trim / track-select (
Repackage); streaming CMAF segmentation (Segmenter); streaming classic-HLS segmentation (StreamingTsHlsSegmenter); IR timeline conditioning — PTS/DTS rebase and offset, discontinuity-gap insertion (rebase_to_zero/apply_offset/insert_discontinuity_gap, via each absoluteSampledts/ptsand theTrack::start_decode_timeanchor kept in lockstep with it — 33-bit MPEG wrap-unroll happens once, at the demux edge, seets_demux); timeline splice / concatenation → SSAI (concat/splice_insert, returning aSpliceResultwith discontinuity points). - Crypto: CENC/CBCS (
cenc, AES-CTR/AES-CBC-pattern) decrypt (CencDecryptor) + encrypt (CencEncryptor, which populatesTrack::encryptionfor the muxer’ssinf/senc/saio/saizbox emission —init_segment::protect_init_segment/movie_fragment::protect_media_segment); DRM signalling driven off that sameTrack::encryption—DashPackagerauto-derives the generic-CENCContentProtection(plus caller-supplied per-DRM-systemcenc:pssh),broadcast_hls::cenc_ext_x_keyrenders the HLS#EXT-X-KEYforcbcs(cenc/CTR is DASH-only — see thebroadcast-hlscrate’s module docs); HLS Sample-AES + full-segment AES-128 encrypt/decrypt (sample-aes,sample_aes). - RTP/RTCP: de/packetise (
RtpPacketiser/RtpDepacketiser), streaming depayload (RtpStreamDepacketiser) + SDP fmtp→config helpers (rtp_sdp); RTCP control packets (RtcpPacket). - Conformance: structural fMP4/CMAF validator (
validate_init_segment/validate_media_segment/validate_cmaf_track). - Utilities: NAL keyframe classification (
is_keyframe_nal/nal_unit_type); I-frame trick-play track derivation (derive_iframe_track).
Codec config coverage (header parse → container box; no en/decode):
H.264/AVC, H.265/HEVC, H.266/VVC, AV1, VP9, VP8*, MPEG-2 video (H.262); AAC,
AC-3, E-AC-3, AC-4, DTS, Opus, FLAC, Vorbis*, MPEG-1/2 audio (MP1/2/3), MPEG-H
3D Audio. (*VP8/Vorbis have no ISOBMFF sample entry — WebM-native only,
see the {input} → {output} exception noted above.)
Lower-level entry points remain: build_init_segment/build_media_segment
(batch CMAF), AvcSps::decode + AvcSps::rfc6381 (codec metadata). See the
crate README for the full feature matrix and the examples/ directory for
runnable end-to-end walkthroughs.
This crate root also exposes the low-level ISOBMFF framing it is built on:
BoxHeader (optional 64-bit largesize / uuid extended type),
FullBoxHeader (version + flags), and a size-driven box walker
(BoxIter) that skips unknown box types by advancing by size.
§Quick start
use transmux::{box_iter, parse_box, BoxHeader, BoxType};
use broadcast_common::Parse;
// Parse a simple ftyp box header.
let bytes = [0, 0, 0, 12, b'f', b't', b'y', b'p', 0, 0, 0, 0];
let header = BoxHeader::parse(&bytes).unwrap();
assert_eq!(header.box_type.to_string(), "ftyp");§Spec citations
- Box / FullBox: ISO/IEC 14496-12:2015 §4.2 (fulltext L1254–L1304).
- Box order: §6.2.3 (recommendations; only
ftypbefore variable-length andmoofsequence_number are mandatory). - Skip-unknown rule: §4.2 L1294 — unknown type → ignore + skip via size.
§Feature flags
| Feature | Default | Description |
|---|---|---|
std | yes | std::error::Error impls |
serde | yes | serde::Serialize for box types |
cenc | yes | CENC/CBCS (ISO/IEC 23001-7) AES-CTR/AES-CBC sample decrypt (CencDecryptor) + encrypt (CencEncryptor) via the RustCrypto aes/ctr/cbc crates. DASH/HLS DRM signalling (DashPackager::content_protection, broadcast_hls::cenc_ext_x_key) reads the always-available Track::encryption/cenc box types and needs no feature |
sample-aes | no | HLS Sample-AES + full-segment AES-128 (AES-128-CBC) content protection (sample_aes); implies cenc, adds the RustCrypto cbc crate |
cli | no | the transmux command-line packager binary (clap; implies std) — see cli and docs/CLI-STANDARD.md |
Re-exports§
pub use aac_asc::AdtsHeader;pub use aac_asc::AudioObjectType;pub use aac_asc::AudioSpecificConfig;pub use aac_asc::ChannelConfiguration;pub use aac_asc::HeAacSignaling;pub use aac_asc::SamplingFrequencyIndex;pub use aac_asc::build_adts_header;pub use aac_asc::parse_adts_header;pub use ac3::Ac3SpecificBox;pub use ac3::Ac3SyncframeInfo;pub use ac3::Ec3SpecificBox;pub use ac3::Ec3Substream;pub use ac3::Ec3SyncframeInfo;pub use ac4::AC4_FOURCC;pub use ac4::Ac4SpecificBox;pub use ac4::DAC4_FOURCC;pub use annexb::NAL_LENGTH_SIZE;pub use annexb::annexb_to_length_prefixed;pub use annexb::iter_annexb_nals;pub use annexb::iter_length_prefixed_nals;pub use annexb::length_prefixed_to_annexb;pub use au::AccessUnitSplitter;pub use au::split_access_units;pub use av1::AV01_FOURCC;pub use av1::AV1C_FOURCC;pub use av1::Av1ConfigurationBox;pub use av1::Av1SampleEntry;pub use avc_config::AVCConfigurationBox;pub use avc_config::AVCDecoderConfigurationRecord;pub use box_types::BoxHeader;pub use box_types::BoxIter;pub use box_types::BoxRef;pub use box_types::BoxType;pub use box_types::FullBoxHeader;pub use box_types::box_iter;pub use box_types::parse_box;pub use cenc::OriginalFormatBox;pub use cenc::ProtectionSchemeInfoBox;pub use cenc::ProtectionSystemSpecificHeaderBox;pub use cenc::SENC_FLAG_USE_SUBSAMPLE_ENCRYPTION;pub use cenc::SampleAuxInfoOffsetsBox;pub use cenc::SampleAuxInfoSizesBox;pub use cenc::SampleEncryptionBox;pub use cenc::SampleEncryptionEntry;pub use cenc::SchemeInformationBox;pub use cenc::SchemeTypeBox;pub use cenc::SubSampleEntry;pub use cenc::TrackEncryptionBox;pub use cenc_decrypt::CencDecryptor;pub use cenc_decrypt::KeyMap;pub use cenc_encrypt::CencEncryptor;pub use cenc_encrypt::ConstantIvSenc;pub use cenc_encrypt::EncryptConfig;pub use cenc_encrypt::IvGen;pub use cenc_encrypt::SubsamplePolicy;pub use dash::Addressing;pub use dash::ContentProtectionSystem;pub use dash::DashPackager;pub use dash::InbandEventStream;pub use dash::MP4_PROTECTION_SCHEME_URI;pub use dash::MPD_NAMESPACE;pub use dash::MediaKind;pub use dash::PROFILE_ISOFF_LIVE;pub use dash::TRICKMODE_SCHEME;pub use dash::TrackSegments;pub use dash::TrickModeAdaptationSet;pub use dash::TrickModeRepr;pub use dash_parse::AdaptationSet;pub use dash_parse::DashParseError;pub use dash_parse::Mpd;pub use dash_parse::MpdType;pub use dash_parse::Period;pub use dash_parse::Representation;pub use dash_parse::S;pub use dash_parse::SegmentTemplate;pub use dash_parse::SegmentTimeline;pub use dash_parse::parse_iso8601_duration;pub use drm::COMMON_SYSTEM_ID;pub use drm::FAIRPLAY_SYSTEM_ID;pub use drm::PLAYREADY_SYSTEM_ID;pub use drm::WIDEVINE_SYSTEM_ID;pub use drm::cenc_kid_to_playready;pub use drm::fairplay_pssh;pub use drm::fairplay_pssh_data;pub use drm::playready_kid_to_cenc;pub use drm::playready_kid_value_decode;pub use drm::playready_pro;pub use drm::playready_pssh;pub use drm::playready_wrmheader;pub use drm::widevine_pssh;pub use drm::widevine_pssh_data;pub use dts::DDTS_BODY_LEN;pub use dts::DDTS_FOURCC;pub use dts::DTSC_FOURCC;pub use dts::DTSE_FOURCC;pub use dts::DTSH_FOURCC;pub use dts::DTSL_FOURCC;pub use dts::DtsSpecificBox;pub use error::Error;pub use error::Result;pub use flac::BLOCK_TYPE_STREAMINFO;pub use flac::DFLA_FOURCC;pub use flac::FLAC_FOURCC;pub use flac::FlacMetadataBlock;pub use flac::FlacSpecificBox;pub use flv::FlvDemux;pub use flv::FlvError;pub use flv::FlvMux;pub use flv::FlvPayload;pub use flv::FlvPayloadKind;pub use flv::flv_frame_payloads;pub use flv::flv_sequence_header_payloads;pub use flv_stream::StreamingFlvDemux;pub use hevc_config::HEVCConfigurationBox;pub use hevc_config::HEVCDecoderConfigurationRecord;pub use init_segment::Ac3SampleEntry;pub use init_segment::Ac4SampleEntry;pub use init_segment::ChunkLargeOffsetBox;pub use init_segment::ChunkOffsetBox;pub use init_segment::DataEntryUrlBox;pub use init_segment::DataInformationBox;pub use init_segment::DataReferenceBox;pub use init_segment::DtsSampleEntry;pub use init_segment::Ec3SampleEntry;pub use init_segment::EditBox;pub use init_segment::FlacSampleEntry;pub use init_segment::HandlerBox;pub use init_segment::MediaBox;pub use init_segment::MediaHeaderBox;pub use init_segment::MediaInformationBox;pub use init_segment::MhaSampleEntry;pub use init_segment::MovieBox;pub use init_segment::MovieExtendsBox;pub use init_segment::MovieHeaderBox;pub use init_segment::Mp4aSampleEntry;pub use init_segment::OpaqueBox;pub use init_segment::OpusSampleEntry;pub use init_segment::SampleDescriptionBox;pub use init_segment::SampleEntryVariant;pub use init_segment::SampleSizeBox;pub use init_segment::SampleTableBox;pub use init_segment::SampleToChunkBox;pub use init_segment::SoundMediaHeaderBox;pub use init_segment::StblChild;pub use init_segment::StscEntry;pub use init_segment::SyncSampleBox;pub use init_segment::TrackBox;pub use init_segment::TrackExtendsBox;pub use init_segment::TrackHeaderBox;pub use init_segment::VideoMediaHeaderBox;pub use klv::CHECKSUM_LEN;pub use klv::KlvItem;pub use klv::LocalSetItem;pub use klv::PRECISION_TIMESTAMP_LEN;pub use klv::TAG_CHECKSUM;pub use klv::TAG_PRECISION_TIMESTAMP;pub use klv::UAS_LS_KEY;pub use klv::UNIVERSAL_LABEL_LEN;pub use klv::UasLocalSet;pub use klv::UniversalLabel;pub use klv::ber_length;pub use klv::ber_oid;pub use klv::crc16_ccitt;pub use klv::encode_ber_length;pub use klv::encode_ber_oid;pub use ll_dash::Chunk;pub use ll_dash::LlDashPackager;pub use ll_dash::LlSegmenter;pub use ll_hls::LlHlsSegmenter;pub use ll_hls::LlHlsStageOutput;pub use ll_hls::PartInfo;pub use ll_hls::SegmentInfo;pub use media::CmafMux;pub use media::Fmp4Demux;pub use media::HlsPackager;pub use media::Media;pub use media::PcrSample;pub use media::SkippedTrack;pub use media::Track;pub use media::TrackEncryption;pub use mkv_mux::MkvMux;pub use movie_fragment::MovieFragmentBox;pub use movie_fragment::MovieFragmentHeaderBox;pub use movie_fragment::TrackFragmentBaseMediaDecodeTimeBox;pub use movie_fragment::TrackFragmentBox;pub use movie_fragment::TrackFragmentHeaderBox;pub use movie_fragment::TrackFragmentRunBox;pub use movie_fragment::TrunSample;pub use mp4esds::DecoderConfigDescriptor;pub use mp4esds::DecoderSpecificInfo;pub use mp4esds::ESDescriptor;pub use mp4esds::EsdsBox;pub use mp4esds::ObjectTypeIndication;pub use mp4esds::SLConfigDescriptor;pub use mp4esds::StreamType;pub use mpeg_legacy::MPEG_AUDIO_SYNCWORD;pub use mpeg_legacy::Mpeg2SeqHeader;pub use mpeg_legacy::MpegAudioFrameHeader;pub use mpeg_legacy::MpegAudioLayer;pub use mpeg_legacy::SEQUENCE_HEADER_CODE;pub use mpegh::MHA1_FOURCC;pub use mpegh::MHA2_FOURCC;pub use mpegh::MHAC_CONFIGURATION_VERSION;pub use mpegh::MHAC_FOURCC;pub use mpegh::MHAC_RECORD_FIXED_LEN;pub use mpegh::MHADecoderConfigurationRecord;pub use mpegh::MHM1_FOURCC;pub use mpegh::MHM2_FOURCC;pub use nal::NalCodec;pub use nal::access_unit_is_keyframe;pub use nal::access_unit_is_rap;pub use nal::caption_cc_data;pub use nal::is_keyframe_nal;pub use nal::nal_unit_type;pub use nal::recovery_point_sei;pub use nalu_types::AvcPps;pub use nalu_types::AvcSps;pub use nalu_types::AvcSpsExt;pub use nalu_types::HevcNalArray;pub use nalu_types::HevcNalUnit;pub use opus::ChannelMappingTable;pub use opus::DOPS_FOURCC;pub use opus::OPUS_FOURCC;pub use opus::OpusSpecificBox;pub use pipeline::CodecConfig;pub use pipeline::FragmentTrackData;pub use pipeline::Provenance;pub use pipeline::Sample;pub use pipeline::SampleFlags;pub use pipeline::TrackSpec;pub use pipeline::build_init_segment;pub use pipeline::build_media_segment;pub use pipeline::build_media_segment_with_events;pub use progressive::ProgressiveMux;pub use progressive_demux::ProgressiveDemux;pub use ps_demux::PsDemux;pub use rebase::apply_offset;pub use rebase::insert_discontinuity_gap;pub use rebase::rebase_to_zero;pub use repackage::Repackage;pub use repackage::RepackageOutput;pub use rtmp::AmfValue;pub use rtmp::BasicHeader;pub use rtmp::Command;pub use rtmp::DEFAULT_CHUNK_SIZE;pub use rtmp::HANDSHAKE_PACKET_LEN;pub use rtmp::Handshake0;pub use rtmp::Handshake1;pub use rtmp::Handshake2;pub use rtmp::Message;pub use rtmp::MessageHeader;pub use rtmp::ProtocolControl;pub use rtmp::RTMP_VERSION;pub use rtmp::RtmpDemux;pub use rtmp::RtmpError;pub use rtmp::RtmpMux;pub use rtp::DEFAULT_AUDIO_PT;pub use rtp::DEFAULT_KLV_PT;pub use rtp::DEFAULT_MTU;pub use rtp::DEFAULT_VIDEO_PT;pub use rtp::KLV_ENCODING_NAME;pub use rtp::NAL_TYPE_IDR;pub use rtp::RtpDepacketiser;pub use rtp::RtpInput;pub use rtp::RtpInputStream;pub use rtp::RtpMediaKind;pub use rtp::RtpOutput;pub use rtp::RtpPacket;pub use rtp::RtpPacketiser;pub use rtp::RtpStream;pub use rtp::VIDEO_CLOCK_RATE;pub use rtp::depacketise_klv;pub use rtp::packetise_klv;pub use rtp_sdp::aac_config_from_asc_bytes;pub use rtp_sdp::aac_config_from_asc_hex;pub use rtp_sdp::aac_config_from_fmtp;pub use rtp_sdp::avc_config_from_fmtp;pub use rtp_sdp::avc_config_from_sprop;pub use rtp_sdp::avc_config_from_sps_pps;pub use rtp_sdp::fmtp_param;pub use rtp_sdp::rtpmap_clock_rate;pub use rtp_stream::DEFAULT_REORDER_DEPTH;pub use rtp_stream::RtpLossEvent;pub use rtp_stream::RtpStreamDepacketiser;pub use rtp_stream::RtpStreamTrack;pub use sample_aes::ExtXKey;pub use sample_aes::HlsEncryptionMethod;pub use sample_aes::aac_decrypt_frame;pub use sample_aes::aac_encrypt_frame;pub use sample_aes::ac3_decrypt_frame;pub use sample_aes::ac3_encrypt_frame;pub use sample_aes::aes128_decrypt_segment;pub use sample_aes::aes128_encrypt_segment;pub use sample_aes::h264_decrypt_nal;pub use sample_aes::h264_encrypt_nal;pub use sample_aes::iv_from_sequence_number;pub use sample_entries::AVCSampleEntry;pub use sample_entries::HEVCSampleEntry;pub use sample_entries::Mp4vSampleEntry;pub use sample_entries::VisualSampleEntryFields;pub use sample_groups::GROUPING_TYPE_ROLL;pub use sample_groups::ProducerReferenceTimeBox;pub use sample_groups::SampleGroupDescriptionBox;pub use sample_groups::SampleToGroupBox;pub use sample_groups::SbgpEntry;pub use sample_groups::SgpdEntry;pub use sample_groups::SubSampleDescriptor;pub use sample_groups::SubSampleInformationBox;pub use sample_groups::SubsEntry;pub use segmenter::SegmentMeta;pub use segmenter::Segmenter;pub use segments::FileTypeBox;pub use segments::MediaDataBox;pub use segments::SegmentTypeBox;pub use smooth::FOURCC_AACL;pub use smooth::FOURCC_H264;pub use smooth::SMOOTH_TIMESCALE;pub use smooth::SmoothFragment;pub use smooth::SmoothOutput;pub use smooth::SmoothPackager;pub use smooth::SmoothStreamType;pub use smooth::TFXD_UUID;pub use smooth::TfxdBox;pub use smooth_parse::C;pub use smooth_parse::MAX_CHUNK_RUN;pub use smooth_parse::MAX_CODEC_PRIVATE_DATA_HEX_LEN;pub use smooth_parse::QualityLevel;pub use smooth_parse::SmoothManifest;pub use smooth_parse::SmoothParseError;pub use smooth_parse::StreamIndex;pub use smooth_parse::hex_decode as smooth_hex_decode;pub use smooth_parse::track_spec_from_quality_level;pub use splice::SplicePoint;pub use splice::SpliceResult;pub use splice::concat;pub use splice::snap_to_preceding_sync;pub use splice::splice_insert;pub use sps::AvcSpsInfo;pub use sps::HevcSpsInfo;pub use sps::decode_avc_sps;pub use sps::decode_hevc_sps;pub use sps::rfc6381_avc1;pub use sps::rfc6381_hvc1;pub use sps::rfc6381_mp4a;pub use subtitle_entries::CueIdBox;pub use subtitle_entries::CuePayloadBox;pub use subtitle_entries::CueSettingsBox;pub use subtitle_entries::VttCueBox;pub use subtitle_entries::VttEmptyCueBox;pub use subtitle_entries::WebVttConfigurationBox;pub use subtitle_entries::WvttSampleEntry;pub use subtitle_entries::XmlSubtitleSampleEntry;pub use timing::CompositionOffsetBox;pub use timing::CompositionToDecodeBox;pub use timing::CttsEntry;pub use timing::EditListBox;pub use timing::EditListEntry;pub use timing::SegmentIndexBox;pub use timing::SidxReference;pub use timing::SttsEntry;pub use timing::TimeToSampleBox;pub use trickplay::append_iframe_track;pub use trickplay::derive_iframe_track;pub use ts_demux::AbandonReason;pub use ts_demux::DemuxEvent;pub use ts_demux::DiscontinuityKind;pub use ts_demux::EventProvenance;pub use ts_demux::InputDegradation;pub use ts_demux::StreamingTsDemux;pub use ts_demux::TsDemux;pub use ts_hls::StreamingTsHlsSegmenter;pub use ts_hls::TsHlsOutput;pub use ts_hls::TsHlsPackager;pub use ts_hls::TsSegment;pub use ts_mux::TsMux;pub use validate::ConformanceIssue;pub use validate::Severity;pub use validate::validate_cmaf_track;pub use validate::validate_init_segment;pub use validate::validate_media_segment;pub use visual_ext::CleanApertureBox;pub use visual_ext::ColourInformationBox;pub use visual_ext::NclxColourInfo;pub use visual_ext::PixelAspectRatioBox;pub use vp9::VP09_FOURCC;pub use vp9::VPCC_FOURCC;pub use vp9::Vp9ConfigurationBox;pub use vp9::Vp9SampleEntry;pub use vvc_config::VvcConfigurationBox;pub use vvc_config::VvcDecoderConfigurationRecord;pub use vvc_config::VvcNalArray;pub use vvc_config::VvcNalUnitType;pub use vvc_config::VvcPtlRecord;pub use webm_demux::IR_TIMESCALE;pub use webm_demux::WebmDemux;
Modules§
- aac_asc
- AAC
AudioSpecificConfig(ASC) — ISO/IEC 14496-3:2001 §1.6.2.1 Table 1.8. - ac3
- AC-3 and Enhanced AC-3 in ISOBMFF — ETSI TS 102 366 Annex F.
- ac4
- AC-4 in ISOBMFF —
ac-4AudioSampleEntry +dac4config box. - annexb
- Annex B ↔ length-prefixed NAL conversion — ITU-T H.264 Annex B / ISO/IEC 14496-15 §5.3.4.
- au
- Streaming Annex B byte stream → access-unit splitter — ITU-T H.264 §7.4.1.2 (access unit detection), ITU-T H.265 §7.4.2.4.4, ITU-T H.266 §7.4.2.4.3.
- av1
- AV1 in ISOBMFF —
av01VisualSampleEntry +av1Cconfig box. - avc_
config - AVC decoder configuration record (
avcC) — ISO/IEC 14496-15:2017 §5.3.3. - bitreader
- Exp-Golomb bit reader over an RBSP byte stream.
- box_
types - ISOBMFF Box/FullBox layer — ISO/IEC 14496-12:2015 §4.2.
- cenc
- Common Encryption boxes — ISO/IEC 23001-7 (CENC) + ISO/IEC 14496-12:2015 §8.12.
- cenc_
decrypt - CENC decrypt — unprotect a Common-Encryption fMP4 (ISO/IEC 23001-7).
- cenc_
encrypt - CENC/CBCS sample encryption —
CencEncryptor(issue #564). - cli
transmuxcommand-line packager — the any-to-any hub as a CLI (issue #482).- dash
- DASH
.mpdMedia Presentation Description generation — ISO/IEC 23009-1. - dash_
parse - DASH
.mpdMedia Presentation Description parser — ISO/IEC 23009-1 — the structural inverse ofcrate::dash’sDashPackagerwriter. - drm
- Multi-DRM
psshinit-data payload generation. - dts
- DTS audio in ISOBMFF —
dtsc/dtsh/dtsl/dtseAudioSampleEntry +ddtsconfig box. - error
- Error type returned by every parser and builder in this crate.
- flac
- FLAC in ISOBMFF —
fLaCAudioSampleEntry +dfLaconfig box. - flv
- FLV (Flash Video) container spoke — Adobe Flash Video File Format
Specification v10.1, Annex E; see
transmux/docs/codec/flv.md. - flv_
stream - Streaming (incremental) FLV → samples demux for live RTMP ingest (#738),
mirroring
StreamingTsDemux(issue #555) for the FLV container (Adobe FLV v10.1 Annex E — seetransmux/docs/codec/flv.mdandcrate::flvfor the wire layout). - hevc_
config - HEVC decoder configuration record (
hvcC) — ISO/IEC 14496-15:2017 §8.3.3. - init_
segment - Typed init-segment (moov) box tree — ISO/IEC 14496-12:2015 §8.2–8.7.
- ir
- The transmux media intermediate representation (IR).
- klv
- KLV (Key-Length-Value) timed metadata — SMPTE ST 336 framing + MISB ST 0601 UAS Datalink Local Set.
- ll_dash
- Low-latency DASH — chunked CMAF packaging + LL-DASH MPD signalling.
- ll_hls
- Low-Latency HLS — partial segments (CMAF chunks) + playlist directives.
- media
- The any-to-any hub impls over the
crate::irmedia IR. - mkv_mux
- Matroska (MKV) container muxer —
MkvMux. - movie_
fragment - Movie Fragment boxes - ISO/IEC 14496-12:2015 §8.8.
- mp4esds
- MPEG-4 elementary-stream descriptor chain (
esdsbox) — ISO/IEC 14496-1:2010 §7.2.6 / ISO/IEC 14496-14:2003 §5.6. - mpeg_
legacy - Legacy-codec elementary-stream headers: MPEG-2 video (H.262) sequence header and MPEG-1/2 audio (MP1/2/3) frame header.
- mpegh
- MPEG-H 3D Audio in ISOBMFF —
mha1/mhm1+mhaC(ISO/IEC 23008-3 §20). - nal
- NAL-unit-type classification + IDR/IRAP keyframe detection for AVC/HEVC/VVC.
- nalu_
types - NAL unit byte-slice newtypes and typed arrays for AVC/HEVC decoder config records.
- opus
- Opus in ISOBMFF —
OpusAudioSampleEntry +dOpsconfig box. - pipeline
- TS → CMAF/fMP4 remux pipeline — the muxer above the box builders.
- progressive
- Progressive (single-file, non-fragmented) MP4 packager — ISO/IEC 14496-12:2015 §8.
- progressive_
demux - Progressive (single-file, non-fragmented) MP4 demux — ISO/IEC 14496-12:2015 §8.5–§8.7.
- ps_
demux - MPEG-2 Program Stream demuxer → hub
MediaIR. - rebase
- Timeline-conditioning transforms over the
MediaIR — PTS/DTS rebase, offset, and discontinuity-gap insertion (issue #476). - repackage
- fMP4/CMAF repackaging — IR transforms + a driver (ISO/IEC 14496-12; CMAF ISO/IEC 23000-19).
- rtcp
- RTCP — RTP Control Protocol (RFC 3550 §6).
- rtmp
- RTMP (Adobe Real-Time Messaging Protocol) 1.0 transport spoke.
- rtp
- RTP de/packetisation + SDP — RFC 3550 / RFC 6184 / RFC 3640 / RFC 4566.
- rtp_sdp
- SDP fmtp/rtpmap → transmux
CodecConfig(RFC 4566 §5.14/§6, RFC 6184 §8.1, RFC 3640 §4.1). - rtp_
stream - Streaming RTP depayloader — RFC 6184 (H.264) / RFC 3640 (AAC).
- sample_
aes - HLS Sample-AES + full-segment AES-128 content protection.
- sample_
entries - AVC/HEVC sample entries and their config boxes — ISO/IEC 14496-15:2017 §5.4, §8.4.
- sample_
groups - ProducerReferenceTimeBox, SampleGroupDescriptionBox, SampleToGroupBox, and SubSampleInformationBox — ISO/IEC 14496-12:2015 §8.16.5, §8.9.2, §8.9.3, §8.7.7.
- segmenter
- Stateful CMAF segmenter — a streaming wrapper over
build_init_segmentandbuild_media_segment. - segments
- Segment-level ISOBMFF boxes — ISO/IEC 14496-12:2015.
- smooth
- Microsoft Smooth Streaming (ISM/PIFF) output — [MS-SSTR].
- smooth_
parse - Microsoft Smooth Streaming ([MS-SSTR]) client manifest parser +
CodecPrivateDatacodec glue — the structural inverse ofcrate::smooth::SmoothPackager’s writer. - splice
- IR-level timeline splice / concatenation → server-side ad insertion (SSAI),
operating on the
MediaIR before muxing (issue #475). - sps
- H.264 / H.265 sequence parameter set (SPS) decode.
- subtitle_
entries - ISO/IEC 14496-30 subtitle sample entries —
stpp(TTML/IMSC) andwvtt(WebVTT). - timing
- Sample-timing and segment-index boxes — ISO/IEC 14496-12:2015 §8.6/§8.16.
- trickplay
- I-frame-only (trick-play / thumbnail) track derivation from a video track.
- ts_
demux - MPEG-2 Transport Stream demuxer → hub
MediaIR. - ts_hls
- Classic HLS with MPEG-2 TS media segments — RFC 8216 + ISO/IEC 13818-1.
- ts_mux
- Hub
MediaIR → MPEG-2 Transport Stream muxer (the output TS spoke). - validate
- fMP4 / CMAF structural conformance validator — the fMP4 analogue of a TR 101 290 monitor.
- visual_
ext - Visual sample-entry extension boxes — ISO/IEC 14496-12:2015 §12.1.4–5.
- vp9
- VP9 in ISOBMFF —
vp09VisualSampleEntry +vpcCconfig box. - vvc_
config - VVC / H.266 decoder configuration record (
vvcC) — ISO/IEC 14496-15:2022 §11. - webm_
demux - WebM / Matroska (EBML) demuxer — WebM byte stream → the
MediaIR.
Structs§
- App
- RTCP Application-defined packet (RFC 3550 §6.7, PT 204).
- Bye
- RTCP Goodbye (RFC 3550 §6.6, PT 203).
- Common
Header - The 4-byte RTCP common header shared by every packet type (RFC 3550 §6.1).
- Compound
Packet - A compound RTCP packet (RFC 3550 §6.1): a sequence of RTCP packets sent in a single lower-layer datagram. The first packet must be a report (SR or RR); this is validated on both parse and serialize.
- EmsgBox
- A parsed/owned MPEG-DASH Event Message Box (
emsg). - Receiver
Report - RTCP Receiver Report (RFC 3550 §6.4.2, PT 201).
- Report
Block - A reception report block (RFC 3550 §6.4.1, 24 bytes). Carried by both SR and RR, one per reported source.
- Sdes
Chunk - An SDES chunk: an SSRC/CSRC plus its list of items (RFC 3550 §6.5).
- Sdes
Item - A single SDES item: a typed, length-prefixed text field (RFC 3550 §6.5).
- Sender
Report - RTCP Sender Report (RFC 3550 §6.4.1, PT 200).
- Source
Description - RTCP Source Description (RFC 3550 §6.5, PT 202).
Enums§
- Cenc
Scheme - A CENC protection scheme (
schm.scheme_type) — ISO/IEC 23001-7 §4. - Emsg
Version - The
versionbyte of the'emsg'FullBox(DASH-IF Part 10 Table 6-2). - Presentation
Time - The version-discriminated presentation-time field (DASH-IF Part 10 Table 6-2): the only field whose type and reference point differ by version.
- Rtcp
Packet - Any single RTCP packet, dispatched by its common-header
PTbyte (RFC 3550 §6). - Rtcp
Packet Type - The RTCP packet type carried in the common header
PTbyte (RFC 3550 §6). - Sdes
Item Type - SDES item type (RFC 3550 §6.5). Byte-valued; type 0 is the item terminator.
Constants§
- APP_
NAME_ LEN - Length of the APP
namefield — 4 ASCII characters (RFC 3550 §6.7). - PT_APP
- Packet type: Application-defined (RFC 3550 §6.7).
- PT_BYE
- Packet type: Goodbye (RFC 3550 §6.6).
- PT_
RECEIVER_ REPORT - Packet type: Receiver Report (RFC 3550 §6.4.2).
- PT_
SENDER_ REPORT - Packet type: Sender Report (RFC 3550 §6.4.1).
- PT_
SOURCE_ DESCRIPTION - Packet type: Source Description (RFC 3550 §6.5).
- REPORT_
BLOCK_ LEN - Length of a single
ReportBlockon the wire (RFC 3550 §6.4.1). - SDES_
CNAME - SDES item type value: CNAME (RFC 3550 §6.5.1).
- SDES_
EMAIL - SDES item type value: EMAIL (RFC 3550 §6.5.3).
- SDES_
LOC - SDES item type value: LOC (RFC 3550 §6.5.5).
- SDES_
NAME - SDES item type value: NAME (RFC 3550 §6.5.2).
- SDES_
NOTE - SDES item type value: NOTE (RFC 3550 §6.5.7).
- SDES_
PHONE - SDES item type value: PHONE (RFC 3550 §6.5.4).
- SDES_
PRIV - SDES item type value: PRIV (RFC 3550 §6.5.8).
- SDES_
TOOL - SDES item type value: TOOL (RFC 3550 §6.5.6).