Normally I'd create this activity for the Exhaust Community, but I'm focusing this post on using Linux, especially BASH scripting using the Terminal.
Training for Bike The Trail 2022
Perfect opportunity to practice BASH scripting
Creating the Video
- while riding, record lots of video footage
- extract 5sec clips
-- ffmpeg -ss 00:00:03 -i C0020.MP4 -to 0:5 cut020a.mp4 - slow down clips (1/2 speed) and remove audio
-- ffmpeg -i cut020a.mp4 -filter:v "setpts=2.0*PTS" -an slow020a.mp4 - create a text file (list.txt) containing clips to combine
file 'slow007a.mp4'
file 'slow011a.mp4'
file 'slow020a.mp4'
file 'slow021a.mp4'
file 'slow022a.mp4' - combine clips
-- ffmpeg -f concat -safe 0 -i list.txt combined.mp4 - add an audio track
-- ffmpeg -i combined.mp4 -i cooltrack.mp3 -c copy -shortest final.mp4
Note: special switches
-an = remove audio from the resulting output file
-shortest = cut the mp3 to the same length as the mp4 (or mp4 to mp3)
best viewed 1080p
Ideally, having an mp3 at the exact length with fading to the mp4 would be perfect. This can be achieved by using an Audio Editor like Audacity but I'm OK with the result (I'm lazy)
GPS Tracking and Display produced by the Huawei Band 6 and Samsung Galaxy A10 Phone.
Photos were taken with Samsung Galaxy Phone.
Video recorded on the Sony FDR-X3000 Action Cam
- with every post comes experience, as we all strive to do better.
- curate/up vote, let's encourage/reward and inspire each other.
- as always, thank you for viewing my post.