VistaLover Posted Friday at 05:30 PM Posted Friday at 05:30 PM On 7/12/2025 at 8:53 AM, nicolaasjan said: BTW, I've made a significant change to `./youtube_dl/utils.py`, as I suggested here. Youtube-dl actually works now. Quote https://github.com/ytdl-org/youtube-dl/issues/33142#issuecomment-3008909618 ... And now yt-dlp have updated their random UA string to report Chrome 132-138: https://github.com/yt-dlp/yt-dlp/commit/c59ad2b066bbccd3cc4eed580842f961bce7dd4a#diff-b6d91e8afdfc47fb2b59e37d22d3621b79d252bc5a8205edc2b80530dcceecc2 1
nicolaasjan Posted yesterday at 05:42 AM Posted yesterday at 05:42 AM 11 hours ago, VistaLover said: ... And now yt-dlp have updated their random UA string to report Chrome 132-138: https://github.com/yt-dlp/yt-dlp/commit/c59ad2b066bbccd3cc4eed580842f961bce7dd4a#diff-b6d91e8afdfc47fb2b59e37d22d3621b79d252bc5a8205edc2b80530dcceecc2 Yes, I saw that. However, their new code snippet used in that commit didn't play well with Python 3.4.4... Maybe I can implement it like: def random_user_agent(): _USER_AGENT_TPL = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36' _CHROME_VERSIONS = ( '132.0.0.0', '133.0.0.0', '134.0.0.0', '135.0.0.0', '136.0.0.0', '137.0.0.0', '138.0.0.0', ) return _USER_AGENT_TPL % random.choice(_CHROME_VERSIONS) 🤔 1
j7n Posted yesterday at 12:20 PM Author Posted yesterday at 12:20 PM The issue with the "experiment" and formats being randomly unavailable has gone away. For the time being, I can reliably download all videos. Is there an upstream issue tracker than I could post to (about something else), given that I use this modified build?
nicolaasjan Posted 21 hours ago Posted 21 hours ago 1 hour ago, j7n said: Is there an upstream issue tracker than I could post to (about something else), given that I use this modified build? Given that the yt-dlp issue tracker will only accept issues accompanied with a verbose log from their own release builds, I'm afraid any issues experienced with my build cannot be discussed there. Also, any issues with my fork will mostly also happen with the upstream build. So, first search their issue tracker to see if someone has experienced something similar. If nothing is found, then perhaps ask right here? Or, like another forum member had done, PM me. He had an issue with some Polish site and I was able to reproduce it with the official yt-dlp build. Then I opened an issue there and it was solved. 1
j7n Posted 21 hours ago Author Posted 21 hours ago I would just like the file extension changed for downloads of Opus audio, from webm to mka or weba, so that media players pick it up as an audio stream when the video is played.
nicolaasjan Posted 19 hours ago Posted 19 hours ago 1 hour ago, j7n said: I would just like the file extension changed for downloads of Opus audio, from webm to mka or weba, so that media players pick it up as an audio stream when the video is played. Audio only files? You can do it with a batch file from within the directory where you have the webm audio files (save as e.g. webm2mka.bat): @echo off for %%i in (*.webm) do ( ffmpeg -i "%%i" -c:a copy "%%~ni.mka" ) echo Conversion complete! pause Or directly while downloading with yt-dlp (see Post-Processing Options): yt-dlp -f 251 --remux-video mka https://www.youtube.com/watch?v=PD-MdiUm1_Y Removing cache dir C:\Documents and Settings\Nico/.cache\yt-dlp ... [youtube] Extracting URL: https://www.youtube.com/watch?v=PD-MdiUm1_Y [youtube] PD-MdiUm1_Y: Downloading webpage [youtube] PD-MdiUm1_Y: Downloading tv client config [youtube] PD-MdiUm1_Y: Downloading player a1f2424c-main [youtube] PD-MdiUm1_Y: Downloading tv player API JSON [youtube] PD-MdiUm1_Y: Downloading ios player API JSON [youtube] PD-MdiUm1_Y: Downloading m3u8 information [SponsorBlock] Fetching SponsorBlock segments [SponsorBlock] No matching segments were found in the SponsorBlock database [info] PD-MdiUm1_Y: Downloading 1 format(s): 251 [info] Downloading video thumbnail 41 ... [info] Writing video thumbnail 41 to: C:\Documents and Settings\Nico\Desktop\Led Zeppelin - Kashmir (Live from Celebration Day) [Official Video].webp [ThumbnailsConvertor] Converting thumbnail "C:\Documents and Settings\Nico\Desktop\Led Zeppelin - Kashmir (Live from Celebration Day) [Official Video].webp" to jpg Deleting original file C:\Documents and Settings\Nico\Desktop\Led Zeppelin - Kashmir (Live from Celebration Day) [Official Video].webp (pass -k to keep) [download] Destination: C:\Documents and Settings\Nico\Desktop\Led Zeppelin - Kashmir (Live from Celebration Day) [Official Video].webm [download] 0.0% of 8.09MiB at Unknown B/s ETA Unknown[download] 0.0% of 8.09MiB at Unknown B/s ETA Unknown[download] 0.1% of 8.09MiB at Unknown B/s ETA Unknown[download] 0.2% of 8.09MiB at Unknown B/s ETA Unknown[download] 0.4% of 8.09MiB at Unknown B/s ETA Unknown[download] 0.8% of 8.09MiB at 6.14MiB/s ETA 00:01 [download] 1.5% of 8.09MiB at 4.13MiB/s ETA 00:01[download] 3.1% of 8.09MiB at 4.97MiB/s ETA 00:01[download] 6.2% of 8.09MiB at 8.31MiB/s ETA 00:00[download] 12.4% of 8.09MiB at 11.08MiB/s ETA 00:00[download] 24.7% of 8.09MiB at 16.63MiB/s ETA 00:00[download] 49.4% of 8.09MiB at 22.18MiB/s ETA 00:00[download] 98.9% of 8.09MiB at 27.54MiB/s ETA 00:00[download] 100.0% of 8.09MiB at 27.85MiB/s ETA 00:00[download] 100% of 8.09MiB in 00:00:00 at 20.71MiB/s [VideoRemuxer] Remuxing video from webm to mka; Destination: C:\Documents and Settings\Nico\Desktop\Led Zeppelin - Kashmir (Live from Celebration Day) [Official Video].mka Deleting original file C:\Documents and Settings\Nico\Desktop\Led Zeppelin - Kashmir (Live from Celebration Day) [Official Video].webm (pass -k to keep) [ModifyChapters] SponsorBlock information is unavailable [Metadata] Adding metadata to "C:\Documents and Settings\Nico\Desktop\Led Zeppelin - Kashmir (Live from Celebration Day) [Official Video].mka" [EmbedThumbnail] ffmpeg: Adding thumbnail to "C:\Documents and Settings\Nico\Desktop\Led Zeppelin - Kashmir (Live from Celebration Day) [Official Video].mka" 1
j7n Posted 18 hours ago Author Posted 18 hours ago I do rename them as I download them before watching, or or a few at a time. --remux-video invokes ffmpeg and remuxes to a video-only file without sound. Rather I want the audio track kept as-is but named such that it can be used. If I get AAC audio it is named m4a and the video is mp4. Opus audio should work the same. (Not all videos give AAC audio.)
nicolaasjan Posted 18 hours ago Posted 18 hours ago 23 minutes ago, j7n said: I do rename them as I download them before watching, or or a few at a time. --remux-video invokes ffmpeg and remuxes to a video-only file without sound. Rather I want the audio track kept as-is but named such that it can be used. If I get AAC audio it is named m4a and the video is mp4. Opus audio should work the same. (Not all videos give AAC audio.) I think I misunderstood. Can you play them when using `--remux-video mkv` ?
K4sum1 Posted 17 hours ago Posted 17 hours ago (edited) 3 hours ago, j7n said: I would just like the file extension changed for downloads of Opus audio, from webm to mka or weba, so that media players pick it up as an audio stream when the video is played. When the highest quality version of a song I can get is a YT Opus rip, I use mkvextract from MKVToolNix to turn it into a ,opus file that I then can apply metadata to and is recognized as an audio file. The command I use is mkvextract "(source).webm" tracks 0:"(output).opus" Edited 17 hours ago by K4sum1
j7n Posted 9 hours ago Author Posted 9 hours ago I currently use this command line in New Moon. Some of it is redundant. I ask multiple audio formats to automatically pick the best choice. Usually h.264/1080p/AAC. But sometimes it is opus. yt-dlp.exe -f 299/137/298/136/22/bestvideo,140/bestaudio[language=en]/bestaudio --fixup never --restrict-filenames --no-check-certificate --hls-prefer-native -o "t:\working\%(title)s- %(id)s .%(ext)s" This produces 2 files for each publication. One audio, one video. I skip calling ffmpeg because I can watch them without it. If I click an MP4 to open in MPC-HC, I can hear the sound. But if I click on "high-end router," I do not, because "webm" is not an audio extension unlike "m4a". When a Matroska file contains only an audio track, the extension should be mka/weba.
nicolaasjan Posted 7 hours ago Posted 7 hours ago 10 hours ago, K4sum1 said: When the highest quality version of a song I can get is a YT Opus rip, I use mkvextract from MKVToolNix to turn it into a ,opus file that I then can apply metadata to and is recognized as an audio file. The command I use is mkvextract "(source).webm" tracks 0:"(output).opus" If you specifically want opus, yt-dlp can do that for you? 🤔 Try this: yt-dlp -x -f bestaudio[ext=webm] --embed-metadata --embed-thumbnail https://www.youtube.com/watch?v=PD-MdiUm1_Y ( `-x` will extract the opus audio)
nicolaasjan Posted 6 hours ago Posted 6 hours ago @j7n When you don't want the webm, you can tell yt-dlp to skip it: `bestaudio[language=en][ext!=webm]`
nicolaasjan Posted 6 hours ago Posted 6 hours ago (edited) Bad news ☹️ : yt-dlp starts preparations to remove Python 3.9 support (October 2025): https://github.com/yt-dlp/yt-dlp/pull/13861 https://github.com/yt-dlp/yt-dlp/issues/13858 Edited 5 hours ago by nicolaasjan
Mark-XP Posted 2 hours ago Posted 2 hours ago 3 hours ago, nicolaasjan said: Bad news ☹️ : yt-dlp starts preparations to remove Python 3.9 support (October 2025): https://github.com/yt-dlp/yt-dlp/pull/13861 https://github.com/yt-dlp/yt-dlp/issues/13858 Well, we've been cautioned betimes : https://msfn.org/board/topic/184368-who-here-has-a-youtube-dl-compile-for-winxp/page/14/#findComment-1277080
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now