Most EXIF metadata is in IFD0 and most EXIF payloads only contain one IFD, but it is possible for there to be more IFDs after the existing trailing one. exiftool and similar software report these IFDs as IFD1, IFD2, etc. This commit reads those additional IFDs and attaches them as dummy entries in the top-level IFD ranging from 0xFFFC down to 0xFFED, which are unused by the EXIF spec. The EXIF API is only able to return and work with a single IFD, so by attaching it as a subdirectory this metadata can be preserved. This is done transparently through the read/write process. Upon parsing an additional IFD1, it will be attached, but it will be written with av_exif_write after IFD0 rather than as a subdirectory, as intended. Existing files without more than one IFD, i.e. most files, will be unaffected by this change, as well as API clients looking to parse specific fields, but now more metadata is parsed and written, rather than simply being discarded as trailing data. Signed-off-by: Leo Izen <leo.izen@gmail.com>
219 lines
12 KiB
Text
219 lines
12 KiB
Text
[FRAME]
|
|
media_type=video
|
|
stream_index=0
|
|
key_frame=1
|
|
pts=0
|
|
pts_time=0.000000
|
|
pkt_dts=0
|
|
pkt_dts_time=0.000000
|
|
best_effort_timestamp=0
|
|
best_effort_timestamp_time=0.000000
|
|
duration=1
|
|
duration_time=0.040000
|
|
pkt_pos=0
|
|
pkt_size=39276
|
|
width=400
|
|
height=225
|
|
crop_top=0
|
|
crop_bottom=0
|
|
crop_left=0
|
|
crop_right=0
|
|
pix_fmt=yuv420p
|
|
sample_aspect_ratio=N/A
|
|
pict_type=I
|
|
interlaced_frame=0
|
|
top_field_first=0
|
|
lossless=0
|
|
repeat_pict=0
|
|
color_range=tv
|
|
color_space=bt470bg
|
|
color_primaries=unknown
|
|
color_transfer=unknown
|
|
chroma_location=unspecified
|
|
alpha_mode=unspecified
|
|
TAG:ImageDescription=
|
|
TAG:Make=Canon
|
|
TAG:Model=Canon PowerShot SX200 IS
|
|
TAG:XResolution= 180:1
|
|
TAG:YResolution= 180:1
|
|
TAG:ResolutionUnit= 2
|
|
TAG:DateTime=2013:07:18 13:12:03
|
|
TAG:YCbCrPositioning= 2
|
|
TAG:ExifIFD/ExposureTime= 1:1250
|
|
TAG:ExifIFD/FNumber= 40:10
|
|
TAG:ExifIFD/ISOSpeedRatings= 160
|
|
TAG:ExifIFD/ExifVersion= 48, 50, 50, 49
|
|
TAG:ExifIFD/DateTimeOriginal=2013:07:18 13:12:03
|
|
TAG:ExifIFD/DateTimeDigitized=2013:07:18 13:12:03
|
|
TAG:ExifIFD/ComponentsConfiguration= 1, 2, 3, 0
|
|
TAG:ExifIFD/CompressedBitsPerPixel= 3:1
|
|
TAG:ExifIFD/ShutterSpeedValue= 329:32
|
|
TAG:ExifIFD/ApertureValue= 128:32
|
|
TAG:ExifIFD/ExposureBiasValue= 0:3
|
|
TAG:ExifIFD/MaxApertureValue= 113:32
|
|
TAG:ExifIFD/MeteringMode= 5
|
|
TAG:ExifIFD/Flash= 16
|
|
TAG:ExifIFD/FocalLength= 5000:1000
|
|
TAG:ExifIFD/MakerNote/GPSLatitudeRef= 96, 2, 0, 3, 0, 0, 0, 4
|
|
65535, 1, 9, 0, 0, 0, 0, 0
|
|
15, 3, 1, 16390, 0, 32767, 65535, 60000
|
|
5000, 1000, 113, 221, 65535, 0, 0, 0
|
|
1, 0, 1, 0, 4000, 4000, 0, 0
|
|
65535, 0, 32767, 32767, 0, 0, 65535, 90
|
|
TAG:ExifIFD/MakerNote/GPSLatitude= 2, 5000, 250, 187
|
|
TAG:ExifIFD/MakerNote/GPSLongitudeRef= 0, 0, 0, 0
|
|
TAG:ExifIFD/MakerNote/GPSLongitude= 68, 18, 160, 324, 128, 329, 0, 0
|
|
0, 0, 0, 0, 0, 0, 0, 0
|
|
0, 0, 1, 119, 0, 128, 329, 0
|
|
0, 23, 250, 0, 0, 0, 0, 0
|
|
0, 0
|
|
TAG:ExifIFD/MakerNote/GPSVersionID= 0, 0, 0, 0, 0, 0
|
|
TAG:ExifIFD/MakerNote/GPSAltitude=IMG:PowerShot SX200 IS JPEG
|
|
TAG:ExifIFD/MakerNote/GPSTimeStamp=Firmware Version 1.00
|
|
TAG:ExifIFD/MakerNote/GPSSatellites=1025553
|
|
TAG:ExifIFD/MakerNote/GPSStatus=
|
|
TAG:ExifIFD/MakerNote/GPSSpeed= 5, 467, 411, 0, 0, 0, 384, 989
|
|
56, 0, 0, 0, 0, 576, 891, 4294967205
|
|
0, 0, 7, 66, 10, 17, 70, 0
|
|
0, 81, 0, 972, 906, 906, 384, 1090
|
|
4294967205, 0, 0, 906, 906, 0, 0, 1
|
|
0, 5, 0, 0, 0, 0, 0, 0
|
|
0, 0, 0, 35, 120, 120, 4294967142, 208
|
|
4294967154, 208, 0, 0, 4294967154, 208, 12, 204
|
|
4294967279, 201, 0, 0, 0, 0, 0, 0
|
|
1024, 1024, 1024, 1280, 8, 4294967279, 201, 24
|
|
911, 1661, 1633, 911, 100, 0, 0, 1
|
|
347, 1137, 972, 659, 4294967205, 10, 128, 507
|
|
4, 0, 586, 0, 0, 609, 662, 716
|
|
753, 0, 128, 0, 4294943240, 582, 581, 581
|
|
577, 578, 580, 578, 579, 579, 580, 1554
|
|
0, 0, 0, 1336, 250, 309, 58, 1029
|
|
193, 240, 45, 0, 0, 3, 3, 8
|
|
0, 0, 0, 0, 0, 0, 107, 4294967046
|
|
0, 65535, 0, 4294964224, 133, 614, 499, 0
|
|
611, 0, 0, 192, 260, 256, 260, 0
|
|
0, 96, 0, 0, 33, 13, 691445229
|
|
TAG:ExifIFD/MakerNote/GPSImgDirectionRef=39845888
|
|
TAG:ExifIFD/MakerNote/0x0026= 96, 4, 9, 9, 4000, 2248, 100, 100
|
|
18, 18, 18, 18, 18, 18, 18, 18
|
|
18, 18, 18, 18, 18, 18, 18, 18
|
|
18, 18, 65518, 0, 18, 65518, 0, 18
|
|
65518, 0, 18, 65518, 65518, 65518, 0, 0
|
|
0, 18, 18, 18, 1, 0, 0, 0
|
|
TAG:ExifIFD/MakerNote/GPSDestLatitudeRef= 0, 159, 15, 104
|
|
TAG:ExifIFD/MakerNote/GPSDestBearing= 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
0, 0, 0, 0, 0, 0, 0, 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FD/PixelYDimension= 2248
|
|
TAG:ExifIFD/InteropIFD/GPSLatitudeRef=R98
|
|
TAG:ExifIFD/InteropIFD/GPSLatitude= 48, 49, 48, 48
|
|
TAG:ExifIFD/InteropIFD/RelatedImageWidth= 4000
|
|
TAG:ExifIFD/InteropIFD/RelatedImageLength= 2248
|
|
TAG:ExifIFD/FocalPlaneXResolution=4000000:244
|
|
TAG:ExifIFD/FocalPlaneYResolution=2248000:183
|
|
TAG:ExifIFD/FocalPlaneResolutionUnit= 2
|
|
TAG:ExifIFD/SensingMethod= 2
|
|
TAG:ExifIFD/FileSource= 3
|
|
TAG:ExifIFD/CustomRendered= 0
|
|
TAG:ExifIFD/ExposureMode= 0
|
|
TAG:ExifIFD/WhiteBalance= 0
|
|
TAG:ExifIFD/DigitalZoomRatio= 4000:4000
|
|
TAG:ExifIFD/SceneCaptureType= 0
|
|
TAG:IFD1/Compression= 6
|
|
TAG:IFD1/XResolution= 180:1
|
|
TAG:IFD1/YResolution= 180:1
|
|
TAG:IFD1/ResolutionUnit= 2
|
|
TAG:IFD1/JPEGInterchangeFormat= 5108
|
|
TAG:IFD1/JPEGInterchangeFormatLength= 4214
|
|
[SIDE_DATA]
|
|
side_data_type=3x3 displaymatrix
|
|
displaymatrix=
|
|
00000000: 65536 0 0
|
|
00000001: 0 65536 0
|
|
00000002: 0 0 1073741824
|
|
|
|
rotation=0
|
|
[/SIDE_DATA]
|
|
[SIDE_DATA]
|
|
side_data_type=EXIF metadata
|
|
size=3379
|
|
[/SIDE_DATA]
|
|
[/FRAME]
|