First make you have both youtube-dl and ffmpeg installed: sudo apt install youtube-dl ffmpeg Then download a portion of your desired YouTube Video with the following command: -ss 00:15 --> skip first 15 seconds of video -t 00:45 --> record for 45 seconds ffmpeg $(youtube-dl -g 'https://www.youtube.com/watch?v=oHg5SJYRHA0' | sed "s/.*/-ss 00:15 -i &/") -t 00:45 -c copy video.mkv
Debian, Ubuntu et al.
A blog about Linux, Debian, Ubuntu, Raspberry Pi and Python.