9 Commits
Author SHA1 Message Date
shinyobjectz 1926af81a5 Opus reads back off the Mac's own reader (#242): the software backend's decoders are made from Symphonia's registry with a libopus decoder added (io/soft/src/opusdec.rs). Symphonia's MP4 reader found an Opus track and had no decoder for it, so the MP4s raea writes itself on Windows and Linux (H.264 + Opus) read as silent: raea media probe listed no audio and raea media share wrote a copy without its sound 2026-11-25 15:20:20 -08:00
shinyobjectz bc42f11ff2 SG4a: a long render's encoded video and its sound are kept on disk, not in memory
VideoToolbox, openh264 and rav1e each kept every encoded sample in memory until the
end, and the mux copied them all again: a 7-minute film's 1 GB. raea-io-codec's
Samples writes each to an unlinked temp file as it comes out (delete-on-close on
Windows) and remux::annexb_mux_from reads them back one at a time for the mux. The
offline bounce fills each channel as the frames come, sized once from the frame count,
instead of an interleaved copy of the whole sound split in two at the end.
2026-11-22 03:35:01 -08:00
shinyobjectz 3a08d33f37 openh264 keeps every block of a slowly changing dark ground at --quality master (#169)
Its background detection took a dim glow drifting over black for still and copied old blocks forward: 6-8% of dark
blocks stepped in every sampled frame, at any bitrate or quantiser. Off, 0.1%, as a lossless encode of the same frames.
a_dark_glow_drifting_keeps_every_block_at_master asks under 3% (5.3% before, 1.6% now).
2026-11-19 14:30:17 -08:00
shinyobjectz e50c22064f RR3: in progress. A whole video made as shot segments and joined by stream copy, behind RAEA_SEGMENTS=1 until RR3's gates are measured. raea-runtime-segments: a new encoder run (unsigned) at each cut once the segment before holds a second of frames (split.rs), the whole wrapped by the signer so the export is one file with one watermark id, signed once after the join (encode.rs); the join reads the segments' MP4s with re_mp4 (H.264/HEVC to Annex B with their parameter sets ahead of each keyframe, AV1 OBUs as they are) and writes one with muxide, the sound laid under once from the backend's new Backend::sound (AAC on Apple, Opus on soft and av1) (join.rs). Cuts come from each frame of the fed render (an outermost Sequence's data-raea-start, raea-runtime-page shot_starts; the engine's camera cut, raea_sys_frame::shots::Cut set in pre_step) and the timeline's Shots up front. io-codec gains SoundTrack, remux::aac_track and hvcc_params; io-media backend_unsigned and a public sign::wrap. Benches: film.tsx's cut and cut-long compositions, pages.tsx, rr3.sh (segmented against one run: SSIM >= 0.999 and VMAF >= 99 per frame; join under 1 s on 3,600 frames). Tests: two segments joined are one video with one sound and the segments' own bytes; the encoder splits at cuts but not after a short shot 2026-11-17 19:52:34 -08:00
shinyobjectz a00a49319e The copies part of #28 added are folded (dupes 297 -> 295): urls.rs takes the writer of a file's URL as a parameter instead of a test-only twin of raea_io_home::src, and the fixed-quantiser tests join io/soft/tests/quality.rs, sharing its frames of rings and its MP4 encode. tools/dupes.max goes down to exact=295 2026-11-07 18:00:09 -08:00
shinyobjectz 0c419d8164 openh264 takes the fixed quantiser it's asked for (part of #28). With rate control off it ignored the QP range and wrote QP 26: the optimized copy's QP 16 and a GOP's QP gave the same bytes as any other. fixed_qp now uses its Quality mode with the range pinned. That mode needs a bitrate other than 0 (it moves nothing once the QP is pinned), and it refuses a QP under 14, so a lower one is raised to 14. A frame too detailed for openh264's buffer at QP 16 (some 1.6 MB a 1080p frame, noise rather than footage) fails with Native:3, so the copy is made again at QP 26, as every copy was before. io/soft/tests/qp.rs: QP 16 writes over twice QP 40's bytes for the copy and a GOP, a GOP is the same bytes each time, and QP 4 is QP 14; before, 12 and 40 were identical 2026-11-07 18:00:09 -08:00
shinyobjectz 298d32431b #28 (3): --quality reaches openh264 (Windows' and Linux's encoder). It ignored EncodeOpts.quality, so draft and master wrote byte-identical files. openh264 has no constant-quality mode the crate reaches (a fixed QP with rate control off is dropped, since the crate never sets the layer's QP; Quality mode and a pinned QP range under Bitrate mode fail with Native:3), so the quality now scales the bitrate: io/soft quality_kbps, 2x per 0.1 from high (0.85, the given bitrate unchanged), so master is twice it and draft under a fifth. No --quality keeps the bitrate as before. io/soft/tests/quality.rs encodes three seconds of 640x360 at draft, high and master and needs each a quarter larger than the last (before: one file, three times). Encode speed is openh264's at a different bitrate, nothing added per frame (part of #28) 2026-11-07 17:10:13 -08:00
shinyobjectz 08a4b7df02 openh264's MP4s say they are BT.709: both encoders (io/soft h264_encoder and GopEncoder) write the colour description in the stream's VUI (BT.709 primaries, transfer and matrix, limited range), as frames are converted and as the Mac's encoder tags them. Untagged, ffmpeg and other players read Windows and Linux renders as BT.601 and shifted reds and greens. io/soft's colour test reads the SPS each encoder writes. (closes #25) 2026-11-07 15:24:00 -08:00
shinyobjectz f675b0ad2b raea dc579e418 2026-10-31 13:15:29 -07:00