youtube-dl icon indicating copy to clipboard operation
youtube-dl copied to clipboard

"--less-verbose" option

Open TupaNegreiros opened this issue 2 years ago • 3 comments

  • [x] I'm reporting a feature request
  • [x] I've verified that I'm running youtube-dl version 2021.12.17
  • [x] I've searched the bugtracker for similar feature requests including closed ones

I use youtube-dl to download channels and playlists, and everyday I download new videos of those channels/playlists.

So if I run: youtube-dl https://www.youtube.com/channel/somechannel --no-warnings --download-archive downloaded.txt

Then run a second time: youtube-dl https://www.youtube.com/channel/somechannel --no-warnings --download-archive downloaded.txt

A lot of the output are lines like: [youtube:tab] Downloading page X [download] Downloading video 1 of 595 [download] X1234 has already been recorded in archive

It could be great to have a option "--less-verbose" to output only lines like errors and downloaded videos. "--quiet" shows no output at all. My log are huge, almost impossible to find anything on it.

TupaNegreiros avatar Feb 24 '23 17:02 TupaNegreiros

Redirect the standard output to the bit-bucket:

  • POSIX: ... >/dev/null
  • Windows cmd: ... >NUL

Output like

WARNING: Falling back on generic information extractor.
ERROR: Unsupported URL: http://survey-smiles.com/

sent to standard error will still appear.

dirkf avatar Feb 24 '23 18:02 dirkf

>/dev/null seems to have the same effect as "-q" I get errors like: ERROR: The playlist does not exist. but not the previous line showing which video/playlist.

Also, getting log of downloaded videos is useful. Getting log of skipped downloads are irrelevant.

TupaNegreiros avatar Feb 24 '23 19:02 TupaNegreiros

Otherwise, pipe the output through grep or awk (POSIX) or findstr (Windows cmd) to strip out the output lines you don't want.

Or fork the code and filter messages in Python: see #31466.

dirkf avatar Feb 24 '23 19:02 dirkf

I'll mark this off now. Nonetheless, a well-justified PR might be considered.

dirkf avatar Mar 07 '23 18:03 dirkf