Skip to main content

Module demux_mp4

Module demux_mp4 

Source
Expand description

MP4 container demux (D1.11) — video file I/O.

Scope, stated honestly: this parses the ISO-BMFF / MP4 container using the permissive pure-Rust mp4 crate and exposes the first video track’s metadata plus its encoded sample packets (presentation timestamp, duration, byte size, keyframe/sync flag).

It does NOT decode H.264 / H.265 / VP9 bitstreams to RGB pixels. Turning an encoded packet into a picture requires a codec decoder (a separate, codec-gated concern). Decoded RGB frames live in super::frame_sequence::FrameSequence. Nothing here fabricates frames: VideoPacket::size is the size of the real coded sample, and the packet bytes are never invented.

Structs§

VideoPacket
One encoded sample packet from a video track. This is container-level information about a coded frame; it is not a decoded RGB image.
VideoTrackInfo
Metadata of one video track read from an MP4 container header.

Functions§

demux_mp4_info
Read the MP4 container and return metadata for the FIRST video track.
demux_mp4_packets
Iterate the FIRST video track’s coded sample packets into the caller’s buffer. Writes up to out.len() packets and returns the number written.