ChrisTitusTech / ChrisTitusTech/resolve-linux

hqx and 444 quality levels silently produce 10-bit output, not 12-bit

Open Beginner friendly
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
72
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Steps to reproduce

  1. Create a test source:
    ffmpeg -f lavfi -i testsrc2=size=1920x1080:rate=30 -t 1
    -c:v libx264 -pix_fmt yuv420p -y /tmp/src.mp4

  2. Convert at hqx:
    ./resolve_convert.sh -q hqx -o /tmp/out /tmp

  3. Inspect the result:
    ffprobe -v error -select_streams v:0 -show_entries stream=pix_fmt
    -of default=nw=1:nk=1 /tmp/out/src.mov

Expected behavior

12-bit output, as stated in the README quality table and the -h help text.

Actual behavior

yuv422p10le. Same for -q 444, which yields yuv444p10le.

Cause

The dnxhd encoder does not accept 12-bit input:

$ ffmpeg -h encoder=dnxhd
Supported pixel formats: yuv422p yuv422p10le yuv444p10le gbrp10le

ffmpeg auto-selects a supported format and exits 0:

Incompatible pixel format 'yuv422p12le' for codec 'dnxhd',
auto-selecting format 'yuv422p10le'
Stream #0:0: Video: dnxhd (DNXHR HQX), yuv422p10le(tv, progressive)
exit=0

That message is emitted below error level, and convert_video() runs
ffmpeg with -loglevel error, so it is suppressed entirely. The user sees
only the progress counter and receives 10-bit output while the docs
promise 12-bit, with no indication anything changed.

This is not a stale-ffmpeg artifact. The encoder's supported format list
is identical on ffmpeg 6.1.1 and on 8.1.2 (current as of this report).

The profile/bit-depth pairing is a hard constraint in the other direction
too — dnxhr_hq with 10-bit input fails outright:

[dnxhd] pixel format is incompatible with DNxHR LB/SQ/HQ profile
[vost#0:0/dnxhd] Error while opening encoder

So LB/SQ/HQ are 8-bit profiles and HQX/444 are 10-bit profiles. The
script's current mapping has both pairs wrong for hqx and 444.

Environment

OS: Nobara 44
ffmpeg: 8.1.2
bash: 5.3.9(1)-release (x86_64-redhat-linux-gnu)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in resolve_convert.sh, especially convert_video() and the quality-to-profile mapping. Reproduce the hqx and 444 commands, inspect the encoder capabilities with ffmpeg -h encoder=dnxhd, and verify output with ffprobe. Done means the profile and pixel-format behavior match the README and help text without silently producing an unexpected bit depth.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
audio-video-rtc, cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.