Opened 22 months ago
Closed 8 months ago
#11170 closed enhancement (fixed)
Support merging HEIC tile grids in ffmpeg
| Reported by: | markshw2222 | Owned by: | |
|---|---|---|---|
| Priority: | wish | Component: | ffmpeg |
| Version: | git-master | Keywords: | |
| Cc: | markshw2222, MasterQuestionable | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | yes |
Description
Summary of the bug:
How to reproduce:
ffmpeg -i input.heic output.png
Attachments (1)
Change History (6)
by , 22 months ago
| Attachment: | IMG_4765.HEIC added |
|---|
comment:1 by , 21 months ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
comment:2 by , 21 months ago
| Component: | undetermined → ffmpeg |
|---|---|
| Priority: | normal → wish |
| Resolution: | invalid |
| Status: | closed → reopened |
| Summary: | transcoding of HEIC images results in black/white image → Support merging HEIC tile grids in ffmpeg |
| Type: | defect → enhancement |
| Version: | unspecified → git-master |
Upon further inspection, the gray stream should not be selected by default by the CLI as it's the HDR gainmap.
Changing this to a feature request to merge and output the main image, and tag the HDR gainmap as such.
comment:3 by , 20 months ago
One way is
Get grid info
ffprobe -loglevel trace input.heic 2>&1 | grep grid_row
Extract grid images
ffmpeg -i input.heic -map 0 output_%d.png
Then
Merge
ffmpeg -i pngs/output_%d.png -vf "tile=8x6" final_output.png
comment:4 by , 16 months ago
| Analyzed by developer: | set |
|---|---|
| Cc: | added |
͏ Duplicates:
͏ https://trac.ffmpeg.org/ticket/11297
͏ https://trac.ffmpeg.org/ticket/11478
͏ See also: https://trac.ffmpeg.org/ticket/6521#comment:20
comment:5 by , 8 months ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
Implemented in 5ff8395e7806ad27743829b047067098c288782a



Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'IMG_4765.HEIC': Metadata: major_brand : heic minor_version : 0 compatible_brands: mif1MiHEMiPrmiafMiHBheic Duration: N/A, start: 0.000000, bitrate: N/A Stream group #0:0[0x31]: Tile Grid: hevc (Main Still Picture) (hvc1 / 0x31637668), yuvj420p(pc, smpte170m/smpte432/bt709), 4032x3024 (default) Stream #0:48[0x32]: Video: hevc (Main Still Picture) (hvc1 / 0x31637668), yuvj420p(pc, smpte170m/smpte432/bt709), 320x240, 1 fps, 1 tbr, 1 tbn Side data: ICC Profile Stream #0:49[0x33]: Video: hevc (Rext) (hvc1 / 0x31637668), gray(pc), 2016x1512, 1 fps, 1 tbr, 1 tbn Side data: ICC Profile Stream mapping: Stream #0:49 -> #0:0 (hevc (native) -> png (native)) Press [q] to stop, [?] for help Output #0, image2, to 'heic.png': Metadata: major_brand : heic minor_version : 0 compatible_brands: mif1MiHEMiPrmiafMiHBheic encoder : Lavf61.8.100 Stream #0:0: Video: png, gray(pc, progressive), 2016x1512, q=2-31, 200 kb/s, 1 fps, 1 tbn Metadata: encoder : Lavc61.20.100 png Side data: ICC ProfileSee the "Stream #0:49". By default, ffmpeg chooses the gray 2016x1512 hevc stream if you don't set manual maps.