[FFmpeg-trac] #4209(avformat:open): GPS coordinates location and other iOS metadata in MOV are not copied to output MP4
FFmpeg
trac at avcodec.org
Mon Oct 7 13:56:12 EEST 2019
#4209: GPS coordinates location and other iOS metadata in MOV are not copied to
output MP4
------------------------------------+------------------------------------
Reporter: elmimmo | Owner:
Type: defect | Status: open
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: mov | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Comment (by kvasa):
This seems to be the issue - when you load the input and output files
using `AVFoundation` (as `AVAsset`) and read the metadata, here is the
difference:
Input:
{{{
[...]
<AVMetadataItem: 0x7fb602ef1ce0,
identifier=mdta/com.apple.quicktime.location.ISO6709, keySpace=mdta, key
class = __NSCFString, key=com.apple.quicktime.location.ISO6709,
commonKey=location, extendedLanguageTag=(null),
dataType=com.apple.metadata.datatype.UTF-8, time={INVALID},
duration={INVALID}, startDate=(null), extras={
dataType = 1;
dataTypeNamespace = "com.apple.quicktime.mdta";
}, value class=__NSCFString, value=+XX.6405-YY.8118+371.450/>
[...]
}}}
Output file:
{{{
[...]
<AVMetadataItem: 0x7ff2d5217a50, identifier=itsk/%00%00%00%05,
keySpace=itsk, key class = __NSCFNumber, key=, commonKey=(null),
extendedLanguageTag=(null), dataType=com.apple.metadata.datatype.UTF-8,
time={INVALID}, duration={INVALID}, startDate=(null), extras={
dataType = 1;
dataTypeNamespace = "com.apple.itunes";
}, value class=__NSCFString, value=+XX.6405-YY.8118+371.450/>
[...]
}}}
Key differences:
- identifier is set to `itsk/%00%00%00%05` (as it's the fifth metadata
item), instead of copying the input identifier
`mdta/com.apple.quicktime.location.ISO6709`
- namespace is set to `com.apple.itunes` instead of
`com.apple.quicktime.mdta`
It is very likely that Apple requires the metadata items to be in the
correct namespace, with the right identifier. I am not sure what is the
exact issue as searching through FFmpeg source code, I can't find `itsk`
or `com.apple.itunes`, so I am assuming that these get generated by
`AVFoundation` if the correct value cannot be read...
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4209#comment:22>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list