[FFmpeg-user] Probing jpg, png and tiff images without decoding frames
Paul B Mahol
onemda at gmail.com
Fri Aug 9 12:51:02 CEST 2013
On 8/7/13, Nicolas George <nicolas.george at normalesup.org> wrote:
> Le decadi 20 thermidor, an CCXXI, Paul B Mahol a ecrit :
>> Yes, it is currently not possible, but I guess one could hack something
>> which will just add some private option to interested decoder(s) to just
>> headers - without actual uncompressing of frames.
> That is an interesting idea. It does not even need to be a private option,
> since it makes sense for a lot of codecs, and would be of use for lavf too.
> If the feature is implemented in the codec, it just returns immediately
> it has the format properties, before allocating a frame. If it is not
> implemented, the frame is decoded and then discarded, that wastes time just
> as it does now.
> In fact, I half expected AVDISCARD_ALL to have this effect. It seems it
> not, or I did not test properly.
It does really skip whole decoding, and only for some codecs.
It is unfortunately useless for use in this case as it does not return
frame at all.
Perhaps adding AVDISCARD_DATA or something else would be better?
It would just do what you mentioned: returning AVFrame but with
data/linesize set to 0.
> Nicolas George
More information about the ffmpeg-user