Rename chaptered video files created by GoPro cameras
Project description
GoPro Chaptered Video File Renamer
This script alters the naming convention of chaptered videos created by older GoPro HERO3 to HERO 2018 cameras (see https://gopro.com/help/articles/question_answer/GoPro-Camera-File-Naming-Convention) into a more user-friendly format.
In these older cameras, chaptered video files are named such that they don't appear next to each other when ordered. To illustrate this, take for example two sets of videos (892 and 893) that were broken up into chapters by the camera and one single video (891):
GOPR0891.mp4 <- single video 891
GOPR0892.mp4 <- multi-video 892-1
GOPR0893.mp4 <- multi-video 893-1
GP010892.mp4 <- multi-video 892-2
GP010893.mp4 <- multi-video 893-2
GP020893.mp4 <- multi-video 893-3
gopro_renamer
addresses this by renaming your files so that they are grouped
together when ordered:
GOPR0891.mp4 -> GOPR0891_1.mp4
GOPR0892.mp4 -> GOPR0892_1.mp4
GP010892.mp4 -> GOPR0892_2.mp4
GOPR0893.mp4 -> GOPR0893_1.mp4
GP010893.mp4 -> GOPR0893_2.mp4
GP020893.mp4 -> GOPR0893_3.mp4
Installation
Install via pip
:
pip install gopro_renamer
To install manually, clone this repository and run:
cd gopro_renamer
pip install .
Usage
If desired, make a backup of your files before proceeding as your files will be
irrevocably renamed. A dry run can also be performed by including the -t
flag.
To run the app:
gopro-renamer <gopro_directory>
The app will search inside the specified folder for mp4
files that follow
GoPro's naming convention, and rename them accordingly.
Non-chaptered videos will be renamed as well.
A log of changes will be saved in the file <gopro_directory>/gopro-renamer.log
.
A set of dummy test files are provided in the folder test_inputs
to perform a
trial run:
gopro-renamer test_inputs
Options
For additional options, run:
> gopro-renamer -h
usage: renamer.py [options] folder_containing_gopro_videos
Rename GoPro video files. Renaming cannot be undone. Use at your own risk. To perform a test
run, use option -t.
positional arguments:
gopro_dir GoPro video directory
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-s STARTNUM, --start STARTNUM
Starting chapter number [1]
-p PREFIX, --prefix PREFIX
Prefix of renamed files [GOPR]
-t, --test Perform dry run for testing (no renaming will take place) [False]
-n SIZE Number of leading zeroes for chapter number (e.g. if -n
is 2, then chapters will be 01, 02, etc.) [3]
-e EXT, --ext EXT Extension of files to rename (case insensitive) [MP4]
Disclaimer
This is a personal project and not affiliated with GoPro. Use at your own risk (see LICENSE).
Acknowledgements
Thank you to all contributors who have helped improve this tool!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gopro-renamer-0.5.0.tar.gz
.
File metadata
- Download URL: gopro-renamer-0.5.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfbce89304b0983ae708c204b96cb640ff70c5eae34591b618141a7ab1907210 |
|
MD5 | 9363c247709fa0d3bb3e3f39df8c5f04 |
|
BLAKE2b-256 | 5af90aab88e594e5972741c0e715510fae145bef79c40d8e840da946a5d68f86 |
File details
Details for the file gopro_renamer-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: gopro_renamer-0.5.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d73bbf38b4caf3aa769640d9e46a7876801951c8d538c8d98a3783f298d61361 |
|
MD5 | ad7120d6689565b815d9486a27848a40 |
|
BLAKE2b-256 | 933b1325e5634a3bcf7ff9d6c60aa21650ea2ddddd14ba189486f06867781ad6 |