this post was submitted on 09 Jul 2023
6 points (80.0% liked)
Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ
62420 readers
280 users here now
⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.
Rules • Full Version
1. Posts must be related to the discussion of digital piracy
2. Don't request invites, trade, sell, or self-promote
3. Don't request or link to specific pirated titles, including DMs
4. Don't submit low-quality posts, be entitled, or harass others
Loot, Pillage, & Plunder
📜 c/Piracy Wiki (Community Edition):
🏴☠️ Other communities
FUCK ADOBE!
Torrenting/P2P:
Gaming:
💰 Please help cover server costs.
![]() |
![]() |
---|---|
Ko-fi | Liberapay |
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Please somebody correct me if I'm wrong:
Separate audio is rarely available on streaming sites like YouTube, so if you're ripping a song from it, you essentially are transcoding the files three times:
So no matter how great the quality is at either of these transcoding ends, you are still transcoding in lossy format at least two times
yt-dlp can just download the audio. It usually comes down in m4a at quality that I would describe as "very listenable". So only the first of those three steps are mandatory if you do it that way.
yt-dlp -x <url>
It varies based on the age of the video, newer ones do indeed have separate audio downloads. You can force audio only with
yt-dlp -f bestaudio
This will cause the script to only consider audio-only formats, if bandwidth is a concern. However, how it decides which one is "best" is beyond me. For example, I tried one video and got a webm that contains only an audio track:
Yes, I deleted my comment after I checked the command line I was using and testing it out. The CPU usage was because I was using the
--audio-format
flag with something other than m4a/opus or whatever it is that youtube uses natively. And the file I saw on disk was not the video, it was the audio file in youtube's native format.For reference, I'm using
$ytdl -f "bestaudio/best" -ciw -o "$audioroot/%(title)s (%(upload_date>%Y-%m-%d)s).%(ext)s" --extract-audio --audio-quality 0 --audio-format mp3 "$vidurl"
.