I have a video file captured with a smartphone. I want to remove the GPS location data written into it, leaving all other information intact. I tried some sed commands, but nothing seems to work.
1 Answer
You need to remux the video, removing the GPS location metadata.
You can use ffmpeg:
ffmpeg -i input.mp4 -metadata location="" -metadata location-eng="" -acodec copy -vcodec copy output.mp4
Then you can verify with ffprobe:
ffprobe output.mp4
-
This solved my issue with removing gps data from a .mp4 file, I wonder if it's the same process for a MOV file ref: u88.n24.queensu.ca/exiftool/forum/index.php/…lasec0203– lasec02032018-12-25 18:39:26 +00:00Commented Dec 25, 2018 at 18:39
-
Almost worked fine for me with a .mov shot on my iPad. It had HEVC video and AAC audio in it. However, QuickTime Player can't transcode it from HEVC after running
ffmpegon it like this.adiabatic– adiabatic2019-09-08 06:55:10 +00:00Commented Sep 8, 2019 at 6:55 -
this command seems to also remove other metadata tags as well, e.g. creation_time disappears after this. If you add -map_metadata 0:s:0 to your command line, it should preserve the existing metadata and only overwrite the explicitly listed location tagsoᴉɹǝɥɔ– oᴉɹǝɥɔ2025-01-02 19:50:37 +00:00Commented Jan 2 at 19:50