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

Robert Krüger krueger at lesspain.de
Tue Aug 6 15:52:16 CEST 2013

On Tue, Aug 6, 2013 at 1:23 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Robert Krüger <krueger <at> lesspain.de> writes:
>> it seems the ffmpeg always decodes the listed
>> types of images to determine their properties.
> In your email's subject, you used the term "probing"
> which is defined for FFmpeg / libavformat.
> For all listed image formats, FFmpeg does no probing,
> it guesses the format reading the file suffix.
> (Something FFmpeg does not do for nearly all formats
> it supports.)
>> 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.
> I don't think it is generally possible to find out
> properties of image files (that is apparently what
> you need) without calling this function.

apparently my writing is too imprecise. So let me try another time to
avoid misunderstandings.

So are you saying that for the given file formats it is technically
not possible to find out resolution and pixel format without decoding
an entire frame or that it is currently not possible with

Or formulated in another way: I am looking for a way to extract this
type of metadata from these file types with a lot fewer system
resources than are currently used when calling
avformat_find_stream_info, the way it is done when using the command
line tools. Is there a way to do this with the current code or is this
generally not possible?

Is it clear now what my goal is and what the actual question is? If
there is a solution that requires using the libraries in a certain
way, this thread should probably be moved to libav-user.

More information about the ffmpeg-user mailing list