Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue when trying to --download-archive in the same directory as playlist #25245

Closed
SngLol opened this issue May 11, 2020 · 2 comments
Closed

issue when trying to --download-archive in the same directory as playlist #25245

SngLol opened this issue May 11, 2020 · 2 comments

Comments

@SngLol
Copy link

@SngLol SngLol commented May 11, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.05.08
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-o', '%%(playlist)s/%%(playlist_index)s - %%(title)s.%%(ext)s', '--yes-playlist', '--extract-audio', '--audio-format', 'mp3', '--audio-quality', '0', '--ignore-errors', '--embed-thumbnail', '--download-archive', '%%(playlist)s/archive/archive.txt', 'https://www.youtube.com/playlist?list=PLkU3mQWUfMFNyFCH5KIYRxtorpPef8BdS']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.05.03
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg N-92963-g1ea5529dd2, ffprobe N-92963-g1ea5529dd2
[debug] Proxy map: {}
[youtube:playlist] PLkU3mQWUfMFNyFCH5KIYRxtorpPef8BdS: Downloading webpage
[download] Downloading playlist: Japanese Music
[youtube:playlist] playlist Japanese Music: Downloading 54 videos
[download] Downloading video 1 of 54
[youtube] Tnw8cRgre7I: Downloading webpage
[youtube] Tnw8cRgre7I: Downloading thumbnail ...
[youtube] Tnw8cRgre7I: Writing thumbnail to: %(playlist)s\%(playlist_index)s - %(title)s.jpg
[debug] Invoking downloader on 'https://r5---sn-uxaxovg-5gok.googlevideo.com/videoplayback?expire=1589244158&ei=npy5XvL3G8vr7QT7wp_wDg&ip=85.230.147.52&id=o-ANGjXJNdKCcniot4AjS64ZHXftVhZ2yyIWeUkFDzrQ9j&itag=251&source=youtube&requiressl=yes&mh=Sn&mm=31%2C29&mn=sn-uxaxovg-5gok%2Csn-5goeen76&ms=au%2Crdu&mv=m&mvi=4&pl=14&initcwndbps=1480000&vprv=1&mime=audio%2Fwebm&gir=yes&clen=3327413&dur=206.441&lmt=1575198396821190&mt=1589222505&fvip=5&keepalive=yes&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAPNu_hWOjYTDCPH_4Ta4Jp1XqdacbWeSp11RofEfZSGyAiATB8CbrDmXaCRe0UH2y1TaGUXAFnj_L5fF_8HfOfRzDA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAIFkgxygLkw130dSNyaspg8dd-rIBcwzMc6ID2NanAX8AiEAtoXDba-_4na5UGephbslm7j6BionC9XUaTjeZcAZxAs%3D&ratebypass=yes'
[download] Destination: %(playlist)s\%(playlist_index)s - %(title)s.%(ext)s
[download] 100% of 3.17MiB in 00:00
[debug] ffmpeg command line: ffprobe -show_streams "file:%(playlist)s\%(playlist_index)s - %(title)s.%(ext)s"
[ffmpeg] Destination: %(playlist)s\%(playlist_index)s - %(title)s.mp3
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:%(playlist)s\%(playlist_index)s - %(title)s.%(ext)s" -vn -acodec libmp3lame "-q:a" 0 "file:%(playlist)s\%(playlist_index)s - %(title)s.mp3"
Deleting original file %(playlist)s\%(playlist_index)s - %(title)s.%(ext)s (pass -k to keep)
[ffmpeg] Adding thumbnail to "%(playlist)s\%(playlist_index)s - %(title)s.mp3"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:%(playlist)s\%(playlist_index)s - %(title)s.mp3" -i "file:%(playlist)s\%(playlist_index)s - %(title)s.jpg" -c copy -map 0 -map 1 "-metadata:s:v" "title=\"Album cover\"" "-metadata:s:v" "comment=\"Cover (Front)\"" "file:%(playlist)s\%(playlist_index)s - %(title)s.temp.mp3"
ERROR: [Errno 2] No such file or directory: '%(playlist)s/archive/archive.txt'
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpybwhja3m\build\youtube_dl\YoutubeDL.py", line 808, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpybwhja3m\build\youtube_dl\YoutubeDL.py", line 863, in process_ie_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpybwhja3m\build\youtube_dl\YoutubeDL.py", line 1644, in process_video_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpybwhja3m\build\youtube_dl\YoutubeDL.py", line 2004, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpybwhja3m\build\youtube_dl\YoutubeDL.py", line 2121, in record_download_archive
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpybwhja3m\build\youtube_dl\utils.py", line 3201, in __init__
FileNotFoundError: [Errno 2] No such file or directory: '%(playlist)s/archive/archive.txt'

Description

I'm trying to download a playlist of videos into it's own sub-folder using the %%(playlist)s variable to name the folder appropriately. When trying to apply this variable to the --download-archive in order to store the archive in the same folder as the playlist, it returns an error saying [Errno 2] No such file or directory: '%(playlist)s/archive/archive.txt'
This makes me unable to separate different playlist's archives as I would not want them all to use the same 1 archive.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 11, 2020

  1. Do not double %.
  2. --download-archive does not support output template by design.
@dstftw dstftw closed this May 11, 2020
@SngLol
Copy link
Author

@SngLol SngLol commented May 11, 2020

The double % is necessary to make it a valid variable when using batch. If I use single % it will take it as a normal string.
Is there any way for me to achieve these results without using output template?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.