Article 6NJ3Z Errors when I try to download a playlist with yt-dlp

Errors when I try to download a playlist with yt-dlp

by
grumpyskeptic
from LinuxQuestions.org on (#6NJ3Z)
I want to download the videos in a YouTube playlist, with some conditions.

The conditions are:

The codec must be h264

The image size must be no more than 720p

The video files must be sequentially numbered (with leading zeros) in playlist order, for example -

0001 cats.mp4
0002 more cats.mp4
0003 even more cats.mp4
.......

After spending hours studying this, my best guess for the yt-dlp string is -

Code:yt-dlp -v -f "bv*[height<=720][ext=mp4][vcodec^=avc1]+ba*[ext=m4a]" -N 4 "https://www.youtube.com/playlist?list=PL5KkMZvBpo5D1To3HQ3pNMMb8YGrJ1KX7" -o video_autonumber 03dWhen I try this I get errors:

Code:$ yt-dlp -v -f "bv*[height<=720][ext=mp4][vcodec^=avc1]+ba*[ext=m4a]" -N 4 "https://www.youtube.com/playlist?list=PL5KkMZvBpo5D1To3HQ3pNMMb8YGrJ1KX7" -o video_autonumber 03d
[debug] Command-line config: ['-v', '-f', 'bv*[height<=720][ext=mp4][vcodec^=avc1]+ba*[ext=m4a]', '-N', '4', 'https://www.youtube.com/playlist?list=PL5KkMZvBpo5D1To3HQ3pNMMb8YGrJ1KX7', '-o', 'video_autonumber', '03d']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.04.08 [7884ade65]
[debug] Python version 3.10.12 (CPython 64bit) - Linux-5.15.0-112-generic-x86_64-with-glibc2.35
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: brotli, certifi, Cryptodome, secretstorage, mutagen, sqlite, websockets
[debug] Proxy map: {}
ERROR: Fixed output name but more than one file to download: video_autonumberI cannot find any downloaded files either.

When I remove the "03d" at the end I get pages and pages of dense errors including multicoloured text.

I do not understand any of the above.

Has anyone got any idea how to make this work please?

The playlist URL is just a small playlist to try out.

Thanks.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments