Repository navigation
fix(encode): make 8-bit the default H.264 output - #441
Merged
Merged
Conversation
The default H.264 branch pushed -profile:v high10 -pix_fmt yuv420p10le with no gate at all, so every render without --hardware-acceleration produced a High 10 file. QuickTime and Safari refuse those outright, and a user reported exactly that: a file the tool had just written and they could not open. The default is now -profile:v high -pix_fmt yuv420p. The old encode is still reachable as --codec h264_10bit, which is the same libx264 call with the same crf and preset. Making it a codec name rather than a new flag means it travels the plumbing that already exists: codec: &str already reaches ffmpeg_args from nine call sites, so nothing needed a new parameter. check_codec's allow-list and containers_for both had to learn the name -- the first rejected it before ffmpeg_args ever saw it, which is how the first attempt silently produced an 8-bit file for --codec h264_10bit. Verified end to end with ffprobe: the default gives h264/High/yuv420p, --codec h264_10bit gives h264/High 10/yuv420p10le. The docs claimed 10-bit as the default in five places -- README, CLAUDE, SKILL, and rules/gradient-quality.md -- and recommended ProRes for dark gradients without mentioning that 10-bit H.264 was already on. All four now say which of the two trades away playback and why. Refs #435
2 tasks
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #435 — first item. The second, publishing to crates.io, is outward-facing and
irreversible, so it stops at the boundary: see the end.
The default H.264 branch pushed
-profile:v high10 -pix_fmt yuv420p10lewith nogate at all, so every render without
--hardware-accelerationproduced a High 10file. QuickTime and Safari refuse those outright, and a user reported exactly
that: a file the tool had just written and they could not open.
The default is now
-profile:v high -pix_fmt yuv420p. The old encode is stillreachable as
--codec h264_10bit, the same libx264 call with the same crf andpreset.
Making it a codec name rather than a new flag means it travels plumbing that
already exists:
codec: &strreachesffmpeg_argsfrom nine call sites, sonothing needed a new parameter. Two lists had to learn the name —
check_codec'sallow-list and
containers_for. The first is how the initial attempt silentlyproduced an 8-bit file for
--codec h264_10bit: the name was rejected upstreamand
ffmpeg_argsnever saw it, while the.mp4left over from the previous runmade it look like it had worked. The end-to-end check is the only reason that was
caught.
Verified with
ffprobe:The docs claimed 10-bit as the default in four places —
README.md,CLAUDE.md,SKILL.mdandrules/gradient-quality.md— andgradient-quality.mdrecommendedProRes for dark gradients without mentioning that 10-bit H.264 was already on. All
four now say which of the two trades away playback, and why 10-bit is not the
default: the reason is not quality.
Tests
the_default_h264_output_is_eight_bit,ten_bit_is_still_reachable_by_asking_for_it,an_unknown_codec_name_falls_back_to_the_playable_default, and three invalidation.rspinning that every nameffmpeg_argsbranches on is accepted bycheck_codec— which is the invariant that broke.Not in this PR
The release itself.
mainis well ahead of the 0.7.0 on crates.io, and #435 asksfor a version bump, a changelog and a publish. Publishing is outward-facing and
cannot be undone, so it is yours to run. There is also no
CHANGELOG.mdin therepository, so the format is a decision rather than a fill-in.
cargo fmt --all --checkclean ·cargo test -p rustmotion --lib encode::video::ffmpeg cli::commands::validation45 passed. The full workspace run is the orchestrator's after the parallel workstreams integrate.