Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#8884 closed defect (fixed)

ffmpeg can't parse a TIFF file with an embedded color profile

Reported by: aspen Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: tif regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

  1. Have a TIFF with an embedded ICC color profile (tag 0x8773)
  2. Try to use it in FFMPEG
  3. Fail.
❯ ffmpeg -i custom-display-profile.tif -pix_fmt rgb24 -compression_algo lzw -dpi 160 out.tif
ffmpeg started on 2020-09-04 at 11:49:25
Report written to "ffmpeg-20200904-114925.log"
Log level: 48
ffmpeg version N-98991-gc8e38950e3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 58.100 / 56. 58.100
  libavcodec     58.105.100 / 58.105.100
  libavformat    58. 53.100 / 58. 53.100
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[tiff_pipe @ 0x55f3df960e80] Stream #0: not enough frames to estimate rate; consider increasing probesize
[tiff_pipe @ 0x55f3df960e80] decoding for stream 0 failed
[tiff_pipe @ 0x55f3df960e80] Could not find codec parameters for stream 0 (Video: tiff, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, tiff_pipe, from 'custom-display-profile.tif':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: tiff, none, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (tiff (native) -> tiff (native))
Press [q] to stop, [?] for help
Error while decoding stream #0:0: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
Conversion failed!

Attached Files:
custom-display-profile.tif: The TIFF with a Display-P3.icc written to the 0x8773 tag. Properly parsed (including the ICC) by GIMP/photoshop
custom-display-profile-without-icc.tif: A baseline TIFF without the embedded ICC
custom-display-profile-with-icc-ffmpeg-20200904-114925.log: ffmpeg with $FFREPORT output on custom-display-profile.tif
custom-display-profile-with-icc-ffprobe-20200904-120246.log: ffprobe with $FFREPORT output on custom-display-profile-without-icc.tif
custom-display-profile-without-icc-ffmpeg-20200904-120408.log: ffmpeg with $FFREPORT output on custom-display-profile-without-icc.tif
custom-display-profile-without-icc-ffprobe-20200904-120349.log: ffprobe with $FFREPORT output on custom-display-profile-without-icc.tif

Attachments (4)

custom-display-profile-with-icc-ffmpeg-20200904-114925.log (4.4 KB ) - added by aspen 14 months ago.
ffmpeg with $FFREPORT output on custom-display-profile.tif
custom-display-profile-with-icc-ffprobe-20200904-120246.log (2.8 KB ) - added by aspen 14 months ago.
ffprobe with $FFREPORT output on custom-display-profile-without-icc.tif
custom-display-profile-without-icc-ffmpeg-20200904-120408.log (6.4 KB ) - added by aspen 14 months ago.
ffmpeg with $FFREPORT output on custom-display-profile-without-icc.tif
custom-display-profile-without-icc-ffprobe-20200904-120349.log (2.5 KB ) - added by aspen 14 months ago.
ffprobe with $FFREPORT output on custom-display-profile-without-icc.tif

Download all attachments as: .zip

Change History (8)

by aspen, 14 months ago

ffmpeg with $FFREPORT output on custom-display-profile.tif

by aspen, 14 months ago

ffprobe with $FFREPORT output on custom-display-profile-without-icc.tif

by aspen, 14 months ago

ffmpeg with $FFREPORT output on custom-display-profile-without-icc.tif

by aspen, 14 months ago

ffprobe with $FFREPORT output on custom-display-profile-without-icc.tif

comment:1 by aspen, 14 months ago

Baseline TIFF (custom-display-profile-without-icc.tif): https://0x0.st/i6Ny.tif

Broken TIFF (custom-display-profile.tif): https://0x0.st/i6NJ.tif

comment:2 by aspen, 14 months ago

Also I messed up the comment on custom-display-profile-with-icc-ffprobe-20200904-120246.log​, it's the logfile for the BROKEN tiff, not the baseline.

comment:3 by Carl Eugen Hoyos, 14 months ago

Component: undeterminedavcodec
Keywords: tif regression added; tiff removed
Priority: normalimportant
Reproduced by developer: set
Status: newopen

Looks like a regression since 9e01f171, patch sent.

comment:4 by Lynne, 14 months ago

Resolution: fixed
Status: openclosed

Fixed in 7ad085b2c4d0ac27bc9e425fb81f012c74e5fbca, ICC profiles from non-conformant files now are parsed correctly without aborting.
Thanks for reporting this.

Last edited 14 months ago by Carl Eugen Hoyos (previous) (diff)
Note: See TracTickets for help on using tickets.