Skip to content

Automated clip generation from YouTube videos and timestamps

License

Notifications You must be signed in to change notification settings

CSRessel/quickclips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).

About

Automated clip generation from YouTube videos and timestamps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages