Software & AppsOperating SystemLinux

How To make MPV player automatically pick up any available subtitles in the folder

Ubuntu 18

In this article, we’ll delve into how to configure the MPV player to automatically pick up any available subtitles in the same folder as your video file. This can be a real time-saver, especially if you frequently watch videos with subtitles.

Quick Answer

To make MPV player automatically pick up any available subtitles in the folder, you can modify the mpv.conf file by adding the sub-auto=all option. This will tell MPV to automatically load all subtitle files found in the same directory as the video file. Alternatively, you can use the --sub-auto option in the terminal or use a frontend like SMPlayer to configure subtitle settings.

What is MPV Player?

MPV is a free and open-source media player that supports a wide range of video formats and codecs. It is known for its high-quality video playback and versatility, with a multitude of configuration options for users to customize their viewing experience.

Configuring MPV Player to Automatically Load Subtitles

To make MPV player automatically load subtitles, we need to modify the mpv.conf file. This file is typically located in the ~/.config/mpv directory, or in some cases, the .config/mpv/mpv.conf directory.

Modifying the mpv.conf file

  1. Open the mpv.conf file: Use your preferred text editor to open the mpv.conf file. If you’re comfortable with the terminal, you can use a command like nano ~/.config/mpv/mpv.conf to open the file.
  2. Add the sub-auto option: In the mpv.conf file, add the following line: sub-auto=all. The sub-auto option controls the mechanism for loading subtitle tracks. The all parameter tells MPV to automatically load all subtitle files found in the same directory as the video file.
  3. Save and close the file: Save the changes and close the file. If you’re using the nano editor, you can do this by pressing Ctrl+X, then Y to confirm saving the changes, and finally Enter to close the editor.
  4. Restart MPV: Restart the MPV player for the changes to take effect.

Using the –sub-auto option in the terminal

If you prefer to run MPV from the terminal, you can use the --sub-auto option directly in the command line. The command would look like this: mpv --sub-auto=all [name of your video file]. Replace [name of your video file] with the name of your video file, including its extension.

Using a frontend like SMPlayer

If you prefer a graphical interface, you can use a frontend like SMPlayer. SMPlayer uses MPV as its default media player and allows you to easily configure subtitle settings.

  1. Install SMPlayer: You can install SMPlayer using the command sudo apt-get install smplayer.
  2. Configure subtitle settings: Open SMPlayer and go to the “Subtitles” menu. Here, select the option to load subtitles from the same folder as the video file.

Manually specifying the subtitle file

If you want to manually specify the subtitle file to load, you can use the --sub-file option in the terminal. The command would look like this: mpv --sub-file=[path to subtitle file] [name of your video file]. Replace [path to subtitle file] with the absolute path to your subtitle file.

Conclusion

In this article, we’ve covered several ways to make the MPV player automatically load subtitles from the same folder as your video file. Whether you prefer to modify the mpv.conf file, use command-line options, or use a frontend like SMPlayer, you now have the knowledge to customize your MPV player to suit your subtitle needs. Happy viewing!

Where can I find the `mpv.conf` file?

The mpv.conf file is typically located in the ~/.config/mpv directory. However, in some cases, it may be found in the .config/mpv/mpv.conf directory.

What is the purpose of the `sub-auto` option?

The sub-auto option in the mpv.conf file controls the mechanism for loading subtitle tracks. By setting it to all, MPV will automatically load all subtitle files found in the same directory as the video file.

How do I add the `sub-auto` option to the `mpv.conf` file?

To add the sub-auto option, open the mpv.conf file in a text editor and add the line sub-auto=all. Save the changes and restart MPV for them to take effect.

Can I use the `–sub-auto` option directly in the terminal?

Yes, you can use the --sub-auto option directly in the terminal. The command would look like this: mpv --sub-auto=all [name of your video file]. Replace [name of your video file] with the name of your video file, including its extension.

How can I configure subtitle settings using SMPlayer?

To configure subtitle settings using SMPlayer, open SMPlayer and go to the "Subtitles" menu. From there, select the option to load subtitles from the same folder as the video file.

How can I manually specify the subtitle file to load?

If you want to manually specify the subtitle file to load, you can use the --sub-file option in the terminal. The command would look like this: mpv --sub-file=[path to subtitle file] [name of your video file]. Replace [path to subtitle file] with the absolute path to your subtitle file.

Leave a Comment

Your email address will not be published. Required fields are marked *