I’ve been using Clipgrab (macOS) to download music (mp3s) from YouTube. I’ve seen some mentions that the quality (real bitrate as opposed to what the file states) is bad to begin with on YouTube and that downloaders might make it worse. How bad is the quality of what I’m downloading? Any better downloaders or does the quality suck to begin with?

5 points
*

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:

  • Encoding by the content creator
  • Extracting the audio from the the content
  • Encoding in the format of choice

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

permalink
report
reply

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>

permalink
report
parent
reply
3 points

But is the source separate on YT’s server is what I’m wondering.

If not, there’s a transcoding stage

permalink
report
parent
reply
2 points
*

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.

permalink
report
parent
reply

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 <url>

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:

~ $ yt-dlp -f bestaudio https://www.youtube.com/watch?v=dQw4w9WgXcQ
[youtube] Extracting URL: https://www.youtube.com/watch?v=dQw4w9WgXcQ
[youtube] dQw4w9WgXcQ: Downloading webpage
[youtube] dQw4w9WgXcQ: Downloading ios player API JSON
[youtube] dQw4w9WgXcQ: Downloading android player API JSON
[youtube] dQw4w9WgXcQ: Downloading m3u8 information
[info] dQw4w9WgXcQ: Downloading 1 format(s): 251
[download] Destination: /data/data/com.termux/files/home/storage/movies/ytdl/20091025__Rick_Astley_-_Never_Gonna_Give_You_Up_Official_Music_Video.webm
[download] 100% of    3.28MiB in 00:00:00 at 6.91MiB/s
permalink
report
parent
reply
2 points

I haven’t seen a YouTube video without a separate audio track. If you use yt-dlp just add -F and the URL to get all available download options/formats. Then use -f and the number of the download option and URL to download the video/audio. Audio on YouTube is available in two formats most of the time: opus and m4a.

permalink
report
parent
reply
4 points

YouTube audio quality isn’t amazing, but it’s not that bad if you get the right format. Using yt-dlp, you can get opus audio that sounds way better than mp3. Example: yt-dlp -f 251 https://www.youtube.com/watch?v=dQw4w9WgXcQ

permalink
report
reply
2 points

Here is an alternative Piped link(s): 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.

permalink
report
parent
reply

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

!piracy@lemmy.dbzer0.com

Create post
⚓ 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):


💰 Please help cover server costs.

Ko-fi Liberapay

Community stats

  • 4.7K

    Monthly active users

  • 3.2K

    Posts

  • 77K

    Comments