yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
82.28k stars 6.42k forks source link

yt-dlp extracts incorrect URL for some tracks in a playlist on music.youtube.com, URL leads to unavailable version of the track #10695

Open hackbackwards opened 1 month ago

hackbackwards commented 1 month ago

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

Checklist

Region

United States

Example URLs

https://music.youtube.com/playlist?list=PLuHwpDXpuFhV14KMiVcYs0SUwM85wxS3k https://music.youtube.com/watch?v=vy2el0kqwLQ ("Lone Digger", playable, URL when clicked into from playlist directly) https://music.youtube.com/watch?v=L2Yog_3hvj4 ("Lone Digger", not playable, URL extracted by yt-dlp when downloading playlist)

Provide a description that is worded well enough to be understood

Attempting to download tracks from an unlisted (non-private) playlist on music.youtube.com. All tracks on the playlist are publicly available to all users on music.youtube.com.

yt-dlp is extracting a URL to a version of the video that is unavailable, despite the video being available on youtube.com. I can't find a way to manually get to the same URL yt-dlp is getting - every version of the song I try to access has an available video, and downloads without issue if I provide the direct URL.

EXAMPLE:

REQUEST: add support for music.youtube.com to download playlist tracks directly.

Current workaround: gather the correct URL for each track yt-dlp was unable to download from the playlist and download them individually.

Provide verbose output that clearly demonstrates the problem

Complete Verbose Output

Code snippet showing four failed downloads and two successful downloads from the playlist. For each failed download, the track is playable from the playlist, and yt-dlp has extracted an unplayable URL rather than the track's actual playable URL.

PS C:\Users\andre\Music> ./yt-dlp.exe -vU --break-on-existing --cookies-from-browser "chrome" -x --audio-format "m4a" "https://music.youtube.com/playlist?list=PLuHwpDXpuFhV14KMiVcYs0SUwM85wxS3k"
[debug] Command-line config: ['-vU', '--break-on-existing', '--cookies-from-browser', 'chrome', '-x', '--audio-format', 'm4a', 'https://music.youtube.com/playlist?list=PLuHwpDXpuFhV14KMiVcYs0SUwM85wxS3k']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.08.06 from yt-dlp/yt-dlp [4d9231208] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-116133-g03175b587c-20240704 (setts), ffprobe N-116133-g03175b587c-20240704, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.35.5, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {}
Extracting cookies from chrome
[debug] Extracting cookies from: "C:\Users\andre\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\andre\AppData\Local\Google\Chrome\User Data\Local State"
Extracted 3420 cookies from chrome
[debug] cookie version breakdown: {'v10': 3514, 'other': 0, 'unencrypted': 83}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1830 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.08.06 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.08.06 from yt-dlp/yt-dlp)
[youtube:tab] Extracting URL: https://music.youtube.com/playlist?list=PLuHwpDXpuFhV14KMiVcYs0SUwM85wxS3k
WARNING: [youtube:tab] YouTube Music is not directly supported. Redirecting to https://www.youtube.com/playlist?list=PLuHwpDXpuFhV14KMiVcYs0SUwM85wxS3k
[youtube:tab] PLuHwpDXpuFhV14KMiVcYs0SUwM85wxS3k: Downloading webpage
[debug] [youtube:tab] Extracted SAPISID cookie
[youtube:tab] PLuHwpDXpuFhV14KMiVcYs0SUwM85wxS3k: Redownloading playlist API JSON with unavailable videos
[download] Downloading playlist: Beats that move you
[youtube:tab] PLuHwpDXpuFhV14KMiVcYs0SUwM85wxS3k page 1: Downloading API JSON
[youtube:tab] Playlist Beats that move you: Downloading 182 items of 252
[download] Downloading item 1 of 182
[youtube] Extracting URL: https://music.youtube.com/watch?v=L2Yog_3hvj4
[youtube] L2Yog_3hvj4: Downloading webpage
[debug] [youtube] Extracted SAPISID cookie
[youtube] L2Yog_3hvj4: Downloading ios player API JSON
[youtube] L2Yog_3hvj4: Downloading web creator player API JSON
[youtube] L2Yog_3hvj4: Downloading ios music player API JSON
[youtube] L2Yog_3hvj4: Downloading web music client config
[youtube] L2Yog_3hvj4: Downloading player 28fd7348
[youtube] L2Yog_3hvj4: Downloading web music player API JSON
ERROR: [youtube] L2Yog_3hvj4: Video unavailable. This video is not available
  File "yt_dlp\extractor\common.py", line 740, in extract
  File "yt_dlp\extractor\youtube.py", line 4358, in _real_extract
  File "yt_dlp\extractor\common.py", line 1263, in raise_no_formats

