Has Anyone Ever Had This Issue With Youtube-DL Before?

Well, this is a little bizarre, but I guess expect the unexpected sometimes in life. :man_shrugging:

Anyway, I used the Youtube-DL method to download 1 of the tracks I need for the project I’m working on. Strangely enough, listening to the track on Youtube, it sounds perfectly normal with no audio distortion. However, I tried downloading the track twice, checked both times, & for whatever reason(s), there is a little distortion in some of the highs compared to the version that’s both on Youtube & on Spotify. :thinking: Link to the song: Endless Possibility - YouTube

Now, I’m no audio engineer, nor have I had like any experience with audio software, so I’m not exactly sure what’s going on, but I would like some advice/tips on what I could do. Also, I would very much appreciate it if someone can explain how this happened & why. If you need to ask me anything else or just want more details, you know what to do!

Thanks to anyone who can help.

Does YT DL have flags or options?

Not exactly sure what you mean here. :thinking: Could you clarify? But I ought to mention that I didn’t do it while signed in.

The app you are using, does it have any way to set options ? Is there a manual that would tell you that?

On YT-DL, there’s several options that may be of interest for you. That is, unless you’ve already found them :stuck_out_tongue:

The -F flag: provides an overview of available formats, including audio tracks.

The -f flag, followed by a number, selects which format YT-DL actually downloads for you.

youtube-dl -F https://www.youtube.com/watch?v=AA2v7cli1XM
[youtube] AA2v7cli1XM: Downloading webpage
[info] Available formats for AA2v7cli1XM:
format code extension resolution note
249 webm audio only tiny 49k , webm_dash container, opus @ 49k (48000Hz), 2.71MiB
250 webm audio only tiny 53k , webm_dash container, opus @ 53k (48000Hz), 2.91MiB
251 webm audio only tiny 101k , webm_dash container, opus @101k (48000Hz), 5.55MiB
140 m4a audio only tiny 129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 7.06MiB
160 mp4 256x144 144p 52k , mp4_dash container, avc1.4d400c@ 52k, 30fps, video only, 2.85MiB
278 webm 256x144 144p 73k , webm_dash container, vp9@ 73k, 30fps, video only, 3.98MiB
242 webm 426x240 240p 98k , webm_dash container, vp9@ 98k, 30fps, video only, 5.34MiB
133 mp4 426x240 240p 107k , mp4_dash container, avc1.4d4015@ 107k, 30fps, video only, 5.87MiB
134 mp4 640x360 360p 167k , mp4_dash container, avc1.4d401e@ 167k, 30fps, video only, 9.10MiB
243 webm 640x360 360p 177k , webm_dash container, vp9@ 177k, 30fps, video only, 9.67MiB
244 webm 854x480 480p 291k , webm_dash container, vp9@ 291k, 30fps, video only, 15.90MiB
135 mp4 854x480 480p 324k , mp4_dash container, avc1.4d401f@ 324k, 30fps, video only, 17.67MiB
247 webm 1280x720 720p 588k , webm_dash container, vp9@ 588k, 30fps, video only, 32.07MiB
136 mp4 1280x720 720p 649k , mp4_dash container, avc1.4d401f@ 649k, 30fps, video only, 35.40MiB
302 webm 1280x720 720p60 863k , webm_dash container, vp9@ 863k, 60fps, video only, 47.02MiB
298 mp4 1280x720 720p60 1627k , mp4_dash container, avc1.4d4020@1627k, 60fps, video only, 88.67MiB
303 webm 1920x1080 1080p60 1950k , webm_dash container, vp9@1950k, 60fps, video only, 106.26MiB
299 mp4 1920x1080 1080p60 3212k , mp4_dash container, avc1.64002a@3212k, 60fps, video only, 175.05MiB
308 webm 2560x1440 1440p60 5865k , webm_dash container, vp9@5865k, 60fps, video only, 319.62MiB
315 webm 3840x2160 2160p60 19283k , webm_dash container, vp9@19283k, 60fps, video only, 1.03GiB
18 mp4 640x360 360p 330k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 18.03MiB
22 mp4 1280x720 720p 778k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best)

To select the mp4 option marked as “best”:
youtube-dl -f22 https://www.youtube.com/watch?v=AA2v7cli1XM

HTH!

3 Likes

Hm. I don’t think I was aware of some of these additional “commands/tricks” so to speak. (I’m not really all that great when it comes to command line-based stuff anyway.)

The main command I have been running lately is youtube-dl -x --audio-format mp3 & then the link to whichever track I just want the audio from. A few questions I just thought of though: 1.) The command you provided to me at the bottom- is this supposed to somehow automatically select the best quality before downloading? 2.) Also, if so, what would the command be if I wanted to do this AND just acquire the audio?

