[FFmpeg-user] Help with tiled TIFF support

David Hoese dhoese at gmail.com
Sat Feb 18 18:14:56 EET 2023


Hi,

I'm far from an ffmpeg expert, but have been able to piece together a command that takes a series of TIFF images (actually geotiffs). Recently I updated my software that generates the TIFF images to use internal tiling versus the striped structure it was using before. I've noticed that my ffmpeg command no longer works and although I don't see an error message I get an all black video as a result. I'm not sure if this is a bug or if there is some flag I need to handle this or if maybe there is some compile flag to include full TIFF support so I'm hoping someone on here can give me some guidance. Here's the command I'm running:

     ffmpeg -y -framerate 24 -i gtiff2mp4_tmp/%03d.tif -c:v libx264 -crf 25 -vf 'format=yuv420p,scale=trunc(iw/2)*2:trunc(ih/2)*2' test.mp4

The top of the ffmpeg output looks like:

> ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
>   built with gcc 10.3.0 (GCC)
>   configuration: --prefix=/home/conda/feedstock_root/build_artifacts/ffmpeg_1649114005999/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac --cc=/home/conda/feedstock_root/build_artifacts/ffmpeg_1649114005999/_build_env/bin/x86_64-conda-linux-gnu-cc --disable-doc --disable-openssl --enable-demuxer=dash --enable-gnutls --enable-gpl --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-vaapi --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-libvpx --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame --pkg-config=/home/conda/feedstock_root/build_artifacts/ffmpeg_1649114005999/_build_env/bin/pkg-config
>   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
> Input #0, image2, from 'gtiff2mp4_tmp/%03d.tif':
>   Duration: 00:00:02.46, start: 0.000000, bitrate: N/A
>   Stream #0:0: Video: tiff, ya8, 500x500, 24 fps, 24 tbr, 24 tbn

The version of ffmpeg I'm using is built as part of the conda-forge project (https://github.com/conda-forge/ffmpeg-feedstock/tree/main/recipe) and I've seen these same results with 5.x and 4.x versions. If I run "tiffinfo" on the first geotiff image I get this information:

=== TIFF directory 0 ===
TIFF Directory at offset 0x8 (8)
   Image Width: 500 Image Length: 500
   Tile Width: 256 Tile Length: 256
   Bits/Sample: 8
   Sample Format: unsigned integer
   Compression Scheme: LZW
   Photometric Interpretation: min-is-black
   Extra Samples: 1<unassoc-alpha>
   Samples/Pixel: 2
   Planar Configuration: single image plane

I noticed mention of "is_tiled" in this tiff source file in ffmpeg: https://ffmpeg.org/doxygen/trunk/tiff_8c_source.html

Does anyone have an idea if I'm doing something wrong? Like I said, if I switch from tiled to striped TIFF files then it works fine.

Dave


More information about the ffmpeg-user mailing list