MPV + youtube-dl: Stop Wasting Resources

Force 1080p video playback in mpv+youtube-dl

When it comes to YouTube, my biggest pet peeve is youtubers publishing their videos in 4K/8K. Not the annoying ads, or even Google collecting as much data as possible about me. I already took care of that, to the best of my abilities, a long time ago ( here, here, here and here ).

If you’re watching your videos exclusively on a nice 4K/8K TV, or a beefy desktop with a  4K/8K monitor, just skip this article. It’s not for you.

But if you’re watching your videos on an older computer or a laptop keep reading…

ALSO READ :

1. Replace youtube-dl With yt-dlp. How To Make MPV Work With yt-dlp
2. FOSS Front-Ends and Alternatives for Twitter, Instagram, Reddit, YouTube, TikTok and more…

 

I won’t bore you with reasons why I don’t think most youtubers should publish their videos in 4K/8K. At least not right now.  Short answer, it makes no difference if (most) videos are in 4K or 1080p. A review, podcast, (travel) vlog etc, is not cinema.

You might not agree with, and that’s perfectly fine. But think of the wasted resources. Think of the stress you put on your CPU which results in higher power conspumption and shorter life.

Even if you have a new(er) laptop with a 4K screen. So what? You set the screen brightness to  40%-60% anyway because it’s either too bright or to save battery life. And let’s be honest… 4K video on a 13″ or even 15″? Get real…

Anyway, back to wasted resources. Let’s take a random 8K video. And play it with MPV player. CPU and RAM usage goes through the roof.

 

Now let’s play the same video, but this time forcing the playback to 1080p…

 

You can do that by setting profiles in your mpv.conf, which should be in ~/.config/mpv/ ( both Linux and macOS. Sorry, I have no idea where it’s located on Windows ).

NOTE: if the there’s no mpv folder  or mpv.conf file in your ~/.config/ you can  create them manually.

All you have to do is open mpv.conf with your favorite text editor and add :

[1080p]
ytdl-format=bestvideo[height<=?1080]+bestaudio/best

[720p]
ytdl-format=bestvideo[height<=?720]+bestaudio/best

[480p]
ytdl-format=bestvideo[height<=?480]+bestaudio/best

[360p]
ytdl-format=bestvideo[height<=?360]+bestaudio/best
                                                          

NOTE: you don’t need to set all the profiles above. If you only need 1080p, copy-paste the 1080p profile and save.

Now when you want to play a video, all you have to do is copy the yotube link and in the terminal type mpv --profile=1080p youtube-link

 

To make things even easier, you can alias mpv --profile=1080p to mpv