1 Like

What I gave you is just an example and should not be used as template! Each video has different options available, this happens to be the latest L1T video. What you need to do is type man youtube-dl in a terminal and read the description of each flag.

Example: if you’d want the 101k audio file, just type:
youtube-dl -f251 https://www.youtube.com/watch?v=AA2v7cli1XM
and it will be downloaded for you.

OK, I sort of know what you’re talking about. But you mentioned a “terminal”. I should make you aware that my OS isn’t Linux; it’s Windows. Also, I’m not sure if this command would be the same since I’m a Windows user or not. But what will the description of each flag reveal to me? Like the quality, bit-rate, etc?

you can also do youtube-dl -f bestaudio https://www.youtube.com/watch?v=AyQymRs_dlE

3 Likes

Yeah, I kinda guessed that. I’m not familiar with the Win-OS version of YT-DL.

But do I have to add anything additional to the command since I just want the audio for the tracks that I’m after? :thinking:

No you get just the audio from that

Well, I remember a post about a similar topic I started a few days ago on the LTT forum. Basically, it IS sort of jank, but it kind of has to be run either via Command Prompt or for that matter, you could even use it via PowerShell, but I’m not aware of the other methods that one would have.

I think there’s a 3rd party GUI somewhere for YT-DL, but no idea if that works on Win-OS.

Cool. Well, thanks for that! :smiley: :+1:

This is exactly the kind of thing I told you in your last thread is a bad idea.

Don’t convert compressed audio into any other compressed audio format, especially mp3.

The distortion you’re hearing are compression artifacts from running a compressed audio signal through another compression. With each compression comes a generation loss (also linked in the previous thread) that eventually presents itself as distorted audio.

Use one of the formats provided. If you don’t know which one would be good for you, just use -f bestaudio and be done with it.

I’m not sure why you are still insisting on mp3 even though it has been said multiple times it’s not a good way to go. There’s literally no reason to go with mp3 for anything anymore these days. Phones support all major competing (and better) formats and if you’re wanting to edit the audio that’s even worse in mp3.
So maybe you could tell us why you want mp3 so badly…

3 Likes

Actually, I don’t specifically remember YOU telling me it’s a bad idea. Also, this method (From what I understand doesn’t “convert” the tracks to MP3; it just strips the visuals out leaving the audio which technically makes it an audio file.) I don’t remember if I mentioned this in any of the similarly previous posts I made on this topic, but the reason I’m going for MP3 is to keep things simple: come up with a track order once I’ve decided & then add the artwork that I’ve found to the finished video project. Think about it- if I just downloaded each YT video as MP4, I would have to remove the visuals/artwork/thumbnail, etc from it which would just be extra hassle. And I’m not even sure if I would do it on a smartphone if I had one. Hope that puts it into perfect context for you. :slight_smile:

Does your video editor not support anything other than .mp3?
If so I would probably change video editor

I’m using the free version of Davinci Resolve for the project. No worries. :slight_smile:

I hate to quote myself, but:

That is a stupid idea

Yes it does.

-x, --extract-audio
              Convert video files to audio-only files (requires ffmpeg/avconv and ffprobe/avprobe)

--audio-format FORMAT
              Specify audio format: "best", "aac", "flac", "mp3", "m4a", "opus", "vorbis", or "wav";  "best"  by  de‐
              fault; No effect without -x

Since YouTube only provides AAC and Opus as a codec, specifying MP3 guarantees another conversion.
You might get away with not having a conversion if youtube-dl is smart enough to not convert again when you specify the same output codec as is its input (e.g. you select an Opus format from YouTube, and also specify -x --audio-format opus), but then what’s the point of specifying it in the first place.

You can do the same with AAC/MP4 or Opus/Ogg. The only difference is the container format. All the major tools will support this.

No you wouldn’t.
MP4 is a container, what is in it is separate of the container.
If you specify one of the Audio only MP4 formats, it will only download the Audio because YouTube already splits audio and video into separate streams, which is why you can get them separately.
You can download only the audio or only the video, both are MP4 files. The difference is what’s in those MP4 files. One only contains audio in AAC, the other only contains video in h.264.

This I already explained in your very first thread on the topic:

To get an MP4 audio you would use

If you scroll through this very same thread, @FurryJackman and I explained the usage of youtube-DL with a bunch of options already.

Not wanting to come off as a dick here but you opened a multitude of threads now for the same basic problem you’re trying to solve and every time people are giving you the same answer because they don’t know it had already been answered.

1 Like