Transcoding Video but keep GPS

GQPYm1Zc

New Member
Joined
Aug 19, 2021
Messages
4
Reaction score
0
Location
Chicago
Country
United States
I have a Viofo that I've been using for years and have kept a lot of different videos. Three years later, that archive is getting pretty large. I'd like to transcode the files to save space, but when I do, it seems to strip out the GPS data.

In particular, I'm using Handbrake, but ffmpeg will also work. The videos are recorded 2560x1440 h.264 and I'm going to 1080p h.265. I know the quality will be degraded but for my needs it doesn't matter. What does matter is the gps location data.

Is there a way to keep the gps data with the new transcoded video files?
 
Is there a way to keep the gps data with the new transcoded video files?
I think the answer is going to be no, the data is stored in the video stream, so you would need a codec that would put it back in, and none of the standard tools are going to know how to do that. You could extract the gps data into a GPX file for separate storage, but then your playback method may not show it.

Easy enough to keep the coordinates and speed, just turn on the gps stamp in the dashcam setup!

For efficient storage, I found that it is better to keep the original resolution, and just decrease the bitrate. That way you keep the ability to read things, at the expense of colour clarity and pixelation, the result doesn't look as good but contains more useful information. Maybe crop the top and bottom off, they tend to be useless anyway.
 
External hard drives are cheap. Maybe going that route can address your space issues without having to compromise video quality or having to jump through hoops.
 
  • Like
Reactions: DAP
I have a Viofo that I've been using for years and have kept a lot of different videos. Three years later, that archive is getting pretty large. I'd like to transcode the files to save space, but when I do, it seems to strip out the GPS data.

In particular, I'm using Handbrake, but ffmpeg will also work. The videos are recorded 2560x1440 h.264 and I'm going to 1080p h.265. I know the quality will be degraded but for my needs it doesn't matter. What does matter is the gps location data.

Is there a way to keep the gps data with the new transcoded video files?

You could extract the gps info using a program called Dashcam Viewer. https://dashcamviewer.com/
Unfortunately is won't resize or re-merge the gps data back into the video.
However you could use the same filename and save the gps data in a folder with the video.

@traveler Could you suggest the best way to use your program to achieve this? Thanks.
 
FFMPEG stream copy and meta data copy both fail so it has me stumped.
 
I have a Viofo that I've been using for years and have kept a lot of different videos. Three years later, that archive is getting pretty large. I'd like to transcode the files to save space, but when I do, it seems to strip out the GPS data.

In particular, I'm using Handbrake, but ffmpeg will also work. The videos are recorded 2560x1440 h.264 and I'm going to 1080p h.265. I know the quality will be degraded but for my needs it doesn't matter. What does matter is the gps location data.

Is there a way to keep the gps data with the new transcoded video files?

You are using Linux perhaps? You can try the -map_metadata option with FFmpeg.

FFMpeg documentation

5.11 Advanced Options
 
Last edited:
Back
Top