How to record YouTube and Twitch live streams
ffff0 last edited by ffff0
Hello, fellow allies.
I never watch E3 live because of time zone difference & work. Sure, you can just download them after the fact, but video processing takes time and if there was some copyrighted music, you may get a recording without audio. So I just record them while I’m sleeping or away. There’s no ready-to-go solution for this, but it’s actually pretty easy to make one of your own. Here’s how (for Windows):
- Download and install Streamlink (https://github.com/streamlink/streamlink/releases/download/1.1.1/streamlink-1.1.1.exe)
- Download Ffmpeg (https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20190607-1e7a8b9-win64-static.zip) and extract ffmpeg.exe from ffmpeg-20190607-1e7a8b9-win64-static\bin folder in archive. Save this file in a folder where you want to save your streams.
- Open cmd (Press Window+R, type cmd and press Enter) and type:
and press Enter, where #path# is a path to a folder where you saved ffmpeg.exe. If you used other drive than your Windows drive you also need to type:
and press Enter, where #Letter# is drive’s letter.
for /l %x in (1, 1, 10000000000000) do streamlink.exe --twitch-disable-hosting #URL# "2160p, 1080p60, 1080p, 720p60, best" -O | ffmpeg.exe -i - -vcodec copy -acodec copy #FILE#%x.ts
and press Enter, where #URL# is URL of the page where you’ll watch the stream and #FILE# is file name (no spaces, better to use letters only). Do not add spaces between filename and %x.ts
After this your PC will be constantly trying to connect to the stream. Once the stream will start it will be saved in the file of your choosing. This will be a raw copy, so you will not lose any quality (and it doesn’t take a lot of resources, so you can record multiple streams at once). If there will be an interruption, it will continue trying to reconnect and once connection will be restored it will begin saving next portion of the stream to another file. Unfortunately it doesn’t know when the stream ends, so you have to close cmd window manually. Also YouTube usually shows the last 2-4 hours of ended stream while processing it, and this ending will also be saved multiple times in multiple files (just delete these files after the fact).
For example to record Easy Allies type this:
for /l %x in (1, 1, 10000000000000) do streamlink.exe --twitch-disable-hosting https://www.twitch.tv/easyallies "2160p, 1080p60, 1080p, 720p60, best" -O | ffmpeg.exe -i - -vcodec copy -acodec copy eza%x.ts
And to record Xbox press-conference type this:
for /l %x in (1, 1, 10000000000000) do streamlink.exe --twitch-disable-hosting https://www.youtube.com/watch?v=zeYQ-kPF0iQ "2160p, 1080p60, 1080p, 720p60, best" -O | ffmpeg.exe -i - -vcodec copy -acodec copy xbox%x.ts
That’s it. It sounds more complicated than it actually is. Just try it with some stream that is currently live.
ffff0 last edited by
Oh, and you also can watch the video during recording.