[download] Downloading item 2 of 182
[youtube] Extracting URL: https://music.youtube.com/watch?v=egMW50X8XEY
[youtube] egMW50X8XEY: Downloading webpage
[youtube] egMW50X8XEY: Downloading ios player API JSON
[youtube] egMW50X8XEY: Downloading web creator player API JSON
[youtube] egMW50X8XEY: Downloading ios music player API JSON
[youtube] egMW50X8XEY: Downloading web music client config
[youtube] egMW50X8XEY: Downloading web music player API JSON
ERROR: [youtube] egMW50X8XEY: Video unavailable. This video is not available
  File "yt_dlp\extractor\common.py", line 740, in extract
  File "yt_dlp\extractor\youtube.py", line 4358, in _real_extract
  File "yt_dlp\extractor\common.py", line 1263, in raise_no_formats

[download] Downloading item 3 of 182
[youtube] Extracting URL: https://music.youtube.com/watch?v=i59WmqD4gdo
[youtube] i59WmqD4gdo: Downloading webpage
[youtube] i59WmqD4gdo: Downloading ios player API JSON
[youtube] i59WmqD4gdo: Downloading web creator player API JSON
[youtube] i59WmqD4gdo: Downloading ios music player API JSON
[youtube] i59WmqD4gdo: Downloading web music client config
[youtube] i59WmqD4gdo: Downloading web music player API JSON
ERROR: [youtube] i59WmqD4gdo: Video unavailable. This video is not available
  File "yt_dlp\extractor\common.py", line 740, in extract
  File "yt_dlp\extractor\youtube.py", line 4358, in _real_extract
  File "yt_dlp\extractor\common.py", line 1263, in raise_no_formats

[download] Downloading item 4 of 182
[youtube] Extracting URL: https://music.youtube.com/watch?v=oHb1MAgPQik
[youtube] oHb1MAgPQik: Downloading webpage
[youtube] oHb1MAgPQik: Downloading ios player API JSON
[youtube] oHb1MAgPQik: Downloading web creator player API JSON
[youtube] oHb1MAgPQik: Downloading ios music player API JSON
[youtube] oHb1MAgPQik: Downloading web music client config
[youtube] oHb1MAgPQik: Downloading web music player API JSON
ERROR: [youtube] oHb1MAgPQik: Video unavailable. This video is not available
  File "yt_dlp\extractor\common.py", line 740, in extract
  File "yt_dlp\extractor\youtube.py", line 4358, in _real_extract
  File "yt_dlp\extractor\common.py", line 1263, in raise_no_formats

