ffmpegjpeghevcmp4box

How to encode HEVC tile in JPEG?


I am trying to convert HEIF file into a JPEG file, I extract HEIC images tiles using MP4Box but when convert these tiles into JPEG using FFMPEG I get this :

SAKATA-INX:desktop stellar$ MP4Box -dump-item 1:path=item1.hevc still_rear.HEIC

ICC colour profile not supported ICC colour profile not supported

SAKATA-INX:desktop stellar$ ffmpeg -i item1.hevc -frames:v 1 -vsync vfr -q:v 1 -an test.jpg

ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers built with Apple LLVM version 9.1.0 (clang-902.0.39.1)

configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma

libavutil 56. 14.100 / 56. 14.100

libavcodec 58. 18.100 / 58. 18.100

libavformat 58. 12.100 / 58. 12.100

libavdevice 58. 3.100 / 58. 3.100

libavfilter 7. 16.100 / 7. 16.100

libavresample 4. 0. 0 / 4. 0. 0

libswscale 5. 1.100 / 5. 1.100

libswresample 3. 1.100 / 3. 1.100

libpostproc 55. 1.100 / 55. 1.100

[hevc @ 0x7fc56e808e00] Format hevc detected only with low score of 1, misdetection possible!

[hevc @ 0x7fc56f800000] No start code is found.

[hevc @ 0x7fc56f800000] missing picture in access unit

[AVBSFContext @ 0x7fc56e505e00] No start code is found.

item1.hevc: could not find codec parameters

Input #0, hevc, from 'item1.hevc':

Duration: N/A, bitrate: N/A

Stream #0:0: Video: hevc, none, 1200k tbn

Output #0, image2, to 'test.jpg':

Output file #0 does not contain any stream

Could any one tell me how I can do this ?


Solution

  • Once you have all HEVC files extracted, create a text file

    file file1.hevc
    file file2.hevc
    file file3.hevc
    ...
    file file48.hevc
    

    and then run

    ffmpeg -f concat -i list.txt -vf tile=8x6 -vframes 1 -q:v 1 grid.jpg