How to start youtube-dl autonumber from a different number than 1?
Asked Answered
L

2

10

I was downloading a playlist from youtube using youtube-dl. I used autonumbering feature to number the videos which could be achieved by formatting the name of output file as follows -o "%(autonumber)s-%(title)s.%(ext)s". The download failed in between. Now I wish to start the autonumber from the video next to failed video and not 1. But autonumber resets itself to 1 everytime. How can I set it to a different number greater than 1 ?

Levison answered 30/9, 2015 at 9:35 Comment(1)
am afraid that the one option is to starting download in another folder and then shift numbers manually or via some scriptAccouterment
M
10

For playlists you should use playlist_index instead: -o '%(playlist_index)s-%(title)s.%(ext)s'

Macmacabre answered 5/2, 2016 at 16:13 Comment(1)
Also adding --continue solves this problem. Youtube-dl will resume from where it failed.Levison
C
2

Instead of %(playlist_index)s, you should use youtube-dl --autonumber-start 5 $URL -o "%(autonumber)s_stuff" It will start %(autonumber)s at 5 in this case.

Croon answered 7/11, 2020 at 5:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.