ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.05k stars 10.01k forks source link

Exclude live recordings from youtube channel backups #28790

Open gfogus opened 3 years ago

gfogus commented 3 years ago

I am looking for a way to exclude live recordings from the list of videos that youtube-dl attempts to download from a Youtube channel.

The following error message is encountered when attempting to download a live Youtube recording.

ERROR: This live stream recording is not available.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5qwpsrl8\build\youtube_dl\YoutubeDL.py", line 806, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5qwpsrl8\build\youtube_dl\YoutubeDL.py", line 827, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5qwpsrl8\build\youtube_dl\extractor\common.py", line 534, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5qwpsrl8\build\youtube_dl\extractor\youtube.py", line 1698, in _real_extract
youtube_dl.utils.ExtractorError: This live stream recording is not available.

I searched the manual and the issues for such a feature but did not find it.

One particular channel I am interested in almost always has a live stream going on, and youtube-dl fails repeatedly when downloading the channel.

To be clear, I do not want to download live recordings. I want to exclude them from the list of videos to download so that youtube-dl does not attempt to download them.

s104346 commented 3 years ago

--match-filter "!is_live" to skip live videos and -i/--ignore-errors to ignore errors (the exclamation mark in !is_live might cause problems with your shell, try \!is_live in that case)