Skip to main content

How to Customizing MPV player in chromebook

MPV player is one of the most widely used media players used on Windows, Linux and macOS. It is an extremely lightweight player, and you have to customize it according to your need. We have already discussed the differences between the VLC media player and an MPV player, so if you are not into customizations and just need to have a video player that “just works,” then the MPV player might not be for you. 


Customizing MPV player

Now, let’s start customizing, open your terminal and type the following command to clone scripts from GitHub :

1
git clone https://github.com/maoiscat/mpv-osc-modern

You can use any theme listed on this page.

Now, let’s create a directory which will store all of our scripts and will be utilized by MPV :

1
mkdir ~/.config/mpv/scripts

Now, from the cloned directory, let’s move the Lua scripts into our newly created directory. Type :

1
mv mpv-osc-modern/modern.lua ~/.config/mpv/scripts

Create another directory which will host the font required by this script :

1
mkdir ~/.config/mpv/fonts

Again, move the font in this directory by typing :

1
mv mpv-osc-modern/Material-Design-Iconic-Font.ttf ~/.config/mpv/fonts

Well, that’s it, open any file now to check what mp looks like now :

MPV Player New Interface


I’ve also added other scripts such as file-browserautoload, and cover-art. You can add them using the above method.

There are many more scripts listed on this page, so you can install any of them that suits your needs.

Now, This part is optional, but I have also changed the key bindings of various actions, you can also do this by creating a file named input.conf using your favourite text editor, type :

For nano users
nano ~/.config/mpv/input.conf

Press ‘I’ to get into insert mode if you are using vim. My config file looks something like this :

Custom Key bindings For MPV Player


The above configuration does the following :

UP add volume 3 DOWN add volume -3 WHEEL_UP add volume 3 WHEEL_DOWN add volume -3

or

  • ‘The up arrow key’ increase the volume by 5 units
  • ‘Down arrow key’ decreases by 5 units
  • ‘Mouse/Touchpad scroll up’ increases the volume
  • ‘Mouse/Touchpad Scroll down’ decreases the volume
  • ‘Swiping left on touchpad’ goes 5 seconds back
  • ‘Swiping right on touchpad’ goes 5 seconds forward
  • ‘n’ Key will play the next media in the playlist
  • ‘p’ key will play the previous file in the playlist

If you are using vim, then press the Escape key and type :wq to save and exit. If you are using nano editor, then press Ctrl+O and Ctrl+X to save and exit.

You should also edit the mpv.conf file to suit your needs, open it in either vim or nano using :


 nano ~/.config/mpv/mpv.conf

Add the following lines :

1
2
3
4
5
6
7
8
9
10
11
12
13
save-position-on-quit=yes
# The default volume of mpv when you open it
volume=90
blend-subtitles=yes
screenshot-directory=~/Pictures/Screenshots
screenshot-format=png
osc=no
# You should read about Hardware acceleration on mpv to choose your correct settings
hwdec=vaapi
# Display English Subtitles if available
slang=en
# Defalt audio language
alang=en

Press Ctrl+O and Ctrl+X to save and exit if you are using nano and press the Escape key and then type :wq to save and exit out of vim editor.

Enable the ‘autoload’ script by adding a file named autoload.conf file in the script-opts directory :


nano ~/.config/mpv/script-opts/autoload.conf

Add the following lines :

1
2
3
4
5
disabled=no
images=yes
videos=yes
audio=yes
ignore_hidden=yes

Again, save and exit out of your editor.

If you have enabled the file-browser script, then you can access the file browser from the terminal by pressing Ctrl+O key, and navigating between the directories using the arrow keys on your keyboard.

Comments

Popular posts from this blog

How To Disable Laptop Keyboard Permanently

  Solution 1 – Disable the Laptop keyboard using gpedit This method will permanently disable the laptop keyboard. But, before you do so you will need these things- Requirements ~ a. At first, detach the external keyboard device with the computer. Step 1:  Press the  Windows key + X  together on your keyboard and select  Device Manager  from the context menu.     Step 2:  In the  Device Manager  window, scroll down and expand  Keyboards . Under this, right-click on the  Standard PS/2 Keyboard  and click on   Uninstall Device .     Step 3:  Now, your keyboard is disabled until you restart your laptop. Once it starts again, it will automatically be reinstalled. To disable it permanently, you have to disable the auto driver reinstall feature in windows 10, although not recommended as it enables auto driver updates with time. STEP – 1 Disable particular policy  Disabling a particular policy ca...

What Motherboard Do I Have? (How to Tell Quickly)

  If you need to check what motherboard you have, but you’re unsure of how to do so, in this guide, we’ve listed a few different methods to help you figure out what motherboard is in your computer. F or the most part, checking your computer’s specs is a fairly straightforward process. Finding out what processor or graphics card you have or how much memory is in your system can be accomplished in a few easy clicks. However, figuring out what motherboard you have is a bit more difficult. Fortunately, it is still fairly easy to figure out what kind of motherboard is in your computer and, in this post, we’ve provided multiple ways you can do so—each with step-by-step directions. Method 1: Use A Command Prompt If you’re comfortable running command prompts, this method is probably going to be your best bet to find out your motherboard’s information. AD To find out what motherboard you have, follow these steps: 1. In the Windows search bar, type in ‘cmd’ and hit enter. 2. In Com...

Future Of The Software Development Proggrame

  Future Of The Software Development Proggrame A lot is going on in the future of software development right now. There are already some modern trends being used by software growth teams. There have been a lot of changes in software development over the last few decades. Each company is a software company that will take the next ten years to make 10x the changes. In other words, the future of software evolution has already come to pass. It’s now being used in research labs. As time goes on, it will be everywhere. With the rise of Big Data, AI, and ML, job opportunities in the Software Development/Engineering field increased. People who are good at programming and know how to use cutting-edge technologies like AI and ML are highly demanded. These technologies are becoming more common in all industries, from marketing to healthcare to IT. AL and ML technology, on the other hand, encourages automation, but software professionals will always be the last thing needed to develop and impr...