Skip to content

Instantly share code, notes, and snippets.

@ferryzhou
Last active July 5, 2018 17:21
Show Gist options
  • Save ferryzhou/1bf5a5be6576bcbdcafb93ff84869e82 to your computer and use it in GitHub Desktop.
Save ferryzhou/1bf5a5be6576bcbdcafb93ff84869e82 to your computer and use it in GitHub Desktop.
youtube download
# Download youtube to mp3
youtube-dl -f bestaudio -x --audio-format mp3 -o '%(playlist)s/%(playlist_index)s – %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLByf7LdMdgugN_3Jms9fjJpNV6rS_eB2N
# Download playlist
youtube-dl -o '%(playlist)s/%(playlist_index)s – %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLByf7LdMdgugN_3Jms9fjJpNV6rS_eB2N
# Cut videos
ffmpeg -i movie.mp4 -ss 00:00:03 -t 00:00:08 -async 1 cut.mp4
# Download from ustream to mp4 so even partially downloaded data can be used
youtube-dl --hls-use-mpegts -v http://www.ustream.tv/recorded/114791411
# Convert part to mp4
ffmpeg --hls-use-mpegts --prefer-ffmpeg -i a.mp4.part -c copy o.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment