Looking To Download YT Videos & Tracks From Soundcloud- What's The Best Method(s)?

I don’t think it’s anywhere on the download page, who knows why.

Check your Downloads in Chrome or Firefox or whatever you’re using, it’ll tell you where it saved it.

I managed to find it by checking my recent downloads since I was Brave at the time. I’m not really sure if the tool itself was downloaded to my pc or if it’s piece of software you use for downloading the tracks/audio you want via CMD/Powershell. That’s something I’ll just have to find out on my own as I experiment with the tool itself. Is it easy to use for beginners since I don’t know a lot of CMD/Powershell commands?

Basics:

-F (case sensitive) lists the available qualities

--merge-output-format mp4 -f bestvideo[ext=mp4]+140 downloads a MP4 in the best possible quality.

--restrict-filenames makes sure the filename is safe for other programs

-o "%(title)s.%(ext)s" names your file in a sane way

You will need a static build of FFmpeg in the same folder. https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-github

Use the essentials zip version. Take the binaries out of /bin and copy to whereever you extracted your youtube-dl folder as it’s essential for it to work.

Welp, it’s definitely command-line based. Wouldn’t I just be able to keep the commands simple? Like if I wanted the files I’m after to be downloaded right to my desktop instead of a specific folder? Or say if I wanted to download a particular file (or set of files) & I wanted the bitrate to be say 320kbps? If I can’t take a few shortcuts on this I understand. Just wanting to keep it simple though.

What? I’m not really sure what you’re getting at here…

youtube-dl is the tool you use to download the audio you want, using CMD or PowerShell.

The most basic of basic usage of it is just doing youtube-dl.exe <yourlinkhere>, that will pick the “best” quality for audio and video by default and put it in the same directory where the exe is located.
You can use youtube-dl.exe -F <yourlinkhere> to list all available formats (that are numbered), e.g.:

[tarulia@localhost]~% youtube-dl -F "https://www.youtube.com/watch?v=4lxxjz6-lmM"
[youtube] 4lxxjz6-lmM: Downloading webpage
[info] Available formats for 4lxxjz6-lmM:
format code  extension  resolution note
249          webm       audio only tiny   50k , webm_dash container, opus @ 50k (48000Hz), 1.91MiB
250          webm       audio only tiny   61k , webm_dash container, opus @ 61k (48000Hz), 2.31MiB
251          webm       audio only tiny  115k , webm_dash container, opus @115k (48000Hz), 4.36MiB
140          m4a        audio only tiny  129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 4.88MiB
160          mp4        256x144    144p   69k , mp4_dash container, avc1.4d400c@  69k, 30fps, video only, 2.62MiB
278          webm       256x144    144p   71k , webm_dash container, vp9@  71k, 30fps, video only, 2.69MiB
242          webm       426x240    240p  110k , webm_dash container, vp9@ 110k, 30fps, video only, 4.18MiB
133          mp4        426x240    240p  155k , mp4_dash container, avc1.4d4015@ 155k, 30fps, video only, 5.85MiB
243          webm       640x360    360p  192k , webm_dash container, vp9@ 192k, 30fps, video only, 7.25MiB
134          mp4        640x360    360p  290k , mp4_dash container, avc1.4d401e@ 290k, 30fps, video only, 10.92MiB
244          webm       854x480    480p  308k , webm_dash container, vp9@ 308k, 30fps, video only, 11.61MiB
135          mp4        854x480    480p  513k , mp4_dash container, avc1.4d401f@ 513k, 30fps, video only, 19.34MiB
247          webm       1280x720   720p  590k , webm_dash container, vp9@ 590k, 30fps, video only, 22.24MiB
302          webm       1280x720   720p60  846k , webm_dash container, vp9@ 846k, 60fps, video only, 31.86MiB
136          mp4        1280x720   720p  994k , mp4_dash container, avc1.64001f@ 994k, 30fps, video only, 37.44MiB
298          mp4        1280x720   720p60 1381k , mp4_dash container, avc1.640020@1381k, 60fps, video only, 52.01MiB
303          webm       1920x1080  1080p60 1306k , webm_dash container, vp9@1306k, 60fps, video only, 49.19MiB
299          mp4        1920x1080  1080p60 2653k , mp4_dash container, avc1.64002a@2653k, 60fps, video only, 99.91MiB
308          webm       2560x1440  1440p60 4855k , webm_dash container, vp9@4855k, 60fps, video only, 182.84MiB
315          webm       3840x2160  2160p60 10896k , webm_dash container, vp9@10896k, 60fps, video only, 410.31MiB
18           mp4        640x360    360p  374k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 14.11MiB
22           mp4        1280x720   720p 1122k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best)

(note I’m on Linux, so no .exe there)

To pick a format from that list you need to use the number in the first column. To get an MP4 audio you would use:

[tarulia@localhost]~% youtube-dl "https://www.youtube.com/watch?v=4lxxjz6-lmM" -f 140
[youtube] 4lxxjz6-lmM: Downloading webpage
[download] Destination: L1 Giveaway! TerraMaster TD2 - Thunderbolt w_RAID-4lxxjz6-lmM.m4a
[download] 100% of 4.88MiB in 00:00
[ffmpeg] Correcting container in "L1 Giveaway! TerraMaster TD2 - Thunderbolt w_RAID-4lxxjz6-lmM.m4a"

Obviously there is a lot more you can use for more flexibility, but that is the basic usage.

