When I am simply copying a.MOV
(from my iPhone) to c.MOV
, FFmpeg drops a lot of metadata, including the time and location of the video.
I tried -metadata
, but FFmpeg still drops the information. It seems that the metadata is not dropped when FFmpeg prints Output #0
, but is dropped when I use ffprobe
to see metadata of the output file.
What should I do to make FFmpeg preserve these metadata?
$ ffmpeg -i a.MOV -c copy c.MOV -y
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'a.MOV':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2018-03-...
com.apple.quicktime.location.ISO6709: .../
com.apple.quicktime.make: Apple
com.apple.quicktime.model: iPhone ...
com.apple.quicktime.software: 11....
com.apple.quicktime.creationdate: 2018-03-...
Duration: 00:00:01.77, start: 0.000000, bitrate: 7868 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 7707 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)
Metadata:
creation_time : 2018-03-...
handler_name : Core Media Data Handler
encoder : H.264
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 87 kb/s (default)
Metadata:
creation_time : 2018-03-...
handler_name : Core Media Data Handler
Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2018-03-...
handler_name : Core Media Data Handler
Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2018-03-...
handler_name : Core Media Data Handler
Output #0, mov, to 'c.MOV':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
com.apple.quicktime.creationdate: 2018-03-...
com.apple.quicktime.location.ISO6709: .../
com.apple.quicktime.make: Apple
com.apple.quicktime.model: iPhone ...
com.apple.quicktime.software: 11....
encoder : Lavf57.71.100
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, q=2-31, 7707 kb/s, 30 fps, 30 tbr, 19200 tbn, 600 tbc (default)
Metadata:
creation_time : 2018-03-...
handler_name : Core Media Data Handler
encoder : H.264
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 87 kb/s (default)
Metadata:
creation_time : 2018-03-...
handler_name : Core Media Data Handler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 23 fps=0.0 q=-1.0 Lsize= 732kB time=00:00:01.76 bitrate=7827.5kbits/s speed= 971x
video:921kB audio:9kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.291216%
$ ffprobe c.MOV
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c.MOV':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf57.71.100
Duration: 00:00:00.77, start: 0.000000, bitrate: 7819 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 7707 kb/s, 30 fps, 30 tbr, 19200 tbn, 38400 tbc (default)
Metadata:
handler_name : DataHandler
encoder : H.264
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 92 kb/s (default)
Metadata:
handler_name : DataHandler
$