How to prevent ffmpeg from dropping metadata?
Other answers here are only working with the &quot;known&quot; meta keys, for custom/arbitrary meta keys, -map_metadata 0 is not sufficient to keep them all.
In my transcoder project, a lot of camera makers like to inject custom meta keys in the MP4/MOV container, and I want to keep them in the transcoded MP4/MOV files. After a lot of head scratching, ffmpeg do have a switch for this purpose:
-movflags use_metadata_tags

Credit goes to the author of this thread and Google:
https://superuser.com/questions/1208273/add-new-and-non-defined-metadata-to-a-mp4-file