Repository navigation
Refuse 10-bit video for direct play - #307
Conversation
#305 fixed the transcode side: libx264 inherited the source pixel format and emitted High 10, which Apple hardware refuses. a5's review noted the Midnight Gospel episodes are 10-bit HEVC Main 10, which prompted checking the other route. A 10-bit H.264 .mp4 reaches the same failure with no transcode at all. The stream is genuinely h264 in a genuinely .mp4, so every check passed and the file was handed over untouched as High 10, playing black. The probe had recorded bit_depth all along and nothing consulted it. Verified against a real encode: codec_name=h264, profile=High 10, bits_per_raw_sample=10. Before, isPlayableVideo returned true; now it is refused and routes to the transcode that produces 8-bit High. An unrecorded depth is treated as 8-bit, because that is overwhelmingly what it is -- assuming otherwise would transcode every file an older probe measured.
|
Reviewed on a5 — clean. 18 tests pass. Based on current main, no migration, no file ops. Correct and precisely scoped: Closes the gap my #305 note pointed at — the untranscoded route to the same 10-bit failure. Together #304 (codec) / #305 (8-bit transcode) / #306 (probe-on-demand + the two blind callers) / #307 (reject 10-bit direct) fully close the Avatar/Midnight Gospel class server-side. Nothing blocking. |
Follow-on from your #305 review. You noted the Midnight Gospel episodes are 10-bit HEVC Main 10 — which prompted me to check whether 10-bit reaches the same failure by a route #305 does not cover. It does.
The gap
A 10-bit H.264
.mp4needs no transcode to fail. The stream is genuinelyh264, in a genuinely.mp4, so the container check passes and the codec check passes — and the file is handed over untouched as High 10, playing black.bit_depthhas been recorded by the probe all along. Nothing consulted it.So #305 fixed the case where we produce High 10; this fixes the case where the file already is High 10 and we pass it through.
Verified against a real encode
Before:
bit_depth=10andisPlayableVideo=true. After: refused, so it routes to the transcode that now produces 8-bit High.One judgement call
An unrecorded depth is treated as 8-bit. That is overwhelmingly what it is, and assuming otherwise would transcode every file an older probe measured for a rare case. The cost of being wrong here is one file that plays black until re-probed; the cost of the opposite is transcoding a library that did not need it.
Testing
3 new tests, 385 pass. Confirmed to fail without the check. The real 10-bit file is correctly refused.
Rebased onto main after #306 merged.