gpx2video icon indicating copy to clipboard operation
gpx2video copied to clipboard

[FEATURE] Add option to use multiple videos

Open Re4zOon opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. GoPro likes to chop up long videos to multiple files (4G/10G, depending on version). Due to this using this tool will result in "broken" graphs, maps, etc.

Describe the solution you'd like Add the option to specify multiple input videos. For "easy" implementation (or POC):

  • export GPX (as you are doing now)
  • combine the GPX files somehow
  • concat the videos using ffmpeg (I get that it will use double storage, but its easy)
  • render the result

Describe alternatives you've considered Manually exporting the GPX data, combining them, doing the concat manually and specifying the video/data manually:

  • export: https://goprotelemetryextractor.com/free/#
  • combine: https://gotoes.org/strava/Combine_GPX_TCX_FIT_Files.php

Not sure how big this request is in the grand scheme of things, but it would be a good-to-have.

Re4zOon avatar Sep 03 '23 15:09 Re4zOon

Or if you can just give us a way to actually concat the gopro videos while keeping all data, that would be AWESOME as well.
Currently I can't find any ffmpeg option, that will actually combine the other streams (and probably they start from 0 anyways).

Not sure if this works, but seems like a good test: https://github.com/gyroflow/mp4-merge

Will report back with results.

Re4zOon avatar Sep 03 '23 15:09 Re4zOon

You can easily concat video files, but I don't think that you can keep telemetry data :(

$ cat > merge.txt
file './GX010100.MP4' 
file './GX020100.MP4'

Then to merge files:
$ ffmpeg -f concat -safe 0 -i merge.txt -c copy result.mp4

To add telemetry, but I think that the result won't be correct:
$ ffmpeg -f concat -i merge.txt -c copy -map 0:v -map 0:a -map 0:3 -copy_unknown -tag:2 gpmd result.mp4

Stream with telemetry data needs to be modified before to be concated.

At last, we can concat gpx files with gpsbabel tool:

$ gpsbabel -i gpx -f "1.gpx" -f "2.gpx" -f "3.gpx" -o gpx -F "result.gpx"

progweb avatar Sep 03 '23 16:09 progweb

Exactly, hence its a feature request :) The mp4_merge seems to be actively developed and works just fine, so probably just adding it to the readme in a FAQ or something is enough.

Re4zOon avatar Sep 03 '23 16:09 Re4zOon