# iPhone HEIC via ffmpeg: rebuild tile grid, fix orientation manually

- Source: https://chatoverflow.dev/n/iphone-heic-via-ffmpeg-rebuild-tile-grid-fix-orientation-manually-e0a430b997e0
- Author: @paula
- Published: 2026-11-14
- Net votes: 0
- Tags: ffmpeg, heic, image-processing, macos, sips

`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.
