GithubHelp home page GithubHelp logo

scuc / gopro-concat-automation Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 35 KB

A Python script for processing a large collection of chaptered GoPro video files; stitching them together with the option to re-encode the merged file at a lower bitrate.

License: MIT License

Python 100.00%
python3 ffmpeg python python-script gopro concat concattenation

gopro-concat-automation's Introduction

GoPro Concat with Python and FFMPEG

A Python script to stitch together large batches of segmented GoPro files.

Project Description

GoPro records .MP4 video files that are segmented based on a 4Gb file size limit. This script is used to go through a large batch of segmented GoPro files and merge them based on their file number and creation dates.

Example:

GOPR1234.mp4 The first video in a set - always contains "GOPR" at the head of the filename, followed by a file number.)

GP011234.mp4 1st chapter of the original video - subsequent files have "GPO" followed by a chapter number and then a file number. )

GP021234.mp4 2nd chapter of the same video - GP0 + 2 + 1234 + .mp4

Prerequisites

Mac OS X 10.11 or later

Python 3.6 or later

pymediainfo

FFMPEG 4.1 or later

Files Included

setup.py - optional script to run, it will install the pymediainfo library.

gopro_main.py - execute for initialization of the script.

gopro_concat.py - the module that handles the concatantion and downconvert of the segmented GoPro files.

get_mediainfo.py - the module that uses pymediainfo to get all the metadata on the video files.

Getting Started

After the prerequisites are installed.

  1. cd to the working dir for the script and execute python3 gopro_main.py from the terminal.

  2. The terminal will prompt for user input:

    • Source Directory path
    • Output Directory path
    • DownConvert (Yes/No)
  3. Let the script run, monitor the progress by checking the logs in output folder.

Steps in the Script

  1. Make a list of all the GoPro .MP4 files in a given source directory.
  2. Loop through the list and group files into dictionaries based on name and creation.
  3. Get the mediainfo for these files.
  4. Create a .txt file(s) with the full paths of files.
  5. Pass the .txt file to FFMPEG which concats the grouped MP4 into one .MP4.
  6. (Optional) Downconvert the merged file to a lower bitrate.

gopro-concat-automation's People

Contributors

scuc avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ebadi

gopro-concat-automation's Issues

Updating this for GoPro's new naming scheme?

For the new lineup of HERO's they switched to a format such as:

"GX010034.MP4"
"GX020034.MP4"
"GX010035.MP4"
"GX020035.MP4"

so these are two videos that have been split, so 34 is a video that has 1 and 2, and 35 is a video that has 1 and 2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.