1 Like

I did notice that the Youtube Video Downloader file itself is still in my downloads folder. Although I’m not entirely sure where it got installed to on my pc. I feel like I’m really getting into the weeds here as I’m not really the best when it comes to command-line types of commands & tasks. A lot of the commands you have used as examples here- I assume the vast majority of them are for Windows except Linux where noted?

Well it doesn’t install itself, and in this case it doesn’t need installation at all.
As long as you have the right MSVC++ version (listed on the download page), you just use it as is.
General hint: “installing” software in Windows is for the most part bullshit and 99% of software doesn’t need an “installation” procedure. All it does it unpack files. In this case the files are already unpacked.

It’s a good place to start. The command line is incredibly powerful when used correctly.

The commands are the same for both, the only difference is the .exe ending, because that’s what the file is called (Linux executables don’t have “file extensions” for the most part, but that’s beside the point).

Also one more thing I overlooked earlier:

You can’t specify the bitrate directly. You get a list of available formats that youtube (or soundcloud) provides, and that’s it.
You can technically transcode to a higher bitrate but there is literally nothing to be gained from this. With the lower bitrate a lot of the acoustic information is already gone, and it won’t be magically brought back with a higher bitrate. In fact it can make the quality worse, even on higher bitrates. So just leave the files as they are.

OK. But I thought it was a common fact that a higher bitrate means the audio is just “higher-quality”. Isn’t that true? If I’m wrong somehow, then feel free to correct me.

No that is true (well, generally speaking, there’s a couple caveats), but what I mean is this:

When you look at the list, the highest bitrate that YouTube provides is format 140 with 129kbit:

140          m4a        audio only tiny  129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 4.88MiB
^                                         ^                                    ^

The way audio encoding works is by deleting information that the ear either cannot hear at all (i.e. certain frequencies), or that is “imperceptable” to most human ears. If you now take this file and re-encode it in a higher bitrate, it won’t restore that deleted information.

Hypothetically speaking:
IF Youtube provided a lossless audio format (e.g. WAV or FLAC or ALAC), you could then transcode this to any bitrate you like, and the higher the bitrate you choose, the higher quality of an encode you will get.
BUT Youtube does not provide any lossless formats (and most youtubers don’t even upload lossless in the first place because they know this), so there is no point in re-encoding anything.

So you’re saying trying to download an audio piece or track at anything higher than 129kbps from Youtube would be pointless hence I should just leave it as is. But about Soundcloud though? :thinking: From what I understand, going with a higher bitrate can be beneficial but only in certain use cases/scenarios.

No I’m saying you cannot download anything above 129kbps (in this case, this varies by video), because YouTube doesn’t provide anything with a higher bitrate in the first place.
What I was saying is that there is no point in re-encoding (converting, whatever you wanna call it) those 129kbps to 320kbps.

I never downloaded anything from Soundcloud but I’m pretty sure the situation is similar. They provide a file at bitrate XYZ and that’s what you’ll have to live with.

Yes, only when you have an uncompressed (or at least lossless) signal to go from, which in this case you don’t.

Ah. I think I understand now. Just out of curiosity, would there be any way for me to check & see how high the bitrate is set to on a Youtube video BEFORE I go downloading it?

Well that’s what the format listing using -F is for. -F doesn’t download anything (well, it downloads part of the website, but no video or audio), it just lists what YouTube has on their servers.

As for the YouTube Website/App… eeeehhhhh well, sort of… ish.

So in theory you can right-click the YouTube-player and click “Stats for Nerds” at the bottom, which will bring up this:

image

There is no direct mention of the bitrate in there, but we can see on the Codec line that it uses Format 303 for the video (VP9 codec), and Format 251 for Audio (Opus codec). Format 251 is the highest available bitrate that YouTube provides for opus audio, but it doesn’t say how much exactly.
Also remember Format number is not the bitrate, it is just an identifier YouTube uses internally.

But the format the player delivers to you depends on the capabilities of your browser/PC, so this will be different depending where you open it (which is the reason for the multitude of formats in the first place).

I got you. Well, since you mentioned earlier that it would be pointless to try & download anything above 129kbps & then convert it, I think I’ll just settle for 129 as it should be plenty fine. I hope I can master getting used to this tool relatively quickly as I’m hoping to make up some lost ground on my project. I’d like to thank you very much for being patient with me, helping me out & answering all of my questions. :slight_smile: I really do appreciate it! :+1:

No, that’s not what I said :wink:
If YouTube provides anything higher then 129 then by all means go for it, it will be higher quality.
What I said is that downloading the highest available bitrate and then converting it to try to make it even higher has no point to it.
So say that hypothetically YouTube provided an audio track with say 180 kbps on a video, of course it makes sense to use that (as it’ll most likely be higher quality).
But taking a 129 kbps or 180 kbps audio track, and re-encoding it to make it 320 has no point to it because the acoustic information that was lost during encoding to the lower bitrate is already gone and it won’t come back.

OK. Sorry if I misinterpreted you. :man_facepalming: If there’s anything offered above 129, then I’ll go for something that has a higher bitrate, but I won’t bother trying to convert a lower bitrate to a higher 1. Makes perfect sense now.

Yes pretty much

OK then. Well, thanks for educating me! :grin:

1 Like

For me I personally use SoundCloud Downloader oneline tool to download SoundCloud tracks. Just like I use Instagram Audio Downloader to download and save insta audio.