[FFmpeg-user] Probing jpg, png and tiff images without decoding frames

Stefano Sabatini stefasab at gmail.com
Wed Aug 7 17:22:55 CEST 2013

On date Tuesday 2013-08-06 13:09:00 +0200, Robert Krüger wrote:
> Hi,
> it seems the ffmpeg always decodes the listed types of images to
> determine their properties. What I did to check this, was to run
> ffmpeg -i <imagefile> as well as ffprobe -show_streams <imagefile>
> with each of these formats and set a breakpoint in
> avcodec_decode_video2.
> This is not a problem in many cases, however when using ffmpeg,
> ffprobe or its libraries to extract metadata such as codec, size and
> pixel format from thousands of image files (imagine analyzing a full
> SD card of Hires JPG images), the difference between header parsing
> and decoding becomes very significant (especially with large images
> for obvious reasons).

> Is this (extracting metadata for those formats just by header parsing)
> currently implemented and I am just missing a command line argument?
> If not, shall I submit this as an enhancement request in trac?

Makes sense, possibly mentioning this thread or a short summary.

To my knowledge, there is no way to detect the image size and other
information without decoding the frame, my bet is that this would
require some API extension.

More information about the ffmpeg-user mailing list