📅 April 08, 2021     🕐 3 minutes read

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 Replace youtube-dl With yt-dlp. How To Make MPV Work With yt-dlp

 

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

 


SUPPORT

FSM has no ads or affiliate links. Your support would simply pay for our servers, domain and maintanance. If there's any leftover change, we'll get some coffee and a slice of pizza.

Merch FSM STORE
PayPal  
Monero (XMR) 43GnqUNJrTi9QyL7kEH8vM8pgWGCE6bjv1FSRipeNMM4TTeNnUVsRBb6MfMpQYxtLE7ReonxVVSXz2rFCEdW5H11LC3x73b
Bitcoin (BTC) 1Hfuq77gKKFJeNcq4EP4dQK3yDRWrFEwJR
Bitcoin Cash (BCH) qzmdm6e6q5wf2p6sxz2mst7cenz60newwc5m4e9js8
Ether (ETH) 0x5f02869278C24A6579d3820f52AD15936D6F9d69
Stellar (XLM) GDWT2QU2CI3GZ5XH5DTSU3IUAHZMTB6VQKKRHBYWS5YCCQOAG6OKG2OB
More content?