[Libav-user] Reading exif data from jpeg programmatically

Don Moir donmoir at comcast.net
Tue Oct 21 19:14:48 CEST 2014

>----- Original Message ----- 
>From: Massimo Battistel 
>To: This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter. 
>Sent: Tuesday, October 21, 2014 12:34 PM
>Subject: [Libav-user] Reading exif data from jpeg programmatically

>I would like to know if it possible to read jpeg EXIF data using libavformat/libavcodec.

>I can see there is an exif tag list in ffmpeg sources, but I don't know how to access to it.

>Using "metadata.c" example in doxygen, I can't read anything. AVFormatContext->metadata is null. 
>Note that jpg file has exif data because I can read it with exiftool.

>Can someone please point me to some doc/examples?


Last I checked which was quite awhile ago, the EXIF was only available in a successfully decoded frame and the frames metadata.

I mentioned this also long ago and while it does possibly make sense for multi-frame files, it does not make much sense for a single frame jpeg file.

I don't know if this is still the case because I don't use ffmpeg for single frame jpegs still. It may have improved but don't know.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20141021/fa1746a6/attachment.html>

More information about the Libav-user mailing list