Files
LibretroAdmin 33c6ef9258 samples: FFmpeg 8 colour tags, and the AV1 hardware tests' MP4 writer
webm_av1_hw_test and preview_av1_hw_test still called make_mp4, which
the last change removed, and took the MP4 writer through
rav1_webm_fixture.h, which now asks for the byte helpers alone. Both
include rav1_mp4_fixture.h first for the whole writer and call
make_mp4_clip(1, 0).

FFmpeg 7.1 and later take a frame's primaries and transfer into the
encoder over the -color_primaries and -color_trc output options, so
libaom, libvpx and libx265 without its own colour parameters write
untagged streams. mp4_mux's HDR sources lost their transfer and run.py
stopped on the missing key; the frames are now tagged with setparams.
The same goes for the hand-run generators that tag through those
options alone: gen_av1_decode.py's colour stream, the D3D11 HDR AV1
fixtures and mkhdrfixtures.py's VP9 movies.

FFmpeg 8's concat also converts every segment to the first one's
colour space, so the ffmpeg_live colour-metadata lane could no longer
switch from BT.709 to BT.601 inside one lavfi graph: the second half
arrived converted and labelled BT.709. The lane now plays one BT.709
segment and its receive_frame wrapper relabels the frames after the
third as BT.601, which is the transition the driver has to follow.

The webm_player timeline-gap fixtures cut their silent second with
aselect before the encoder, and FFmpeg 8 closes that gap: the next
frame takes the previous one's end, so the packets ran on unbroken and
the seek into the gap found signal. The packets are now dropped after
the encoder with the noise bitstream filter, which keeps every
timestamp and gives the same packets on FFmpeg 6.1 and 8.
2026-11-05 21:10:54 +01:00
..

Bounded native MP4 output

record/record_mux_mp4 builds an initialization segment and one moof/mdat fragment per encoded access unit. H.264/HEVC Annex B input becomes four-byte NAL lengths; AV1 uses sized OBUs with temporal delimiters/padding removed. AVC/HEVC/AV1 configuration comes from the producer's sequence headers. Input is restricted to matching 4:2:0 8/10-bit configurations (H.264 is 8-bit), one parameter set per kind, and DTS=PTS without B frames. The optional AC-3 track uses the existing frame parser and its own sample-rate clock.

All buffers are allocated at open. Each output chunk remains borrowed until release; BUSY leaves input/timing/sequence state untouched. Failed input does not advance either track. Timestamps are 64-bit, durations are nonzero 32-bit track ticks, and overlap is refused per track while gaps are retained. Acknowledged fragments form a playable prefix. Finish needs no seek-back, index or trailer, but the caller must still drain/close its asynchronous output and report file errors. There is no file I/O or pixel readback here. Frontend scheduling, async file output and live core-audio hookup remain pending; this does not register a frontend recording mode.

make check runs bounds/ownership/error tests and 20 independently decoded A/V files: H.264, HEVC/AV1 8/10-bit, video-only or native AC-3 at 48 kHz stereo, 44.1 kHz mono and 32 kHz 5.1. FFmpeg/ffprobe are test-only dependencies. The oracle checks pixels, audio samples, codec/geometry/bit depth, per-track timestamps, duration, keyframes and recovery of complete-fragment prefixes. make check CC=x86_64-w64-mingw32-gcc EXE=.exe RUNNER=wine uses the same oracle.

Format references: fragmented ISO BMFF, AV1 binding, and AC-3 dac3, Annex F.

On Windows the fixture drains each MP4 borrow through the production overlapped file writer, then flushes/closes before invoking the independent decoder.