1

I using FFmpeg to create thumbnails from HDR videos recorded with an iPhone but the colors of the generated JPG file look washed out. Here is a screenshot I took while running the video in a player and the other picture is a JPG generated with FFmpeg.

Screenshot from Movie:

enter image description here

Thumbnail from FFmpeg:

enter image description here

Here´s a link to the mov-file: https://www.dropbox.com/s/udowplvfspxq6ag/IMG_8357.MOV?dl=1

I use the standard command to generate the thumbnails: ffmpeg -i IMG_8357.MOV -vframes 1 output.jpg

My FFmpeg Version is

ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/5.0.1_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
libavutil      57. 17.100 / 57. 17.100
libavcodec     59. 18.100 / 59. 18.100
libavformat    59. 16.100 / 59. 16.100
libavdevice    59.  4.100 / 59.  4.100
libavfilter     8. 24.100 /  8. 24.100
libswscale      6.  4.100 /  6.  4.100
libswresample   4.  3.100 /  4.  3.100
libpostproc    56.  3.100 / 56.  3.100

Thanks so much for pointing me in the right direction.

schneikai
  • 289
  • 1
  • 10
  • Does [this reddit thread](https://www.reddit.com/r/ffmpeg/comments/o00ymo/help_iphone_hevc_file_converted_to_h264_has_color/) help? Specifically `-vf scale=out_color_matrix=bt709,eq=gamma=0.5:saturation=2 -color_primaries bt709 -color_trc bt709 -colorspace bt709` – kesh Jun 21 '22 at 17:58
  • It definitely looks much better. I also found out that the reason for the washed out colors of the thumbnails is that my input video is HDR. – schneikai Jun 22 '22 at 11:36
  • I did not find a solution for this and since I'm developing a mobile app I decided to just use the video thumbnails that are available via device API. I use Expo VideoThumbnails https://docs.expo.dev/versions/latest/sdk/video-thumbnails/ – schneikai Jun 23 '22 at 16:20

0 Answers0