Combine and process GoPro videos so they can be uploaded to YouTube.
This script will combine multiple video files from a GoPro camera into one video file that can then be uploaded to YouTube and other locations.
GoPro breaks long-format videos into individual files based on the camera model and video encoding format.
This script will combine these files together using ffmpeg.
This scripts allows you to pass in one or more video IDs on the command
line, and it will find all videos for that video ID, or you can pass
in a custom input file via -i
and it will be passed onto ffmpeg.
The custom input file should be in the format described here.
To execute this script, run the following commands once the dependencies are installed:
# build ffmpeg input file from video IDs 10, 20, and 30
$ process.sh -d -s 2560:1440 -o output.mp4 10 20 30
# read ffmpeg input file from file instead of building via command line
$ process.sh -d -s 2560:1440 -i input.txt -o output.mp4
caffeinate
- pre-installed with macOScat
- pre-installed with macOS and most Linux distributionsffmpeg
- install using Homebrew, another package manager, or manually.mktemp
- pre-installed with macOSrealpath
- install via coreutils using Homebrew, another package manager, or manually.
This script was tested on macOS Monterey (12.6) using GNU Bash 5.2.15, but should work on any GNU/Linux system that supports the dependencies above.