Let’s talk a little about the coolest media player. Before MPV, I loved to use ffplay. It is quite flexible, but requires many options to type. So, I’m tired of typing commands into the terminal. Therefore, I chose MPV because it’s based on ffmpeg libraries with which i am a little familiar. MPV is fast, flexible and intuitively clear. In addition, it has many scripts written in Lua that extend MPV functionality. I already have an article about one of them: Make .mp4, .webm videos with mpv-webm script.
Want to take screenshots with and without subtitles on it? MPV can do it!
Browsing YouTube slows down your browser? Watch YouTube with MPV!
So, let’s start. Assume we have a video file and several subtitle tracks to it. First, where are our subtitles can be located? They can be located inside the container (.mkv, .webm) or externally( as .ass, .srt files).
How To use external subtitles in MPV?
There are several ways. We can specify the subtitle file directly. Or specify subtitles directories. Or even ask MPV to look for us. We can choose a method that is more convenient and more suitable for us.
Method 1. Make MPV look for subtitles in the same directory where the video is (Config way)
First, make sure the subtitles are in the same directory as our video file, for example:
~/Movies/Fist of Fury/Fist of Fury.mp4 ~/Movies/Fist of Fury/Fist of Fury.ass
Then, put this string in your mpv.conf:
If you don’t know where the config is located, you can find it in this article (Where the mpv.conf is located Windows and Linux).
So, now with each launch, MPV will recognize all subtitles that are in the directory along with the movie.
Method 2. The same, but without editing the config (Terminal way)
We can also do it without config editing:
mpv --sub-auto=all ~/Movies/Fist\ of\ Fury/Fist\ of\ Fury.mp4
Our subtitles (~/Movies/Fist of Fury/Fist of Fury.ass) will be applied to the video automatically.
Method 3. Specify the subtitle directory (Terminal way)
If our subtitles are located elsewhere, we can specify the subtitle directory directly:
mpv --sub-file-paths="~/Subtitle Directory/" --sub-auto=all ~/Movies/Fist\ of\ Fury/Fist\ of\ Fury.mp4
Method 4. Specify the subtitle directory (Config way)
We can also specify it in the config, so the setting will be used constantly. You can even add several directories. Use colon ( : ) as separator on Linux and semicolon ( ; ) on Windows. In the example below, we specify two directories
sub-file-paths="~/First Directory:~/Second Directory" sub-auto=all
Method 5. Specify subtitle files directly
Use –sub-files option for that. Use colon ( : ) as separator for subtitle files on Linux, and semicolon ( ; ) on Windows.
mpv --sub-files="~/Directory/subtitles1.srt:~/Directory/subtitles2.ass" movie.mp4
How To switch between subtitle tracks in MPV?
To do it, use these keys:
- Press j to switch to the next subtitle track
- Press Shift + j to switch to the previous subtitle track
How To move subtitles in MPV?
To do it, use these hotkeys:
- Press r to raise it up
- Press t to lower it down
How To increase and decrease subtitles delay?
- Press z to increase subtitles delay
- Press x to decrease subtitles delay
So, that’s main about subtitles in MPV.