Tuesday, December 29, 2020

Recording live stream from YouTube

The other day, there was this live event on YouTube which I was watching, and I was wondering if there is any way to record what has already been played for future playback.

Turns out youtube-dl won't work since YouTube no longer uses HLS but has switched to DASH. The tools will work for recording what is currently being streamed, but you cannot rewind back to a certain point in time.

After hours trying to figure out what to do... I did the most basic of things.

I played back the stream (still on-going) in YouTube, rewinding it to the point I wanted to record. Then, I played it fullscreen, and used vokoscreenNG to do a video capture of the screen. I had to remember to close other applications (like email and instant messaging) which would display notifications since that would ruin the video and audio recording. But it worked.

However, it also meant I could not use that PC for the entire duration of recording. So I started thinking... maybe I can use a Raspberry Pi and a HDMI capture device to do something similar.

1. Connect RPi's HDMI output to a HDMI capture device.
2. Plug in HDMI capture device to PC.
3. Use something like VLC to record whatever is being displayed by RPi using the HDMI capture device.
4. Play the YouTube live stream to be recorded on the RPi rewinding back to whichever point to start recording from.

I haven't really tried this yet, since there is nothing that I want to record now. But theoretically, it should work. So if the opportunity comes, I may give it a try.

No comments: