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.41k stars 10.04k forks source link

YouTube-dl - autonumber to distinguish between different playlists mentioned in batch-file #10729

Closed blueray453 closed 8 years ago

blueray453 commented 8 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.09.19. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.


My youtube-dl.conf is -

-u <User Name>
-p <Password>
-i
-c
--no-warnings
--console-title
--batch-file='batch-file.txt'
--autonumber-size 3 
-o 'MyVideos/%(playlist_title)s/%(chapter_number)s - %(chapter)s/%(autonumber)s-%(title)s.%(ext)s'
-f 'bestvideo[height<=720]+bestaudio/best[height<=720]'

batch-file.txt is -

URL1
URL2
URL3

The problem is, when I put multiple playlist in the batch file, the autonumber can not distinguish between different playlists.

For Example, if URL1 (Which is an URL of a Playlist) has 21 videos, and the last video has the autonumber 21, then the URL2 (second playlist) will have 22 as the autonumber of its first video.

I want each playlist to start with 1.

Is there any solution to this problem.

dstftw commented 8 years ago

Use %(playlist_index)s.