[download] Downloading item 5 of 182
[youtube] Extracting URL: https://music.youtube.com/watch?v=vFXU76lPENs
[youtube] vFXU76lPENs: Downloading webpage
[youtube] vFXU76lPENs: Downloading ios player API JSON
[youtube] vFXU76lPENs: Downloading web creator player API JSON
[youtube] vFXU76lPENs: Downloading ios music player API JSON
[youtube] vFXU76lPENs: Downloading web music client config
[youtube] vFXU76lPENs: Downloading web music player API JSON
[debug] [youtube] Extracting signature function js_28fd7348_105
[debug] Loading youtube-sigfuncs.js_28fd7348_105 from cache
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig ISyumJTA4YXG9eIFN => z6d4oFyTU21DnQ
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig a5GTfMsPeeFK8fNI_ => euCZreFEhawvDw
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig uvnMrjcXO3ZvJIqXE => _Yv9--4jWTxFpw
[youtube] vFXU76lPENs: Downloading m3u8 information
[youtube] vFXU76lPENs: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] vFXU76lPENs: Downloading 1 format(s): 774
[debug] Invoking http downloader on "https://rr5---sn-nx5s7nee.googlevideo.com/videoplayback?expire=1723167633&ei=MR-1ZtClLIGZsfIPvdnEuA8&ip=2601%3A602%3A8f7f%3A4821%3A4126%3A5f49%3Ae557%3Aa9cb&id=o-AMB7g4iuDEZpOeLUWL4Bgx1DaavihfmCI-DzYYPsI_ze&itag=774&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=9I&mm=31%2C29&mn=sn-nx5s7nee%2Csn-nx57ynsk&ms=au%2Crdu&mv=m&mvi=5&pl=38&ctier=A&pfa=5&gcr=us&initcwndbps=1743750&hightc=yes&siu=1&bui=AXc671Jzfo6qsKeG9kd0B2H9bEjaPEkKMJKECtwdIzwGJ8L9abW5B2u_5ERTjnynAANz_dVa5Q&spc=Mv1m9tP1d6LRqGxu8lNhmHQd1CYgKa0sBfqwLG4CiQn3zY9PCNI9Df7rNZMq39w&vprv=1&svpuc=1&mime=audio%2Fwebm&ns=v8KgIWo163hzbV5ZLuXpclkQ&rqh=1&gir=yes&clen=8701457&dur=268.181&lmt=1714893595761364&mt=1723145838&fvip=2&keepalive=yes&c=WEB_REMIX&sefc=1&txp=2318224&n=_Yv9--4jWTxFpw&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cctier%2Cpfa%2Cgcr%2Chightc%2Csiu%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AGtxev0wRgIhALEm2xwLBmWZzw1M3LxueIimAB5FGOcrocWp2QQxt-aBAiEA9BELFe22vP3hBvt3QyBLsmJ54tRp381BAjW_pAjmRFw%3D&sig=AJfQdSswRQIgUIYldHuwzcT2lwwhrjtqwxG7MzV-Z5AGNY-V68JfGAQCIQDyr_g82Z4lB49ETSWEBH20PkZvClQBb_yFec7VR7E6OA%3D%3D"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: My People [vFXU76lPENs].webm
[download] 100% of    8.30MiB in 00:00:00 at 19.71MiB/s
[debug] ffmpeg command line: ffprobe -show_streams "file:My People [vFXU76lPENs].webm"
[ExtractAudio] Destination: My People [vFXU76lPENs].m4a
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i "file:My People [vFXU76lPENs].webm" -vn -acodec aac -q:a 2.05 -movflags +faststart "file:My People [vFXU76lPENs].m4a"
Deleting original file My People [vFXU76lPENs].webm (pass -k to keep)
[download] Downloading item 6 of 182
[youtube] Extracting URL: https://music.youtube.com/watch?v=p3g2xZK3iJI
[youtube] p3g2xZK3iJI: Downloading webpage
[youtube] p3g2xZK3iJI: Downloading ios player API JSON
[youtube] p3g2xZK3iJI: Downloading web creator player API JSON
[youtube] p3g2xZK3iJI: Downloading ios music player API JSON
[youtube] p3g2xZK3iJI: Downloading web music client config
[youtube] p3g2xZK3iJI: Downloading web music player API JSON
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig -GjlkwOyGcR29IK0J => Gm42bALCaPuq6A
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig l6_UWueYc51Rd-J_W => U7DE90tBtvRMpg
[debug] [youtube] Extracting signature function js_28fd7348_101
[debug] Loading youtube-sigfuncs.js_28fd7348_101 from cache
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig OJonZ4LjBhL-hzSjL => 0j6HLxrvCUtS4g
[youtube] p3g2xZK3iJI: Downloading m3u8 information
[youtube] p3g2xZK3iJI: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] p3g2xZK3iJI: Downloading 1 format(s): 774
[debug] Invoking http downloader on "https://rr3---sn-nx5s7n7s.googlevideo.com/videoplayback?expire=1723167645&ei=PR-1Zq2eK9z4sfIPlMHcwAk&ip=2601%3A602%3A8f7f%3A4821%3A4126%3A5f49%3Ae557%3Aa9cb&id=o-AN54wbV5Q-x5E16pd-tw_TttNd3uJtXw4oi1WqyN8qM6&itag=774&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=at&mm=31%2C29&mn=sn-nx5s7n7s%2Csn-nx57ynlk&ms=au%2Crdu&mv=m&mvi=3&pl=38&ctier=A&pfa=5&gcr=us&initcwndbps=1822500&hightc=yes&siu=1&bui=AXc671LRmUZ3zviCdAc4JbO7GeGku4BmxnXut4QPiyKBevu8znyJWJyaIiM0pfVCL2xmH2tQXA&spc=Mv1m9lK1Ll9MW0pvhDkUea6MWkVR2043qEqjeugsgPQuh4PnucV8dRwuWSiKYaA&vprv=1&svpuc=1&mime=audio%2Fwebm&ns=8L-CttdWlDZf4d0YDkZQkjwQ&rqh=1&gir=yes&clen=8751403&dur=275.081&lmt=1714853724124839&mt=1723145593&fvip=5&keepalive=yes&c=WEB_REMIX&sefc=1&txp=2318224&n=0j6HLxrvCUtS4g&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cctier%2Cpfa%2Cgcr%2Chightc%2Csiu%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AGtxev0wRgIhAITcWm6g-MAlAx-4xYEFwDl__RCrtQirFkgFHg8sHF47AiEA9pzpNHTKjR7OTEphu4Bzk2GITIeouKZwG_5iVRgm2bA%3D&sig=AJfQdSswRQIgeW6-3aWnP4v7ANccCPKAtlC9GVHuyTgMEMPYWP9062ICIQCQetujDBceROv5ciR-vswzTgmDxeueajlfs0lrwvviqg%3D%3D"
[download] Destination: A New Sky [p3g2xZK3iJI].webm
[download] 100% of    8.35MiB in 00:00:00 at 19.05MiB/s
[debug] ffmpeg command line: ffprobe -show_streams "file:A New Sky [p3g2xZK3iJI].webm"
[ExtractAudio] Destination: A New Sky [p3g2xZK3iJI].m4a
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i "file:A New Sky [p3g2xZK3iJI].webm" -vn -acodec aac -q:a 2.05 -movflags +faststart "file:A New Sky [p3g2xZK3iJI].m4a"
Deleting original file A New Sky [p3g2xZK3iJI].webm (pass -k to keep)

