youtube-dl: list videos in order

Linux for blind general discussion blinux-list at redhat.com
Fri Oct 22 11:33:32 UTC 2021


I want to use youtube-dl to list the videos in a playlist and have that listing written to an output file. I downloaded the playlist but forgot to include
%(playlist_index)s
in the output template. So the videos are just scattered all over the place with no order.
I tried
youtube-dl --flat-playlist -o "%(playlist_index)s - %(title)s" url > playlist.txt
because the --flat-playlist is supposed to list the videos, according to the manpage. I thought the -o flag would format the listing correctly, but it spit out the error:
youtube-dl: error: Cannot download a video and extract audio into the same file! Use "%(playlist_index)s - %(title)s.%(ext)s" instead of "%(playlist_index)s - %(title)s" as the output template
So I did as suggested, only instead of listing the videos, all the output file had was stuff like:
Downloading video 1 of 80
Downloading video 2 of 80
and that's it. No titles. Nothing.
So how is --flat-playlist actually supposed to work?





More information about the Blinux-list mailing list