The encoding corpus contains no -fps_mode at all, and a broken option went unnoticed #141
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
jellyfin-encoding::input::video_sync_optionhanded the number to the option that takes a name. Upstream maps-1 → autofor ffmpeg 5.1 and later; ours emitted-fps_mode -1, which ffmpeg refuses outright — so every command line reaching that option failed, including the attachment burn-in path, whereattach.rs:123setsinput_video_sync = "-1".Found while implementing #98, and fixed there. The corpus did not catch it, and could not: neither
corpus/progressive-video.jsonnorcorpus/hls.jsoncontains the string-fps_modeanywhere, across 5,624 cases.That is the interesting part. The corpus is this project's strongest instrument — M5 records 5,300 checked cases and the argument that the measure is not how many pass but which branches one would notice breaking. An option that appears in none of them is a branch nobody would notice breaking, and one did.
What to do
Two things, and the second matters more than the first.
-fps_modeand itsauto/passthrough/cfr/vfrspellings appear in generated cases. The generator is a C# program linking upstream (D19), so this is a matter of which states it sweeps.crates/jellyfin-encodingcan emit, and check each against the corpus. Anything with zero occurrences is a branch the corpus does not defend, and the list of those is worth more than this one option.crates/jellyfin-encoding/README.mdis where the answer belongs, beside what green already does not mean.How to know it is done
Every option this crate can emit occurs in at least one corpus case, or is listed in the encoding README as knowingly unswept with a reason — and breaking
video_sync_optionagain fails a case.House rules
Tests run under
cargo nextest; upstream's source is the checkout inupstream/at the pin; generated artifacts are regenerated, never edited. The reference on:8096is read-only, andStudios=/Artists=/Albums=are writes — upstream resolves them throughCreateItemByName. Anything needing a write gets its own container from the pinned image over acp -acopy of a snapshot. Kill a server by the PIDss -lntpH 'sport = :NNNN'reports; neverpkill,killall, orpgrep -fwith a pattern your own command line contains.Landed in
4c07fd3, with review fixes in582ed4e.The audit, which is the half that was worth more
crates/ephyra-encoding/tests/swept.rstakes every option this crate can emitout of its own source and looks for each in the arg strings the three corpora
record. One that occurs in none is either swept in or named in a table with the
reason nothing reaches it, and one that is neither fails the test.
Thirty-four of the hundred and eleven options this crate emits are in no
corpus case. The subtitle and attachment extractors' whole command lines
(they are not an entry point the generator drives); every option that needs a
source read at its native rate, one that requires looping, an RTSP input, or
remote HTTP headers; five audio targets the audio corpus does not reach; and a
handful needing a container, codec or hardware combination the sweep does not
produce. Each is named with its reason, and
crates/ephyra-encoding/README.mdrecords the count beside what green already does not mean.
The review caught the audit under-reporting twice, which is worth recording
because both are easy to write:
'"'or an escaped quotedesynchronised it and every literal after that point in the file was read as
the wrong thing — nine options silently uncounted, including all of
-map 0:N -an -vn -c:s … -flush_packets 1and-dump_attachment:t "" … -safe 0.It lexes now, and finds 111 where it found 86.
-rewascalled swept by the case id
hevc-rext-10bit-mkv. It compares tokens of thearg strings alone.
Both numbers are pinned. A scanner that quietly stopped finding half the options
would have stayed above a floor.
Sweeping
-fps_modein: it cannot be doneNot an oversight in the generator.
OutputVideoSyncis settable and assignednowhere in upstream's tree, so no case can carry a state that sets it.
InputVideoSyncis set — for a stream read at its native rate and for awtvfile — but the option it becomes is applied to an input only below ffmpeg 5.1,
and both probed environments are 7.1.5.1 and 8.1.2. There is no legitimate
generated case that reaches either option.
So the acceptance's other branch applies: both are named with that reason, and
the mapping is asserted directly in
input::tests— a test that fails when-fps_modeis handed the number-vsynctook, which is the defect that reachedthe burn-in path with 5,624 cases green.
The review also caught that function diverging from upstream: it passed a value
it could not parse through as
-fps_mode <name>, where upstream returns nothing.The test had asserted the passthrough — certifying the wrong answer for the one
function no corpus case can check. Both fixed.