(output continues, truncated for relevancy)

bashonly commented 1 month ago

I think this is a duplicate of #6351?

Also related: #622

hackbackwards commented 1 month ago

I can download the track just fine if I enter its URL directly, though. And most of the tracks on the playlist also download without issue.

Edit: Example track is the first in the playlist, 'Lone Digger'. When downloading from the playlist, it fails. When downloading from the track's URL directly, it works, shown below:


[debug] Command-line config: ['-vU', '--break-on-existing', '--cookies-from-browser', 'chrome', '-x', '--audio-format', 'm4a', 'https://music.youtube.com/watch?v=vy2el0kqwLQ']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.08.06 from yt-dlp/yt-dlp [4d9231208] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-116133-g03175b587c-20240704 (setts), ffprobe N-116133-g03175b587c-20240704, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.35.5, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {}
Extracting cookies from chrome
[debug] Extracting cookies from: "C:\Users\andre\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\andre\AppData\Local\Google\Chrome\User Data\Local State"
Extracted 3420 cookies from chrome
[debug] cookie version breakdown: {'v10': 3514, 'other': 0, 'unencrypted': 83}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1830 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.08.06 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.08.06 from yt-dlp/yt-dlp)
[youtube] Extracting URL: https://music.youtube.com/watch?v=vy2el0kqwLQ
[youtube] vy2el0kqwLQ: Downloading webpage
[debug] [youtube] Extracted SAPISID cookie
[youtube] vy2el0kqwLQ: Downloading ios player API JSON
[youtube] vy2el0kqwLQ: Downloading web creator player API JSON
[youtube] vy2el0kqwLQ: Downloading ios music player API JSON
[youtube] vy2el0kqwLQ: Downloading web music client config
[youtube] vy2el0kqwLQ: Downloading player 28fd7348
[youtube] vy2el0kqwLQ: Downloading web music player API JSON
[debug] [youtube] Extracting signature function js_28fd7348_105
[debug] Loading youtube-sigfuncs.js_28fd7348_105 from cache
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig VSYGFWLkSCDfRqv85 => 26pnBxUtfsKZZg
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig mqA2B_tkm0bLuwxAz => x3NjGfgBJ4weXQ
[debug] [youtube] Extracting signature function js_28fd7348_101
[debug] Loading youtube-sigfuncs.js_28fd7348_101 from cache
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig UDdP9WhByiKGzAH6t => 9ZyTB3U0rJDHAg
[youtube] vy2el0kqwLQ: Downloading m3u8 information
[youtube] vy2el0kqwLQ: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] vy2el0kqwLQ: Downloading 1 format(s): 774
[debug] Invoking http downloader on "https://rr5---sn-nx57ynsk.googlevideo.com/videoplayback?expire=1723172344&ei=mDG1ZuKNJNKKsfIP3fnYoQM&ip=2601%3A602%3A8f7f%3A4821%3A4126%3A5f49%3Ae557%3Aa9cb&id=o-AGL9AzuD0WD_i7H4cbLZvCABqYLnifo3tlMjFsfQY09g&itag=774&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=Sv&mm=31%2C26&mn=sn-nx57ynsk%2Csn-vgqsknlk&ms=au%2Conr&mv=m&mvi=5&pl=38&ctier=A&pfa=5&gcr=us&initcwndbps=1910000&hightc=yes&siu=1&bui=AXc671JoBC_xaiYg0aXUBnqONhU8De1t6HjzLVX1vCzYno7ZKFYq3ihCHEW1MlI-LB5Pae9iPA&spc=Mv1m9uNbWXMnb_VHh76IF8LVIFWA-rLXZ1uZ8-Xk9vEGId98FAqyf5Sbzo6B-hU&vprv=1&svpuc=1&mime=audio%2Fwebm&ns=6cyUlkAP9We79GeI3j7Om90Q&rqh=1&gir=yes&clen=7579044&dur=229.821&lmt=1714898383832450&mt=1723150391&fvip=4&keepalive=yes&c=WEB_REMIX&sefc=1&txp=2318224&n=9ZyTB3U0rJDHAg&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cctier%2Cpfa%2Cgcr%2Chightc%2Csiu%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AGtxev0wRgIhAIBNGLs5UlxnL7PKbk4CSqRU2z1Zepl3tjwGcpWmsNm0AiEA2LNDRpuK5In8BmQmdqa6UHm7P6e39miNp8SDRjBEzqk%3D&sig=AJfQdSswRQIgWj3bI9XcOU1C9mOJHH6veYOhkOSakA--cRoYJHL23hUCIQCQTmUAzmzeBGyYSnQdrO9g0y-zK4d5iyQEFUqTw68pFw%3D%3D"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: Lone Digger [vy2el0kqwLQ].webm
[download] 100% of    7.23MiB in 00:00:00 at 12.12MiB/s
[debug] ffmpeg command line: ffprobe -show_streams "file:Lone Digger [vy2el0kqwLQ].webm"
[ExtractAudio] Destination: Lone Digger [vy2el0kqwLQ].m4a
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i "file:Lone Digger [vy2el0kqwLQ].webm" -vn -acodec aac -q:a 2.05 -movflags +faststart "file:Lone Digger [vy2el0kqwLQ].m4a"
Deleting original file Lone Digger [vy2el0kqwLQ].webm (pass -k to keep)```
bashonly commented 1 month ago

Got it. And that's the same issue being demonstrated/described in #6351, right?

hackbackwards commented 1 month ago

Almost, but not quite.

When I download the playlist from youtube.com instead of music.youtube.com, the same track will download (from the playlist) successfully - the video is available on youtube.com:

PS C:\Users\andre\Music> ./yt-dlp.exe -vU --break-on-existing --cookies-from-browser "chrome" -x --audio-format "m4a" "https://www.youtube.com/watch?v=vy2el0kqwLQ&list=LL"
[debug] Command-line config: ['-vU', '--break-on-existing', '--cookies-from-browser', 'chrome', '-x', '--audio-format', 'm4a', 'https://www.youtube.com/watch?v=vy2el0kqwLQ&list=LL']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.08.06 from yt-dlp/yt-dlp [4d9231208] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-116133-g03175b587c-20240704 (setts), ffprobe N-116133-g03175b587c-20240704, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.35.5, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {}
Extracting cookies from chrome
[debug] Extracting cookies from: "C:\Users\andre\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\andre\AppData\Local\Google\Chrome\User Data\Local State"
Extracted 3420 cookies from chrome
[debug] cookie version breakdown: {'v10': 3514, 'other': 0, 'unencrypted': 83}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1830 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.08.06 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.08.06 from yt-dlp/yt-dlp)
[youtube:tab] Extracting URL: https://www.youtube.com/watch?v=vy2el0kqwLQ&list=LL
[youtube:tab] Downloading playlist LL - add --no-playlist to download just the video vy2el0kqwLQ
[youtube:tab] LL: Downloading webpage
[youtube:tab] Extracting URL: https://www.youtube.com/playlist?list=LL
[youtube:tab] LL: Downloading webpage
[debug] [youtube:tab] Extracted SAPISID cookie
[youtube:tab] LL: Redownloading playlist API JSON with unavailable videos
[download] Downloading playlist: Beats that move you
[youtube:tab] LL page 1: Downloading API JSON
[youtube:tab] LL page 2: Downloading API JSON
[youtube:tab] LL page 3: Downloading API JSON
[youtube:tab] LL page 4: Downloading API JSON
[youtube:tab] LL page 5: Downloading API JSON
[youtube:tab] LL page 6: Downloading API JSON
[youtube:tab] LL page 7: Downloading API JSON
[youtube:tab] LL page 8: Downloading API JSON
[youtube:tab] LL page 9: Downloading API JSON
[youtube:tab] LL page 10: Downloading API JSON
[youtube:tab] LL page 11: Downloading API JSON
[youtube:tab] LL page 12: Downloading API JSON
[youtube:tab] Playlist Beats that move you: Downloading 182 items of 252
[download] Downloading item 1 of 182
[youtube] Extracting URL: https://www.youtube.com/watch?v=vy2el0kqwLQ
[youtube] vy2el0kqwLQ: Downloading webpage
[debug] [youtube] Extracted SAPISID cookie
[youtube] vy2el0kqwLQ: Downloading ios player API JSON
[youtube] vy2el0kqwLQ: Downloading web creator player API JSON
[debug] [youtube] Extracting signature function js_28fd7348_105
[debug] Loading youtube-sigfuncs.js_28fd7348_105 from cache
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig 9Pp9AaaYE-PEPwcYP => --UiRY3MIVIMMw
[debug] Loading youtube-nsig.28fd7348 from cache
[debug] [youtube] Decrypted nsig 08AH3VuwQn1bCBaNf => tkqNAgsqC4XabA
[youtube] vy2el0kqwLQ: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] vy2el0kqwLQ: Downloading 1 format(s): 141
[debug] Invoking http downloader on "https://rr5---sn-nx57ynsk.googlevideo.com/videoplayback?expire=1723172808&ei=aDO1Zt32Nq32sfIPgK-D8Q8&ip=2601%3A602%3A8f7f%3A4821%3A4126%3A5f49%3Ae557%3Aa9cb&id=o-ANGi_U8khN2qcJ2McBu2nqnD2APsmVWP-3oVgYhXbLO1&itag=141&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=Sv&mm=31%2C26&mn=sn-nx57ynsk%2Csn-vgqsrnzs&ms=au%2Conr&mv=m&mvi=5&pl=38&ctier=A&pfa=5&gcr=us&initcwndbps=1896250&hightc=yes&siu=1&vprv=1&svpuc=1&mime=audio%2Fmp4&rqh=1&gir=yes&clen=7398450&dur=229.804&lmt=1699449581291433&mt=1723150871&fvip=3&keepalive=yes&c=IOS&txp=2318224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cctier%2Cpfa%2Cgcr%2Chightc%2Csiu%2Cvprv%2Csvpuc%2Cmime%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRAIgZWKgE6YMb-VWE977p8d7xxRsif-tn3Qor3D9SkP84JQCIApWZbkijS3_hp50Im4HjosrEC7QYhWCJHQyCXFkpp93&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AGtxev0wRAIgFkgOWysAUA0Vk74J-uO5FayFoLN4admsGxFb3pk4s9oCIFNTUNtT6GwVUGhPW5ylzV4rqNzAUTaP1PZJuEyzFiyT"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: Lone Digger [vy2el0kqwLQ].m4a
[download] 100% of    7.06MiB in 00:00:00 at 29.64MiB/s
[FixupM4a] Correcting container of "Lone Digger [vy2el0kqwLQ].m4a"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i "file:Lone Digger [vy2el0kqwLQ].m4a" -map 0 -dn -ignore_unknown -c copy -f mp4 -movflags +faststart "file:Lone Digger [vy2el0kqwLQ].temp.m4a"
[debug] ffmpeg command line: ffprobe -show_streams "file:Lone Digger [vy2el0kqwLQ].m4a"
[ExtractAudio] Not converting audio Lone Digger [vy2el0kqwLQ].m4a; file is already in target format m4a
hackbackwards commented 1 month ago

Here's a link to the (available) video on youtube.com, which I got from clicking on the "video" tab for the track on music.youtube.com and then removing 'music.' from the url:

https://www.youtube.com/watch?v=UbQgXeY_zi4 (this is the 'video' video)

Edit: the video is also available on music.youtube.com and plays/downloads without issue, individually.

Issue #6351 seems to be for videos that are unavailable on youtube.com, but this video is available on youtube.com.

Also, here's the same track (again) on youtube.com, which I got by just removing 'music.' from the URL for the track music.youtube.com, which leads to an available video, this time without clicking on the "video" tab for the track first:

https://www.youtube.com/watch?v=vy2el0kqwLQ

So it's not that the video is unavailable. But yt-dlp is extracting a URL to a version of the video that is unavailable. I can't find a way to manually get to the same URL yt-dlp is getting - every version of the song I try to access has an available video, and downloads without issue if I provide the direct URL.

Edit2: to cleanup and summarize the above:

Edit3: added this to the issue report for clarity.

battleship9 commented 2 weeks ago

I'm having the exact same issue.

What I found that youtube sometimes changes some of their links (reuploads, title and thumbnail changes probably). However they don't update these links in playlists and this causes video unavailable errors.

It can be somewhat fixed by removing and readding the problematic videos to your playlist.