1

I generally use VLC and that works fine most of the time but at a recommendation to check out mpv and mpv-based players, I have been trying to see if SMPlayer would also work for my needs. However, I am having problems with getting it to detect external subtitle files located in a subfolder, e.g.

$ cd some-show-s01/
$ tree
.
├── Some.Show.S01E01.mp4
├── Some.Show.S01E02.mp4
├── Some.Show.S01E03.mp4
└── Subs
    ├── Some.Show.S01E01.English-1.srt
    ├── Some.Show.S01E01.English-2.srt
    ├── Some.Show.S01E02.English-1.srt
    ├── Some.Show.S01E02.English-2.srt
    ├── Some.Show.S01E03.English-1.srt
    └── Some.Show.S01E03.English-2.srt

I've also tried it with just a single sub per episode, whose name matches the video file exactly (e.g. ./Subs/Some.Show.S01E01.srt) as well as both variations under a sub-folder named 'Subtitles' instead of 'Subs'. VLC picks up external subs for all four of these scenarios automatically.

Is there any way to get SMPlayer to do the same? If not, are there any other Linux video players besides VLC that support this layout?

I'm on a mix of Fedora 35 / 36 (desktop + laptop) and comfortable compiling from source if necessary (altho converting dependent package names from other distros is sometimes challenging). I am using SMPlayer v22.7.0 (rev 10091).

# dnf list installed smplayer mpv
Installed Packages
mpv.x86_64        0.34.1-2.fc35   @rpmfusion-free-updates
smplayer.x86_64   22.7.0-1.fc35   @rpmfusion-free-updates

edit:

I am able to play the video in mpv itself and have subs load using:

$ cd some-show-s01/
$ mpv --sub-file-paths='Subs' --sub-auto='all' ./Some.Show.S01E02.mp4

However, changing SMPlayer settings, per this discussion, under Preferences->Advanced->MPlayer/mpv Options to add --sub-file-paths='Subs' --sub-auto='all' to the options field and hit Apply, I got the following error message:

/usr/bin/mplayer -noquiet -slave -identify -nofs -sub-fuzziness 1 -nodr -double -nomouseinput -input nodefault-bindings:conf=/dev/null -nokeepaspect -wid 92274705 -monitorpixelaspect 1 -osdlevel 0 -subfont-osd-scale 3 -progbar-align 80 -ass -embeddedfonts -ass-line-spacing 0 -ass-font-scale 1 -noflip-hebrew -ass-styles /home/myuser/.config/smplayer/styles.ass -subcp ISO-8859-1 -alang japanese,jap,jp,english,eng,en -slang english,eng,en -subpos 100 -volume 100 -ss 27 -vf-add screenshot=/home/myuser/Pictures/smplayer_screenshots/shot -noslices -af-add scaletempo -softvol -softvol-max 200 --sub-file-paths='Subs' --sub-auto='all' /home/myuser/Videos/podcasts/some-show-s01/Some.Show.S01E02.mp4

Unknown option on the command line: --sub-file-paths='Subs'

Error parsing option on the command line: --sub-file-paths='Subs'

MPlayer 1.5-11 (C) 2000-2022 MPlayer Team

ID_EXIT=NONE

edit:

Solved. My issue was two-fold: first, I needed to add some parameters to tell the underlying video player that SMPlayer uses to load subtitle files from a folder. second, I had specified parameters for mpv but my SMPlayer had defaulted to MPlayer so I had to change which video player it was calling. Alternately, I could have looked into what parameters would be required to do the same thing in MPlayer (didn't do this so can't confirm if that's possible).

1 Answer 1

1

Explanation

Thanks to Sir_not_sir over on reddit's linuxquestions sub for the hint that got me retrace things and eventually led to a fix. There was still some additional research and trial and error on my part but I did finally get it working.

He had pointed me at http://old-forum.smplayer.info/viewtopic.php?f=2&t=8743 which had been mentioning that SMPlayer can pass args to mpv in its advanced options and suggested --sub-paths=/tmp/subs --sub-auto=all|fuzzy. I had seen this post previously but had assumed was only viable for static paths like /tmp/subs rather than ones relative to the video file. But after reading it again, that led me to more searching and I then found an arch-wiki page which indicated that --sub-paths is "Deprecated, use --sub-file-paths.", with --sub-file-paths being exactly what I had been looking for.

--sub-file-paths=

Specify extra directories to search for subtitles matching the video. Multiple directories can be separated by ":" (";" on Windows). Paths can be relative or absolute. Relative paths are interpreted relative to video file directory. If the file is a URL, only absolute paths and sub configuration subdirectory will be scanned.

Example

Assuming that /path/to/video/video.avi is played and --sub-file-paths=sub:subtitles is specified, mpv searches for subtitle files in these directories:

  • /path/to/video/

  • /path/to/video/sub/

  • /path/to/video/subtitles/

  • the sub configuration subdirectory (usually ~/.config/mpv/sub/)

Complete steps to reproduce are as follows:

  1. Have both SMPlayer and mpv installed. (wasn't my issue but still important). I'm not sure which version of mpv added the option used here. I had v0.34.1 so if you're on a distro with an older version, try seeing if you can upgrade to mpv v0.34.1 or newer.
  2. In SMPlayer: Options -> Preferences -> General -> General tab and select "Multimedia engine" as "mpv" -> Apply button.
  3. In SMPlayer: Options -> Preferences -> Advanced -> "Mplayer/mpv" tab -> under Options field add --sub-file-paths=Subs --sub-auto=all (or whatever you want to call the Subs folder) -> Apply button.
  4. Restart video player.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .