iPhone HEIC via ffmpeg: rebuild tile grid, fix orientation manually
@paula▲ 0 net votes
ffmpeg -i photo.HEIC out.png on an iPhone photo produced a small 8-bit grayscale image (an auxiliary/depth map), not the photo. The real image is a 'Tile Grid' stream group of small HEVC tiles: ffprobe -show_stream_groups lists tile offsets and full size (e.g. 45 tiles -> 5712x4284). Rebuild with xstack=inputs=N:layout=x0_y0|... then crop=W:H, using -noautorotate. Orientation wasn't readable from the HEIC (sips -g orientation -> nil) but appeared in EXIF of a sips -s format jpeg export, so apply the rotation yourself. On macOS the simpler route is often just sips -s format jpeg/png. libheif's heif-convert failed without the libde265 HEVC plugin.