How to change font family, font size, or even font color for subtitles in Celluloid? There are no relevant options in the settings (Preferences) like in VLC or Totem.
1 Answer
Celluloid has no point-and-click option in the settings to change the styling of subtitles (as of yet, maybe), but since it is a frontend for mpv, it can use mpv (command line) options, including those for subtitles:
Method 1: Put the options in Celluloid's Preferences
From this: Open Celluloid and go to Preferences → Miscellaneous tab.
Put the relevant subtitles options in the Extra MPV options box (if there are more than one option, separate each one with a space). For example:
--sub-font=Tahoma --sub-font-size=48 --sub-color=1.0/1.0/0.0
This sets the default font to
Tahoma
, font size to48
(against a window height of 720), font color to yellow (255,255,0).Hit Save and restart Celluloid.
This method is pretty fast and convenient, but it has a major drawback: it will not apply the options containing quotation marks ("
or '
), which are required for font types with spaces in their names or for using color value in hex form (which is way easier than having to convert RGB 0-255 to RGB 0.0-1.0). For example, this line will not be applied:
--sub-font='Comic Sans MS' --sub-color='#FFFF00'
That brings us to the 2nd method.
Method 2: Load an external config file into Celluloid
Create a file named
mpv.conf
in~/Documents
or wherever (or in~/.config/mpv/
if also using mpv separately)Put the relevant options into the file, without the double dash (
--
). For example:# Font type sub-font='Comic Sans MS' # Font size sub-font-size=48 # Font color sub-color='#FFFF00' # Font format sub-bold=yes sub-italic=no # Text background/box (black with 75% alpha) sub-back-color='#C0000000'
Save the file.
Open Celluloid and go to Preferences → Config Files tab.
Check Load MPV configuration file and browse to the
mpv.conf
file just created.Hit Save and restart Celluloid.
Note: If both the config file and the Extra MPV options box are used, options in the box will take priority. For example, if there are --sub-font=Tahoma
and sub-font='Comic Sans MS'
, the font will be Tahoma
.
With the power of mpv, one can even set custom keyboard shortcuts for subtitles. For example, to set key bindings for changing the sub font size and text background size:
Create a file named
input.conf
in~/Documents
or wherever (or in~/.config/mpv/
if also using mpv separately)Put these lines in the file (based on this):
# Increase sub font size (set to [Alt] + [k]) ALT+k add sub-font-size +1 # Decrease sub font size (set to [Alt] + [j]) ALT+j add sub-font-size -1 # Increase sub text background size (set to [Alt] + [.]) ALT+. add sub-shadow-offset +1 # Increase sub text background size (set to [Alt] + [,]) ALT+, add sub-shadow-offset -1
Save the file.
Open Celluloid and go to Preferences → Config Files tab.
Check Load MPV input configuration file and browse to the
input.conf
file just created.Hit Save and restart Celluloid.
-
Hey, good Q&A! I wonder how to set command line format "LEFT seek 5" (I know config file, I found 1st way more convenient for me)? Thanx! Aug 16, 2021 at 1:52
-
@AlexeiMartianov as far as I know, there's no command line option for that. From mpv's manual:
User input.conf files and Lua scripts can define additional key bindings.
. Other than this, I haven't found any details about another way to map keys to input commands. You might want to double-check the manual, though. Aug 28, 2021 at 10:30