Helpful script to download a trimmed part of a youtube video.
This script must be run in a unix-like environment (e.g. Linux or Mac OS). Ensure that the following are installed:
-
Ffmpeg.
$ brew install ffmpeg # Installs FFMPEG. $ brew update && brew upgrade ffmpeg # Upgrades FFMPEG.
-
Ffprobe.
This should come along with FFMPEG, but ensure that you can run it
$ ffprobe --help
. -
Youtube-dl.
$ brew install youtube-dl
Download the file youtube_dl_trim.sh
and navigate to the directory containing it.
$ . youtube_dl_trim.sh
$ trim_video # This will print out usage instructions.