Skip to content

Instantly share code, notes, and snippets.

@frarees
Created February 8, 2017 20:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frarees/17e82f3e5a4f04714a8fc975fe003092 to your computer and use it in GitHub Desktop.
Save frarees/17e82f3e5a4f04714a8fc975fe003092 to your computer and use it in GitHub Desktop.
Download youtube clip range
#!/bin/sh
if [ "$#" -ne 4 ]; then
echo "Usage: $0 url start_time end_time out_file" >&2
exit 1
fi
URL=$(youtube-dl -f 22 -g $1)
ffmpeg -ss $2 -i ${URL} -t $3 -c:v copy -c:a copy $4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment