reduce audio quality in mpv

I have very limited data in a remote area and so I listen to youtube (and other video platforms) using mpv --no-video <URL>.
Does anyone know how to lower the audio quality so that I can reduce my streaming
data usage even more? (most of what i listen to is just talk).

I tried adding profile=fast in mpv.conf but mpv didn’t recognize it. I also
searched through man mpv but couldn’t find what I wanted.

I am using Linux Mint 21.2


Using the accepted answer and searching man mpv | grep ytdl, I ended up with:

mpv --no-video --ytdl-format=worstaudio/worst <URL>

This reduced data usage by almost half and as far as a podcast goes, there is little difference in listen-ablity.

Asked By: bungee1980


mpv relies on youtube-dl (yt-dlp) to get the actual stream URLs. Figure out the relevant youtube-dl -f (format) option, then pass it through mpv’s --ytdl-format= (or maybe --ytdl-raw-options=).

After looking at yt-dlp -F <someurl>, the lowest formats YouTube seems to offer these days are 599 and 600, which are AAC and Opus at ~32 kbps. (The Opus stream is 1-2 kbps higher, but I assume the increased quality might be worth it.)

You could specify either the individual formats by ID, or you could do bestaudio[abr<40] to let it automatically select any format which is below the specified bitrate:

Get 600 (Opus ~32k) if available, 599 (AAC ~30k) otherwise:
$ yt-dlp -f "600/599" <url>
$ mpv --ytdl-format="600/599" <url>

Get best format below 40 kbps:
$ yt-dlp -f "bestaudio[abr<40]" <url>
$ mpv --ytdl-format="bestaudio[abr<40]" <url>

Get Opus ~32k if possible, otherwise AAC, otherwise whatever else fits:
$ yt-dlp -f "600/599/bestaudio[abr<40]/bestaudio[abr<100]" <url>
$ mpv --ytdl-format="600/599/bestaudio[abr<40]/bestaudio[abr<100]" <url>
Answered By: u1686_grawity
Categories: Answers Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.