How to download only the audio in MP3 format using yt-dlp

Last update: 01/07/2026

YT-DLP is a powerful tool for downloading videos from YouTube and other platforms. But what if you only want to download the MP3 audio from a video using YT-DLP? It's also possible, and we'll explain how in this post. How to do it on Windows, macOS, and Linux.

How to download only the audio in MP3 format with YT-DLP: A complete and definitive guide

How to download only the audio in MP3 format using yt-dlp

Downloading music isn't as common now; it used to be, but it's still a An efficient solution when you're offlineYou might want to create a local music archive, save a track from a lost video online, or save a podcast to listen to later. Whatever the reason, the tool is the same: yt-dlp.

In case you didn't know, yt-dlp is a modified version of the classic youtube-dl Improved, optimized, and maintained by an active community. This program allows you to Download videos from YouTube and other platforms in M4A or Opus formats quickly, safely and for freeIt has no graphical interface, but runs from the command line, yet its power and flexibility are unrivaled.

First step: Download FFmpeg

Now, what if you don't want the video file, but only the MP3 audio using yt-dlp? That's also possible, but You need to download an additional plugin, the FFmpeg fileOn its own, yt-dlp doesn't know how to convert video files to audio, in this case, to MP3. It needs support from FFmpeg.

And how can you install FFmpeg on your system? It's very easy to do from the command line on any of the three: Windows, macOS, and Linux. If you use Windows, you can use the Winget utilityOpen PowerShell, type winget install ffmpeg and press Enter. (See the topic How to use Winget to automatically install and update programs in Windows).

Exclusive content - Click Here  How to reduce the size of a photo on a Mac

macOS and Linux users are more accustomed to using the terminal to run commands. macOS, Open the terminal and use Homebrew by running: brew install ffmpegAnd for Linux, run the classic command sudo apt update && sudo apt install ffmpegOnce you have yt-dlp and FFmpeg ready, you can start downloading only the MP3 audio with yt-dlp.

Step 2: The basic command to extract MP3

Let's get straight to the point and see how to download only the audio in MP3 format using yt-dlp. If you're only looking for an MP3 file in decent quality, open your terminal or command prompt and run the following command: yt-dlp -x –audio-format mp3 «URL_DEL_VIDEO»Naturally, you need to copy the YouTube video URL and paste it after mp3 formatWhat does each element of this command mean?

  • yt-dlp: invokes the program responsible for downloading.
  • -x: It means –extract-audio and tells the software to discard the video stream and keep only the audio stream.
  • –audio-format mp3: This specifies that, after extraction, FFmpeg should be used to package the result into a file with the .mp3 extension.
  • «VIDEO_URL»The link to the video in question. It is recommended to use quotation marks to avoid conflicts with special characters in the terminal.

Step 3: Ensuring the highest MP3 quality at 320 kbps

Up to this point, you already know how to download only the audio in MP3 format using yt-dlp. The basic command does a good job, but the automatic conversion might deliver a lower bitrate than you want. Therefore, and for to ensure sound fidelityIt is advisable to demand the highest quality that the MP3 format allows from yt-dlp: 320 kbps.

Exclusive content - Click Here  How do I get the full version of Greenshot?

To achieve this, you only need to Add the following parameter to the basic command: –audio-qualityThe full text would be: yt-dlp -x –audio-format mp3 –audio quality 0 «URL_DEL_VIDEO»The value 0 represents the best possible quality on the compression scale of encoders like LAME. If you prefer, you can directly replace it with the bitrate value, i.e., 320K.

However, keep in mind that if The original video is of poor quality. (For example, 128 kbps), forcing the conversion to 320 kbps won't accomplish much. The resulting file won't sound like a studio recording. It will simply create a larger file with the highest possible quality.

Advanced tricks to download only the audio in MP3 format with yt-dlp

As we mentioned, yt-dlp is a flexible and powerful tool for downloading videos and audio. This is because you can include more modifiers to the main command to get even more specific results. Let's look at some examples and how they can save you hours of manual editing later.

Let's say you want the MP3 file display the video thumbnail as the cover on your mobile or car stereo. To achieve this, simply add the argument `--embed-thumbnail`. The complete command would then look like this: yt-dlp -x –audio-format mp3 –embed-thumbnail «URL_DEL_VIDEO"

Exclusive content - Click Here  How to do color grading in CapCut

Besides downloading just the MP3 audio with yt-dlp, you can also add metadata to tracks automatically. This will ensure the resulting file includes the correct ID3 tags: title, artist, year if available on the platform. The modifier for this is `--embed-metadata`. yt-dlp -x –audio-format mp3 –embed-metadata «URL_DEL_VIDEO».

Another trick: download only a fragment of audioImagine the video is two hours long, but you only need the audio from 05:00 to 10:00. Well, you don't need to download the entire file. Thanks to FFmpeg integration, you can pass time arguments using a command like this: yt-dlp -x –audio-format mp3 –download-sections «*00:05:00-00:10:00» «URL_DEL_VIDEO».

And what if you want save the MP3 files in a specific folderYou can specify it with the -o modifier like this: yt-dlp -x –audio-format mp3 -o «~/Music/%(title)s.%(ext)s» «URL_DEL_VIDEO». The argument %(title)s He puts the video title, and %(ext)s The MP3 extension. This is very useful for keeping your music library organized.

Download only the audio in MP3 format with yt-dlp: easy, fast and secure

download playlists on Spotify

There's no doubt about it: yt-dlp is an incredibly versatile tool that goes far beyond simply downloading. If you learn how to use it, you'll also be able to control the quality, storage, and appearance of your files.

Download only the audio in MP3 format with yt-dlp It's much easier, safer, and faster than using download sites. Full of ads and risks. If you usually download music to listen to offline, yt-dlp is the best alternative available.