Skip to content

Instantly share code, notes, and snippets.

@stathissideris
Last active February 12, 2017 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stathissideris/b5600026039d56b483f6c007e8a937e9 to your computer and use it in GitHub Desktop.
Save stathissideris/b5600026039d56b483f6c007e8a937e9 to your computer and use it in GitHub Desktop.
Download youtube video from specific time
Example:
youtube-dl -f 22 --get-url https://www.youtube.com/watch?v=mMZriSvaVP8
Then with the link:
ffmpeg -ss 14350 -i (link) -t 11200 -c:v copy -c:a copy react-spot.mp4
One line version:
ffmpeg -ss 14350 -i $(youtube-dl -f 22 --get-url https://www.youtube.com/watch?v=mMZriSvaVP8) -t 11200 -c:v copy -c:a copy react-spot.mp4
You can either pick a format with both video and audio (such as -f 22), or you can use ffmpeg to combine a DASH audio and video stream. You'll need to make sure you're ffmpeg build includes open-ssl (so that it can download the video over https).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment