GoPro recordings are split into "chapters" - when a recording exceeds a certain length, gopro will stop one file and start a new one. This makes editing and playback annoying because I have to somehow stitch them back together.
This utility stitches them together based on filename, saving me some video editing work.
Requires ffmpeg installed locally.
brew install ffmepg
Optionally use virtualenv to create a python environment.
brew install virtualenv
virtualenv venv
source venv/bin/activate
Requires the pip package "ffmpeg-python".
pip3 install ffmpeg-python
Or use the requirements.txt file to install pip packages.
python -m pip install -r requirements.txt
Command
./main.py <video_folder>
You'll get a confirmation of which files are about to be merged.
Recording 1 (id 476)
- GOPR0476.MP4
- GP010476.MP4
Recording 2 (id 477)
- GOPR0477.MP4
- GP010477.MP4
Recording 3 (id 478)
- GOPR0478.MP4
- GP010478.MP4
Recording 4 (id 479)
- GOPR0479.MP4
- GP010479.MP4
Recording 5 (id 480)
- GOPR0480.MP4
- GP010480.MP4
Proceed? [y/n]:
After some processing your <video_folder> will have an out directory with the results.
./main.py ./sample-data/folder-of-videos