published: ffmpeg -v error -ss 3 -t 5 -i hoverfly.webm -i qr.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -an -c:v libx264 -preset medium -b:v 6000k -pix_fmt yuv420p out.mp4 run: ffmpeg -v error -ss 3 -t 5 -i hoverfly.webm -i qr/short-M.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -an -c:v libx264 -preset medium -b:v 6000k -pix_fmt yuv420p out.mp4 exit=0 published: ffmpeg -v error -ss 3 -t 5 -i hoverfly.webm -i qr.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -an -c:v libx264 -preset medium -b:v 6000k -pix_fmt yuv420p out.mp4 run: ffmpeg -v error -ss 3 -t 5 -i hoverfly.webm -i missing.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -an -c:v libx264 -preset medium -b:v 6000k -pix_fmt yuv420p out-edge.mp4 [in#1 @ 0x5a1c44053580] Error opening input: No such file or directory Error opening input file missing.png. Error opening input files: No such file or directory exit=254 edge: missing.png does not exist, so ffmpeg stops with an error and writes no video published: python3 decode-cv.py out.mp4 5 "https://koldflux.com/tools/qr-code" run: python3 decode-cv.py out.mp4 5 "https://koldflux.com/tools/qr-code" 31 31 31 exit=0 published: python3 decode-cv.py out.mp4 5 "https://koldflux.com/tools/qr-code" run: python3 decode-cv.py out-noqr.mp4 5 "https://koldflux.com/tools/qr-code" 0 0 31 exit=0 edge: out-noqr.mp4 is the same clip with no code on it, so a correct decoder reports 0 of 31 published: node decode-jsqr.cjs out.mp4 5 "https://koldflux.com/tools/qr-code" run: node decode-jsqr.cjs out.mp4 5 "https://koldflux.com/tools/qr-code" 31 31 exit=0 published: node decode-jsqr.cjs out.mp4 5 "https://koldflux.com/tools/qr-code" run: node decode-jsqr.cjs out-noqr.mp4 5 "https://koldflux.com/tools/qr-code" 0 31 exit=0 edge: out-noqr.mp4 has no code, so jsQR should report 0 of 31 published: node decode-jsqr.cjs out.mp4 5 "https://koldflux.com/tools/qr-code" run: node decode-jsqr.cjs s720.mp4 5 "https://koldflux.com/tools/qr-code" 31 31 exit=0 edge: out.mp4 re-exported at 1280x720, the script reads the size from the file (the version before this check hard-coded 1920x1080 and printed 0 13) published: python3 decode-cv.py out.mp4 5 "https://koldflux.com/tools/qr-code" run: python3 decode-cv.py s720.mp4 5 "https://koldflux.com/tools/qr-code" 31 31 31 exit=0 edge: the same 1280x720 file in OpenCV published: node decode-jsqr.cjs out.mp4 5 "https://koldflux.com/tools/qr-code" run: node decode-jsqr.cjs s916.mp4 5 "https://koldflux.com/tools/qr-code" 28 31 exit=0 edge: out.mp4 squeezed to 720x1280 (the code is distorted, only the size handling is tested) published: node decode-jsqr.cjs out.mp4 5 "https://koldflux.com/tools/qr-code" run: node decode-jsqr.cjs long.mp4 5 "https://koldflux.com/tools/qr-code" ffmpeg output too large for one run (ENOBUFS): cut a shorter test segment, for example -t 5 exit=1 edge: a 40-second 1080p export is too large for one run, so the script stops with an error and exit 1 and does not print a partial count; cut a test segment with -t 5 published: ffmpeg -v error -ss 3 -t 5 -i hoverfly.webm -i qr.png ... out.mp4 run: ffmpeg -v error -y -ss 3 -t 5 -i short2s.mp4 -i qr.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -an -c:v libx264 -preset medium -b:v 6000k -pix_fmt yuv420p e4.mp4; ls -l e4.mp4 | awk "{print \$5, \"bytes\"}" 262 bytes exit=0 edge: the source is 2 seconds long, so -ss 3 is past its end: ffmpeg exits 0 and writes an empty file of about 262 bytes published: node decode-jsqr.cjs out.mp4 5 "https://koldflux.com/tools/qr-code" run: node decode-jsqr.cjs e4.mp4 5 "https://koldflux.com/tools/qr-code" cannot read the video size (missing or unreadable file?) exit=1 edge: the empty file: the script stops with "cannot read the video size" and exit 1 published: node decode-jsqr.cjs out.mp4 5 "https://koldflux.com/tools/qr-code" run: node decode-jsqr.cjs missing.mp4 5 "https://koldflux.com/tools/qr-code" cannot read the video size (missing or unreadable file?) exit=1 edge: missing file: error and exit 1 instead of a result == added 2026-11-22 (editor, after an outside audit): overlay on the whole video with its sound, a sample cut, decode of the sample == input.mp4 = 9 s of the test clip at 1920x1080 with a 440 Hz tone as its sound track; silent.mp4 = the same without sound input.mp4: duration=9.007000 streams=video audio silent.mp4: duration=8.975633 streams=video published: ffmpeg -v error -i input.mp4 -i qr.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -c:v libx264 -preset medium -b:v 6000k -c:a copy with-qr.mp4 run: ffmpeg -v error -i input.mp4 -i qr.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -c:v libx264 -preset medium -b:v 6000k -c:a copy with-qr.mp4 -y with-qr.mp4: duration=9.007000 streams=video audio exit=0 published: ffmpeg -v error -i input.mp4 -i qr.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -c:v libx264 -preset medium -b:v 6000k -c:a copy with-qr.mp4 run: ffmpeg -v error -i silent.mp4 -i qr.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -c:v libx264 -preset medium -b:v 6000k -c:a copy e-silent.mp4 -y e-silent.mp4: duration=8.975633 streams=video exit=0 edge: an input with no sound track: works, output has video only published: ffmpeg -v error -i input.mp4 -i qr.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -c:v libx264 -preset medium -b:v 6000k -c:a copy with-qr.mp4 run: ffmpeg -v error -i missing.mp4 -i qr.png -filter_complex "[1:v]scale=240:240:flags=bicubic[q];[0:v][q]overlay=main_w-w-60:main_h-h-60,format=yuv420p" -c:v libx264 -preset medium -b:v 6000k -c:a copy e-missing.mp4 -y [in#0 @ 0x5a197ade5d40] Error opening input: No such file or directory Error opening input file missing.mp4. Error opening input files: No such file or directory exit=254 edge: a missing input: error, exit 254, no file written published: ffmpeg -v error -ss 3 -t 5 -i with-qr.mp4 -an -c:v libx264 -preset medium -crf 18 sample.mp4 run: ffmpeg -v error -ss 3 -t 5 -i with-qr.mp4 -an -c:v libx264 -preset medium -crf 18 sample.mp4 -y sample.mp4: duration=5.005000 streams=video exit=0 published: ffmpeg -v error -ss 3 -t 5 -i with-qr.mp4 -an -c:v libx264 -preset medium -crf 18 sample.mp4 run: ffmpeg -v error -ss 3 -t 5 -i e-short.mp4 -an -c:v libx264 -preset medium -crf 18 e-cut.mp4 -y; ls -l e-cut.mp4 | cut -d' ' -f5 262 exit=0 edge: a source shorter than 3 s (2 s): exit 0 and an empty file of the size printed above published: python3 decode-cv.py sample.mp4 5 "https://koldflux.com/tools/qr-code" run: python3 decode-cv.py sample.mp4 5 "https://koldflux.com/tools/qr-code" 30 30 30 exit=0 published: node decode-jsqr.cjs sample.mp4 5 "https://koldflux.com/tools/qr-code" run: node decode-jsqr.cjs sample.mp4 5 "https://koldflux.com/tools/qr-code" 30 30 exit=0 published: node decode-jsqr.cjs sample.mp4 5 "https://koldflux.com/tools/qr-code" run: node decode-jsqr.cjs with-qr.mp4 5 "https://koldflux.com/tools/qr-code" 54 54 exit=0 edge: the full 9 s file instead of the sample published: python3 decode-cv.py sample.mp4 5 "https://koldflux.com/tools/qr-code" run: python3 decode-cv.py e-noqr.mp4 5 "https://koldflux.com/tools/qr-code" 0 0 30 exit=0 edge: control: the same cut with no code on it published: node decode-jsqr.cjs sample.mp4 5 "https://koldflux.com/tools/qr-code" run: node decode-jsqr.cjs e-noqr.mp4 5 "https://koldflux.com/tools/qr-code" 0 30 exit=0 edge: control: the same cut with no code on it