mux/mp4: M2 — audio tracks + fit oracle (multi-track)
Generalize the sink to N tracks: one video + every MP4-mappable audio track. Audio sample entries built from the first frame's bitstream — AC-3 (ac-3/dac3) and E-AC-3 (ec-3/dec3), parsing the (E-)AC-3 BSI for fscod/bsid/bsmod/acmod/lfeon and the data rate. Per-sample audio durations from PTS deltas (no reorder → no ctts, all sync). Fit oracle (mp4_fit_report, exported): video HEVC/H264, audio AC-3/E-AC-3; TrueHD/DTS/LPCM and bitmap subs are excluded with a typed reason so the CLI can report exclusions — never a silent drop. Verified vs ffmpeg -c copy on real discs: AVC+AC3 and HEVC(HDR10)+AC3 both frame-exact on every track (video 2650/4270, audio 5567/3454), duration and colour identical, clean decode. On a pathological 4-clip title ffmpeg's OWN output emits the same DTS-monotonicity warnings (more of them) — source-inherent, not a muxer defect.
This commit is contained in:
@@ -116,6 +116,7 @@ pub(crate) mod videomap;
|
||||
pub use disc::DiscStream;
|
||||
pub use m2ts::M2tsStream;
|
||||
pub use mkvstream::MkvStream;
|
||||
pub use mp4::{Mp4FitReport, Mp4SkipReason, fit_report as mp4_fit_report};
|
||||
pub use network::NetworkStream;
|
||||
pub use null::NullStream;
|
||||
pub use pipelined_stream::PipelinedPesStream;
|
||||
|
||||
Reference in New Issue
Block a user