summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-17 20:56:45 +0100
committerwm4 <wm4@nowhere>2012-11-20 18:00:15 +0100
commit80270218cb9bda57afbb739fa22f7eb2f3a556ff (patch)
tree9e38c23238ef01e7f8d71e8adf99674e3044148e /DOCS/man
parentd23b620a89e88b0ec0d6a66c7f05c2e461579647 (diff)
downloadmpv-80270218cb9bda57afbb739fa22f7eb2f3a556ff.tar.bz2
mpv-80270218cb9bda57afbb739fa22f7eb2f3a556ff.tar.xz
osd: make the OSD and sub font more customizable
Make more aspects of the OSD font customizable. This also affects the font used for unstyled subtitles (such as SRT), or when using the --no-ass option. This adds back some customizability that was lost with commit 74e7a1 (osd: use libass for OSD rendering). Removed options: --ass-border-color --ass-color --font --subfont --subfont-text-scale Added options: --osd-color --osd-border --osd-back-color --osd-shadow-color --osd-font --osd-font-size --osd-border-size --osd-margin-x --osd-margin-y --osd-shadow-offset --osd-spacing --sub-scale The font size is now specified in pixels as it would be rendered on a window with a height of 720 pixels. OSD and subtitles are always scaled with the window height, so specifying or expecting an absolute font size doesn't make sense. Such scaled pixel units are used to specify font border etc. as well. (Note: the font size is directly passed to libass. How the fonts are actually rasterized is outside of our control, but in theory ASS font sizes map to "script" pixels and then are scaled to screen size.) The default settings should be about the same, with slight difference due to rounding to the new scales. The OSD and subtitle fonts are not separately configurable. It has limited use and would double the number of newly added options, which would be more confusing than helpful. It could be easily added later, should the need arise. Other small details that change: - ASS_Style.Encoding is not set to -1 for subs anymore (assuming subs use VSFilter direction in -no-ass mode too) - use a different WrapStyle for OSD - ASS forced styles are not applied to OSD
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/en/changes.rst1
-rw-r--r--DOCS/man/en/options.rst116
2 files changed, 87 insertions, 30 deletions
diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst
index 8bd81c1832..2f012f7b1b 100644
--- a/DOCS/man/en/changes.rst
+++ b/DOCS/man/en/changes.rst
@@ -109,6 +109,7 @@ Command line switches
-endpos --length
--cursor-autohide-delay --cursor-autohide
-sub-fuzziness --autosub-match
+ -subfont-text-scale --sub-scale
=================================== ===================================
input.conf and slave commands
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index 44462ec863..3782dd2d31 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -118,20 +118,10 @@
text subtitles only, because ASS subtitles include their own styling
information.
---ass-border-color=<value>
- Sets the border (outline) color for text subtitles. The color format is
- RRGGBBAA.
-
--ass-bottom-margin=<value>
Adds a black band at the bottom of the frame. The SSA/ASS renderer can
place subtitles there (with ``--ass-use-margins``).
---ass-color=<value>
- Sets the color for text subtitles. The color format is RRGGBBAA.
-
---ass-font-scale=<value>
- Set the scale coefficient to be used for fonts in the SSA/ASS renderer.
-
--ass-force-style=<[Style.]Param=Value[,...]>
Override some style or script info parameters.
@@ -551,19 +541,6 @@
--flip
Flip image upside-down.
---font=<pattern-or-filename>
- Specify font to use for OSD and for subtitles that do not themselves
- specify a particular font. See also ``--subfont``. With fontconfig enabled
- the argument is a fontconfig pattern and the default is ``sans``. Without
- fontconfig the argument is a filename and the default is
- ``~/.mpv/subfont.ttf``.
-
- *EXAMPLE*:
-
- - ``--font=~/.mpv/arialuni.ttf`` (no fontconfig)
- - ``--font='Bitstream Vera Sans'`` (usual case with fontconfig)
- - ``--font='Bitstream Vera Sans:style=Bold'`` (usual case with fontconfig)
-
--force-window-position
Forcefully move mpv's video output window to default location whenever
there is a change in video parameters, video stream or file. This used to
@@ -1234,6 +1211,89 @@
--osd-duration=<time>
Set the duration of the OSD messages in ms (default: 1000).
+--osd-color=<#RRGGBB>
+ Specify the color used for OSD. This is also used for unstyled text
+ subtitles. This option (and most other ``--osd-`` options) are ignored
+ when ASS subtitles are rendered, unless the ``--no-ass`` option is
+ specified.
+
+ The color is specified in hex RGB, and each 2-digit group expresses a
+ color value in the range 0 (``00``) to 255 (`FF`). For example, ``#FF0000``
+ is red.
+
+ You can specify transparency by specifying an alpha value in the form
+ ``#AARRGGBB``. 0 is fully transparent, while ``FF`` is opaque (opaque is
+ default with the shorter color specification).
+
+--osd-back-color=<#RRGGBB>
+ See ``--osd-color``. Color used for OSD text background.
+
+--osd-border-color=<#RRGGBB>
+ See ``--osd-color``. Color used for the OSD font border.
+
+ *Note*: ignored when ``--osd-back-color`` is specified (or more
+ exactly: when that option is not set to completely transparent).
+
+--osd-shadow-color=<#RRGGBB>
+ See ``--osd-color``. Color used for OSD text shadow.
+
+--osd-font-size=<size>
+ Specify the OSD font size. The unit is the size in scaled pixels at a
+ window height of 720. The actual pixel size is scaled with the window
+ height: if the window height is larger or smaller than 720, the actual size
+ of the text increases or decreases as well.
+
+ Default: 45.
+
+--osd-border-size=<size>
+ Size of the OSD font border in scaled pixels (see ``--osd-font-size`` for
+ details). A value of 0 disables borders.
+
+ Default: 2.5.
+
+--osd-margin-x=<size>
+ Left and right screen margin for the OSD in scaled pixels (see
+ ``--osd-font-size`` for details).
+
+ This option specifies the distance of the OSD to the left, as well as at
+ which distance from the right border long OSD text will be broken.
+
+ Default: 25.
+
+--osd-margin-y=<size>
+ Top and bottom screen margin for the OSD in scaled pixels (see
+ ``--osd-font-size`` for details).
+
+ This option specifies the vertical margins of the OSD. This is also used
+ for unstyled text subtitles. If you just want to raise the vertical
+ subtitle position, use ``--sub-pos``.
+
+ Default: 10.
+
+--osd-shadow-offset=<size>
+ Displacement of the OSD text shadow in scaled pixels (see
+ ``--osd-font-size`` for details). A value of 0 disables shadows.
+
+ Default: 0.
+
+--osd-spacing=<size>
+ Horizontal OSD font spacing in scaled pixels (see ``--osd-font-size`` for
+ details). This value is added to the normal letter spacing. Negative values
+ are allowed.
+
+ Default: 0.
+
+--osd-font=<pattern>
+ Specify font to use for OSD and for subtitles that do not themselves
+ specify a particular font. The default is ``Sans``.
+
+ Typically ignored for ASS-subtitles.
+
+ *EXAMPLE*:
+
+ - ``--osd-font='Bitstream Vera Sans'``
+ - ``--osd-font='Bitstream Vera Sans:style=Bold'`` (fontconfig pattern)
+
--osd-fractions
Show OSD times with fractions of seconds.
@@ -1816,13 +1876,6 @@
Use ``--sub`` for normal text subtitle files.
---subfont=<pattern-or-filename>
- Sets the subtitle font (see ``--font``). If no ``--subfont`` is given,
- ``--font`` is used for subtitles too.
-
---subfont-text-scale=<0-100>
- Factor for the text subtitle and OSD font size (default: 6).
-
--subfps=<rate>
Specify the framerate of the subtitle file (default: movie fps).
@@ -1833,6 +1886,9 @@
Specify the position of subtitles on the screen. The value is the vertical
position of the subtitle in % of the screen height.
+--sub-scale=<0-100>
+ Factor for the text subtitle font size (default: 1).
+
--sws=<n>
Specify the software scaler algorithm to be used with the ``--zoom``
option. This affects video output drivers which lack hardware