youtube-dl: Downloading Streams

[linkstandalone]

Just a quick tutorial on downloading YouTube live streams, just add this to your .bashrc file

With DVR:

function streamdl-dvr() {
        URL=$(youtube-dl --no-warnings -f 95 -g -- $1)
        ffmpeg -live_start_index -180000 -i $URL -c copy ${2}.ts
}

Without DVR (always in 720p)

alias streamdl="youtube-dl -f 95 --"