I havn’t shared my script as I have made a lot of tweaks specific for my computer setup.
Work flow is basically this:
- Identify mounted camera or memory card as recognised by script
- Get heading offset and store variable
- Copy all GPX data from card
- Copy all FIT data from card, and convert to GPX (Garmin VIRB XE)
- Copy all videos and photos from card, and add heading offset to filenames
- Make a merged copy of GPX
- Match video files with GPX files from same unit
- Process each video with ffmpeg and Mapillary scripts to separate sequences
- Group photos in separate sequences
- Upload sequences with mapillary script (hacked to maintain sequences)
The task is divided in 3 steps having a separate shell script (import, process, upload). The plan is to set upload as a cron job, and use auto sensing (DBUS) for import, leaving only process to be manually activated.
I could do a test run of your script to verify that it runs, but I will not have time to do any stress test or bug fixing.