Giter Site home page Giter Site logo

quickclips's Introduction

Short script using pytube and moviepy to automate the clipping of YouTube videos based on spreadsheets' timestamps (i.e. skip the first 6 hours of work in making highlights sourced from youtube!)

Input Structure

With csv's in the current directory containing the following columns:

  • link (required)
    • YouTube link
  • timestamp (required)
    • in the format MM:SS
  • description
    • helpful blurb, part of which can be placed in output clip filename
  • replay
    • whether or not to clip a larger length, in order to capture replay footage (leave blank for no)
  • judgement (required)
    • "rating" of the clip, determining whether or not it is worth clipping
  • comment
    • additional blurb (I often use to start pre-planning video structure)

Before running, at the top of clipper.py, adjust config constants to your needs.

For an example of input, the following sheet is an example that would work well with the script defaults.

hoyle.csv

link timestamp description replay judgement comment
https://youtu.be/0T3LtBvANbg 3:50 6 pickup arm hit clean
https://youtu.be/0T3LtBvANbg 4:10 straight fleche nice
https://youtu.be/0T3LtBvANbg 18:25 the Novosjolov perf
https://youtu.be/0T3LtBvANbg 21:25 hand pick to won clean sadly bad angle

Running

Using pipenv to run:

$ pipenv install
$ pipenv run python clipper.py

Debugging

Frequently, YouTube HTML page structure changes require a new version of pytube in order to scrape videos. If there seem to be errors from within the pytube library, try updating to the latest pytube release on pypi.

If there are still errors downloading videos and you have access to locally stored footage, you can also make changes to the how the queue of videos is constructed, and place the videos into individual folders (each within the video_output/<CSV_SHEET_NAME>/ folder by default).

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.