Jeeaaasus / youtube-dl

Automated yt-dlp Docker image
https://hub.docker.com/r/jeeaaasustest/youtube-dl/
MIT License
258 stars 33 forks source link

Trouble with default parameter "--playlist-end 8" #65

Closed benfishbus closed 2 years ago

benfishbus commented 2 years ago

I assumed this parameter would download up to 8 new videos each run (i.e., after the videos listed in archive.txt are skipped), but I found it just kept stopping at the same 8 videos every time. My playlists never fully downloaded no matter how many runs occurred, until I commented out this parameter.

Maybe the following parameter would be better? --max-downloads NUMBER Abort after downloading NUMBER files

Jeeaaasus commented 2 years ago

Yes, as you figured out (and is stated in the readme) that parameter makes yt-dlp only try to download the 8 latest videos from each URL and that is on purpose.

I try to make the default behavior best suited towards users wanting to keep up to date with youtube channels, same reason why the readme is also centered around this usage but because yt-dlp has a million different use-cases, I also try not to unnecessarily restrict anything and you are able to customize it to your own liking, be that full archiving or what else. :)

benfishbus commented 2 years ago

I still think some clarification is warranted. If I save videos 1-8 to a playlist, download all of them, then save 2 more videos to it, the next run should always download videos 9-10...but it didn't for me. Maybe what this parameter cares about is not when the video was saved to the playlist, but when it was originally uploaded to youtube? (just a guess) That would work fine for new content uploaded to a channel, but not necessarily for pre-existing content saved to a playlist.

dustintheweb commented 2 years ago

I am also seeing something odd with this. I have a playlist with over 20 videos saved to it, but it only seems to be checking for the first 8 ever added.

Args:

### Check the github for help if needed: https://github.com/Jeeaaasus/youtube-dl/blob/master/README.md#configure-youtube-dl

## args
--no-write-thumbnail
--no-write-subs
--output "/downloads/%(uploader)s_%(upload_date)s_[%(title)s]_%(id)s"
--format "bestvideo[height<=720][ext=mp4]+bestaudio[ext=m4a]"

## Geo Restriction
--geo-bypass

## Video Selection
--playlist-end 8
--match-filter "! is_live"

## Download Options
--abort-on-unavailable-fragment
--playlist-reverse

## Filesystem Options
--windows-filenames
--no-part
--no-write-playlist-metafiles
--no-cache-dir

## Verbosity / Simulation Options
--no-progress

## Video Format Options
--merge-output-format mp4

## Subtitle Options
--sub-langs all,-live_chat

## Post-Processing Options
--embed-subs
--embed-thumbnail
--embed-metadata
--convert-subs srt

## SponsorBlock Options
--sponsorblock-mark all

Log:

[youtube:tab] PLw-1E-u-iSa...: Downloading webpage
WARNING: [youtube:tab] YouTube said: INFO - 1 unavailable video is hidden
[youtube:tab] PLw-1E-u-iSa...: Downloading API JSON with unavailable videos
WARNING: [youtube:tab] YouTube said: INFO - Unavailable videos will be hidden during playback
[download] Downloading playlist: #playlist
[youtube:tab] playlist #playlist: Downloading 8 videos
[download] Downloading video 1 of 8
[download] How to use a ... has already been recorded in the archive
...
[download] Downloading video 8 of 8
[download] Two Secrets of ... has already been recorded in the archive
[download] Downloading video 8 of 8
[download] Finished downloading playlist: #playlist
Jeeaaasus commented 2 years ago

I apologize for the extremely slow response to this issue.

I did some research and now know how to workaround this problem. If you still use --playlist-end '8' in your args.conf, you want to add this to all your playlist urls in channels.txt

# Download a whole playlist, also disable reverse download order
https://www.youtube.com/watch?v=0_WbxbTAW&list=PL-oTjIcS-sULx8tlzLQY | --playlist-end '-1' --no-playlist-reverse

This is from a new part added to the readme. Using args with specific urls, while overriding args.conf. --playlist-end '-1' disables --playlist-end '8' from args.conf.