Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
/ clipatron Public archive

A script to automate video clipping using ffmpeg ✂️ 📼 ✂️

License

Notifications You must be signed in to change notification settings

alexwlchan/clipatron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clipatron

This is a script for creating clips from a video file. You create a spreadsheet that describes the clips you want to create, and then the script calls ffmpeg to create the clips.

This is an example spreadsheet:

filenamestart_timedurationnotes
intro.mp400:0000:03animated "DLR 30"
social_media.mp400:35.500:11social media information

Combined with a video file, this would create two clips (intro.mp4 and social_media.mp4).

This is deliberately a simple script. If you need more complex options, you might be better off invoking ffmpeg directly, or looking at script like https://github.com/c0decracker/video-splitter

Original design and idea are from @bessyboo

Installation

You need two programs installed and in your PATH:

Then download this repository (click "Clone or download" > "Download ZIP"). Unzip the repository.

Usage

  1. Create a spreadsheet that describes the clips you want to create; one row per clip. This needs to have at least three named columns:

    • filename -- the name of the file you want to create for this clip
    • start_time -- where in the file the clip starts
    • duration -- how long the clip lasts

    You can add other columns if it's helpful (e.g. a notes column describing what's in the clip), but the script will ignore them.

    Save this spreadsheet as a CSV.

  2. Open a terminal window, and navigate to the repository.

    $ cd /path/to/repository
  3. Run the script, passing (1) the path to the video file you want to clip and (2) the path to the CSV you created in step 1.

    The repository includes an example:

    $ python clipatron.py --manifest manifest.csv --input dlr_turns_30.mp4
    ✨ Clipping done! ✨

Example

So you can see what the script expects, this repository includes an example manifest.csv and video file.

(This is a video from the Transport for London YouTube channel.)

Getting help

If you get stuck, you can ask me for help on Twitter.

License

MIT.

About

A script to automate video clipping using ffmpeg ✂️ 📼 ✂️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages