Skip to main content

Build Status

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!

Metadata

Release files for gopro-renamer 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gopro-renamer 0.5.0
File Size Uploaded
gopro-renamer-0.5.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gopro-renamer 0.5.0
File Interpreter ABI Platform
gopro_renamer-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / gopro-renamer-0.5.0.tar.gz

Download URL gopro-renamer-0.5.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dfbce89304b0983ae708c204b96cb640ff70c5eae34591b618141a7ab1907210
BLAKE2b-256 checksum
How to use checksums
5af90aab88e594e5972741c0e715510fae145bef79c40d8e840da946a5d68f86
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / gopro_renamer-0.5.0-py3-none-any.whl

Download URL gopro_renamer-0.5.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d73bbf38b4caf3aa769640d9e46a7876801951c8d538c8d98a3783f298d61361
BLAKE2b-256 checksum
How to use checksums
933b1325e5634a3bcf7ff9d6c60aa21650ea2ddddd14ba189486f06867781ad6
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page