6
Clipgrab w/YouTube: How bad is the audio quality?
(lemmy.world)
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
📜 c/Piracy Wiki (Community Edition):
💰 Please help cover server costs.
Ko-fi | Liberapay |
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>
But is the source separate on YT's server is what I'm wondering.
If not, there's a transcoding stage
From my use of this, it downloads a video and extracts the audio stream from it. In fact, you can see this as it leaves the video file on disk while it's extracting the audio, and the audio-extraction process uses a decent amount of cpu (takes a few minutes for long concert sets on my raspberry pi). AFAICT, there's no way to only download the audio without incurring the unnecessary bandwidth and CPU usage.
Edit: I just checked and the CPU usage seems to be coming from the fact that I am asking yt-dlp to convert the audio format. Now I'm questioning whether it is actually the video that I've seen temporarily on disk or just the audio file in the youtube-native format.
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"
.Here is an alternative Piped link(s): https://piped.video/watch?v=dQw4w9WgXcQ
https://piped.video/watch?v=dQw4w9WgXcQ
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I'm open-source, check me out at GitHub.