Posts for: #Youtube-Dl

Twitch and FFmpeg and Youtube-dl: Fetch from live stream to local file

(Using Windows PowerShell, adapt for UNIX bash shouldn’t be a big issue)

Record a live stream

So something nice with youtube-dl is like you can ask not to download the media but to fetch for the media link :

>> youtube-dl -g https://www.youtube.com/watch?v=RJt01u4yrLQ
https://r2---sn-h0jeened.googlevideo.com/videoplayback?expire=1[...]

If you use that for a twitch channel that is streaming live, it returns you the HLS stream.

>> youtube-dl -g https://www.twitch.tv/farore_de_firone
https://video-weaver.ber01.hls.ttvnw.net/v1/playlist/CpkEQusnrcdffNI3[..]MA2c4.m3u8

It by default binds to the best quality video, but you can check and select all format available using -F

Read more

Extract chapters from Youtube Media

Update: Since a while, youtube-dl isn’t as powerful as it is. Fortunatelly another fork exists : yt-dlp . Use this instead

Youtube recently got this “chapter” concept where it fragment a long video with chapters. I think this data might be parsed from the description of the video done, as they already parse any timestamp available for a while now.

Thanks to youtube-dl, we can download thena video and the metadata which now contains this chapter data.

Read more