# iphone-video-for-upload: commands.log (2026-11-21, ffmpeg 6.1.1) test file: hdr.mov (derived by us, not recorded on an iPhone: test pattern encoded as HEVC 10-bit, HLG transfer, BT.2020, in a MOV) codec_name=hevc width=1920 height=1080 pix_fmt=yuv420p10le color_transfer=arib-std-b67 r_frame_rate=30/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=5.000000 size=5252432 ## 0. what kind of file is it? published: ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,pix_fmt,color_transfer -of default=nw=1 hdr.mov codec_name=hevc pix_fmt=yuv420p10le color_transfer=arib-std-b67 exit=0 edge: the SDR file published: ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,pix_fmt,color_transfer -of default=nw=1 sdr-hevc.mov codec_name=hevc pix_fmt=yuv420p color_transfer=unknown exit=0 ## 1. HEVC to H.264, colours left as tagged (SDR sources) published: ffmpeg -i sdr-hevc.mov -c:v libx264 -crf 20 -pix_fmt yuv420p -c:a aac -b:a 160k -movflags +faststart sdr.mp4 exit=0 time=6.462s codec_name=h264 width=1920 height=1080 pix_fmt=yuv420p color_transfer=unknown r_frame_rate=30/1 duration=4.000000 size=3832900 edge: the HLG 10-bit file through the same command published: ffmpeg -i hdr.mov -c:v libx264 -crf 20 -pix_fmt yuv420p -c:a aac -b:a 160k -movflags +faststart hdr-naive.mp4 exit=0 time=11.34s codec_name=h264 width=1920 height=1080 pix_fmt=yuv420p color_transfer=arib-std-b67 r_frame_rate=30/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=5.015011 size=4809780 ## 2. HDR (HLG) to SDR with tone mapping published: ffmpeg -i hdr.mov -vf "zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=hable,zscale=t=bt709:m=bt709:r=tv,format=yuv420p" -c:v libx264 -crf 20 -c:a aac -b:a 160k -movflags +faststart hdr-to-sdr.mp4 exit=0 time=11.47s codec_name=h264 width=1920 height=1080 pix_fmt=yuv420p color_transfer=bt709 r_frame_rate=30/1 codec_name=aac sample_rate=44100 channels=1 r_frame_rate=0/0 duration=5.015011 size=4866020 edge: an SDR 8-bit HEVC file through the tone-mapping command published: ffmpeg -i sdr-hevc.mov -vf "zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=hable,zscale=t=bt709:m=bt709:r=tv,format=yuv420p" -c:v libx264 -crf 20 -c:a aac -b:a 160k -movflags +faststart edge-sdr-tonemapped.mp4 [Parsed_zscale_0 @ 0x5f79a58dca40] code 3074: no path between colorspaces Last message repeated 17 times [vf#0:0 @ 0x5f79a5885540] Error while filtering: Generic error in an external library Failed to inject frame into filter network: Generic error in an external library Error while filtering: Generic error in an external library [out#0/mp4 @ 0x5f79a58cf440] Nothing was written into output file, because at least one of its streams received no packets. exit=187 time=.4201s file exists but is unreadable: 0 bytes ## what changed: transfer tag and average brightness of the first frame (YAVG from signalstats, 8-bit scale) hdr-naive.mp4: transfer=arib-std-b67 YAVG=126.232 hdr-to-sdr.mp4: transfer=bt709 YAVG=147.801 sdr.mp4: transfer=unknown YAVG=126.23 note: edge-sdr-tonemapped.mp4 was not written (the tone-mapping command stops on an SDR input, exit 187 above) 4866020 bytes hdr-to-sdr.mp4 5252432 bytes hdr.mov