== test file: 1080x1920 white frame with 12 colored words == published: ffmpeg -y -v error -loop 1 -i frame.png -t 1 -r 30 -vf "scale=out_color_matrix=bt709:out_range=tv,format=yuv420p" -c:v libx264 -preset medium -crf 30 -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv out.mp4 as run: ffmpeg -y -v error -loop 1 -i c_white_96_30.png -t 1 -r 30 -vf "scale=out_color_matrix=bt709:out_range=tv,format=yuv420p" -c:v libx264 -preset medium -crf 30 -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv /tmp/b2cmd1.mp4 && ffprobe -v error -show_entries stream=width,height,pix_fmt -of default=nw=1 /tmp/b2cmd1.mp4 file: c_white_96_30.png width=1080 height=1920 pix_fmt=yuv420p exit=0 == edge input: crf 40 on the 36 px frame == published: ffmpeg -y -v error -loop 1 -i frame.png -t 1 -r 30 -vf "scale=out_color_matrix=bt709:out_range=tv,format=yuv420p" -c:v libx264 -preset medium -crf 30 -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv out.mp4 as run: ffmpeg -y -v error -loop 1 -i c_white_36_40.png -t 1 -r 30 -vf "scale=out_color_matrix=bt709:out_range=tv,format=yuv420p" -c:v libx264 -preset medium -crf 40 -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv /tmp/b2cmd2.mp4 && ffprobe -v error -show_entries stream=width,height,pix_fmt -of default=nw=1 /tmp/b2cmd2.mp4 file: c_white_36_40.png width=1080 height=1920 pix_fmt=yuv420p exit=0 == edge input: odd frame size 1079x1919 (yuv420p needs even sizes) == published: ffmpeg -y -v error -loop 1 -i frame.png -t 1 -r 30 -vf "scale=out_color_matrix=bt709:out_range=tv,format=yuv420p" -c:v libx264 -preset medium -crf 30 -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv out.mp4 as run: ffmpeg -y -v error -i c_white_96_30.png -vf crop=1079:1919:0:0 /tmp/b2odd.png && ffmpeg -y -v error -loop 1 -i /tmp/b2odd.png -t 1 -r 30 -vf "scale=out_color_matrix=bt709:out_range=tv,format=yuv420p" -c:v libx264 -crf 30 /tmp/b2cmd3.mp4 file: 1079x1919 crop [libx264 @ 0x5632f3ebf0c0] width not divisible by 2 (1079x1919) [vost#0:0/libx264 @ 0x5632f3ebed00] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height. Error while filtering: Generic error in an external library [out#0/mp4 @ 0x5632f3ebd340] Nothing was written into output file, because at least one of its streams received no packets. exit=187 (expected failure: the encoder refuses odd sizes; a 0-byte output file is left behind) == whole test == not a reader command (server paths, needs the 12-color file): bash test-run.sh as run: cd ~/rt/b2-brand-contrast && bash test-run.sh > /tmp/b2full.log 2>&1; tail -3 /tmp/b2full.log file: test-run.sh pink #E41D61 4.52 4.52 yes gray #727780 4.50 4.50 yes B2: 12 of 12 fixed colours read 4.5 or more in the tool exit=0 == edge: odd height only, 1080x1919, the published command as printed (rerun 2026-11-22) == published: ffmpeg -y -v error -loop 1 -i frame.png -t 1 -r 30 -vf "scale=out_color_matrix=bt709:out_range=tv,format=yuv420p" -c:v libx264 -preset medium -crf 30 -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv out.mp4 as run: ffmpeg -y -v error -loop 1 -i odd-h.png -t 1 -r 30 -vf "scale=out_color_matrix=bt709:out_range=tv,format=yuv420p" -c:v libx264 -preset medium -crf 30 -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv o.mp4 height not divisible by 2 (1080x1919) exit=187 (expected failure; o.mp4 left at 0 bytes)