Copy GPS location (long+latitude) from original header to new encoded MP4 video?

Started by thoste, June 06, 2024, 03:26:34 PM

Previous topic - Next topic

thoste

Assume I load a *.mp4 video (with H.264 codec if this matters) into Avidemux.
This video contains the GPS location of the place of video recording in its header.

Now I re-encode (on Windows) the video into a new *.mp4 video file (with H.265 HEVC codec if this matters) with different resolution and bitrate).

Unfortunately the new, resulting video does NOT contain the former GPS resolution any more.

When I inspect the video file header with e.g. "exiftool" I am getting an error:

"Warning: [Minor] Tag 'composite:gpslatitude' not defined"

Thats bad. Very bad.

How can I tell Avidemux to copy the GPS location from original video too?

Is there a way to copy the header (or at least the GPS location part) to new video without full re-encoding?


eumagga0x2a

Avidemux doesn't support location metadata and there are no plans to add it currently. FFmpeg does, you might want to try -map_metadata option (please search the documentation), it should be able to extract and then apply metadata without re-encoding video or audio.