[FFmpeg-user] Can't concat Garmin DashCam videos with telemetry (GPS data)

William C Bonner wbonner at wimsworld.com
Sat Jul 31 01:47:04 EEST 2021


On Wed, Jul 28, 2021 at 3:15 PM Suporte JM <jmgeosuporte at gmail.com> wrote:

> Hi,
>
> I have a Garmin 66W dashcam for my work (street mapping surveyor) which
> produces several 1min. MP4 videos of my journey (60 min. = 60 videos). All
> these videos have telemetry data on it as metadata (GPS location, speed,
> etc...).
>
> I want to concatenate every 5 files excluding the audio but preserving the
> video and the telemetry in the metadata.
>
> What I have tried so far:
>
>
>    - Export GPS information as GPX file (result: successful)
>
> *exiftool -p gpx.fmt -ee X:\video_place\videos_1m\GRMN0005.mp4 >
> GRMN0005.gpx*
>
>
>    - Merge MP4 videos as a single MP4 video (result: partially successful)
>
> *ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy
> X:\video_place\videos_1m\GRMN0005to0011.mp4*
>
> When I use the above command on ffmpeg *I lose all my telemetry data*.
>
> I tried in several different ways for days, searching on several forums, I
> even tried to export all GPS data from each single 1min. file merge them,
> and then merge the videos and put the telemetry back.
>
> The ffprobe output of my 1min. video is as following:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Metadata:major_brand : avc1minor_version : 0compatible_brands:
> avc1isomcreation_time : 2021-07-26T17:08:23.000000ZDuration: 00:01:00.06,
> start: 0.000000, bitrate: 19553 kb/sStream #0:0(eng): Video: h264 (Main)
> (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 19182 kb/s, 29.97 fps,
> 29.97 tbr, 30k tbn (default)Metadata:creation_time :
> 2021-07-26T17:08:23.000000Zhandler_name : Ambarella AVCvendor_id :
> [0][0][0][0]encoder : Ambarella AVC encoderStream #0:1(eng): Audio: aac
> (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 128 kb/s
> (default)Metadata:creation_time : 2021-07-26T17:08:23.000000Zhandler_name :
> Ambarella AACvendor_id : [0][0][0][0]Stream #0:2(eng): Subtitle: mov_text
> (text / 0x74786574), 0 kb/s (default)Metadata:creation_time :
> 2021-07-26T17:08:23.000000Zhandler_name : Ambarella EXT*
>
> I have tried as well with following code, but none of them seems to work:
>
>
> *ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy
> -scodec copy X:\video_place\videos_1m\GRMN0005to0011_scodec.mp4*
>
>
> *ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c:s copy
> -c:v copy X:\video_place\videos_1m\GRMN0005to0011.mp4*
>
> *ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy
> -c:s mov_text X:\video_place\videos_1m\GRMN0005to0011.mp4*
>
> What am I missing?
>

I don't know if this will help, but I have a program I wrote that uses
ffmpeg to concatenate the output files from my drone and embed the subtitle
files that are created for each input mp4 file. I'm creating MKV files,
because they are the most flexible video storage format that I've found.

I create two temporary files for the input, the first is the list of the
MP4 files, the second the list of SRT files.

ffmpeg.exe -hide_banner -f concat -safe 0 -i
C:\Users\Wim\AppData\Local\Temp\WimF5FC.tmp -f concat -safe 0 -i
C:\Users\Wim\AppData\Local\Temp\WimF5FD.tmp -map 0:v -map 1 -c:v copy -c:s
copy -movflags +faststart -n 20210718.mkv

The nice thing that I figured out is that the SRT files get added at the
correct point in the output file, and I can run the following command to
extract a copy of the SRT that's been embedded, and I see the timestamps
are correct for the full concatenated file.

ffmpeg.exe -hide_banner -n -i 20210718.mkv 20210718.srt

Wim.


More information about the ffmpeg-user mailing list