summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/en/changes.rst1
-rw-r--r--DOCS/man/en/options.rst55
-rw-r--r--DOCS/tech-overview.txt32
3 files changed, 53 insertions, 35 deletions
diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst
index de3b24b710..ed83c402f3 100644
--- a/DOCS/man/en/changes.rst
+++ b/DOCS/man/en/changes.rst
@@ -128,6 +128,7 @@ Command line switches
-dumpstream --stream-dump=<filename>
-capture --stream-capture=<filename>
-stop-xscreensaver --stop-screensaver
+ -subfile --sub
=================================== ===================================
*NOTE*: ``-opt val`` becomes ``--opt=val``.
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index 304eeba464..57af5ff209 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -1447,11 +1447,6 @@
``show_progress`` command (by default mapped to ``P``), or in some
non-default cases when seeking. Expands properties. See property_expansion_.
---overlapsub
- Allows the next subtitle to be displayed while the current one is still
- visible (default is to enable the support only for specific formats). This
- only matters for subtitles loaded with ``-sub``.
-
--panscan=<0.0-1.0>
Enables pan-and-scan functionality (cropping the sides of e.g. a 16:9
movie to make it fit a 4:3 display without black bands). The range
@@ -1996,15 +1991,16 @@
Use/display these subtitle files. Only one file can be displayed at the
same time.
+--sub-fix-timing, --no-sub-fix-timing
+ By default, external text subtitles are preprocessed to remove minor gaps
+ or overlaps between subtitles (if the difference is smaller than 200 ms,
+ the gap or overlap is removed). This does not affect image subtitles,
+ subtitles muxed with audio/video, or subtitles in the ASS format.
+
--sub-demuxer=<[+]name>
- Force subtitle demuxer type for ``--subfile``. Using a '+' before the name
- will force it, this will skip some checks! Give the demuxer name as
+ Force subtitle demuxer type for ``--sub``. Give the demuxer name as
printed by ``--sub-demuxer=help``.
---sub-no-text-pp
- Disables any kind of text post processing done after loading the
- subtitles. Used for debug purposes.
-
--sub-paths=<path1:path2:...>
Specify extra directories where to search for subtitles matching the
video. Multiple directories can be separated by ":" (";" on Windows).
@@ -2035,9 +2031,9 @@
``--subcp=enca:<language>:<fallback codepage>``
You can specify your language using a two letter language code to make
- ENCA detect the codepage automatically. If unsure, enter anything and
- watch mpv ``-v`` output for available languages. Fallback codepage
- specifies the codepage to use, when autodetection fails.
+ ENCA detect the codepage automatically. If unsure, enter anything (if the
+ language is invalid, mpv will complain and list valid languages).
+ Fallback codepage specifies the codepage to use if autodetection fails.
*EXAMPLE*:
@@ -2045,17 +2041,20 @@
are Czech, fall back on latin 2, if the detection fails.
- ``--subcp=enca:pl:cp1250`` guess the encoding for Polish, fall back on
cp1250.
+ - ``--subcp=enca:pl`` guess the encoding for Polish, fall back on UTF-8.
+ - ``--subcp=enca`` try universal detection, fall back on UTF-8.
---sub-delay=<sec>
- Delays subtitles by <sec> seconds. Can be negative.
+ If the player was compiled with libguess support you can use it with:
---subfile=<filename>
- Open the given file with a demuxer, and use its subtitle streams. Same as
- ``--audiofile``, but for subtitle streams.
+ ``--subcp=guess:<language>:<fallback codepage>``
- *NOTE*: use ``--sub`` for subtitle files. This option is useless, unless
- you want to force libavformat subtitle parsers instead of libass or
- internal subtitle parsers.
+ Note that libguess always needs a language. There is no universal detection
+ mode. Use ``--subcp=guess:help`` to get a list of languages (like with ENCA,
+ it will be printed only if the conversion code is somehow called, for
+ example when loading an external subtitle).
+
+--sub-delay=<sec>
+ Delays subtitles by <sec> seconds. Can be negative.
--subfps=<rate>
Specify the framerate of the subtitle file (default: movie fps).
@@ -2063,6 +2062,8 @@
*NOTE*: <rate> > movie fps speeds the subtitles up for frame-based
subtitle files and slows them down for time-based ones.
+ Also see ``--sub-speed`` option.
+
--sub-gauss=<0.0-3.0>
Apply gaussian blur to image subtitles (default: 0). This can help making
pixelated DVD/Vobsubs look nicer. A value other than 0 also switches to
@@ -2089,6 +2090,16 @@
*NOTE*: this affects ASS subtitles as well, and may lead to incorrect
subtitle rendering. Use with care, or use ``--sub-text-font-size`` instead.
+--sub-speed=<0.1-10.0>
+ Multiply the subtitle event timestamps with the given value. Can be used
+ to fix the playback speed for frame-based subtitle formats. Works for
+ external text subtitles only.
+
+ *EXAMPLE*:
+
+ - ``--sub-speed=25/23.976`` play frame based subtitles, which have been
+ loaded assuming a framerate of 23.976, at 25 FPS.
+
--sws=<n>
Specify the software scaler algorithm to be used with ``--vf=scale``. This
also affects video output drivers which lack hardware acceleration,
diff --git a/DOCS/tech-overview.txt b/DOCS/tech-overview.txt
index 2037ab653e..e242df1325 100644
--- a/DOCS/tech-overview.txt
+++ b/DOCS/tech-overview.txt
@@ -186,25 +186,31 @@ audio/out/:
why buggy audio drivers can have a bad influence on playback quality.
sub/:
- Contains subtitle rendering, OSD rendering, and parts of subtitle loading.
+ Contains subtitle and OSD rendering.
sub.c/.h is actually the OSD code. It queries dec_sub.c to retrieve
decoded/rendered subtitles. osd_libass.c is the actual implementation of
the OSD text renderer (which uses libass, and takes care of all the tricky
fontconfig/freetype API usage and text layouting).
- Subtitles are loaded either via libass (for .ass), subreader.c (the old
- MPlayer subtitle loader code), or libavformat demuxers. The subtitles are
- then passed to dec_sub.c and the subtitle decoders in sd_*.c. All text
- subtitles are rendered by sd_ass.c. If text subtitles are not in the ASS
- format, subtitle converters are inserted, for example sd_srt.c, which is
- used to convert SRT->ASS. sd_srt.c is also used as general converter for
- text->ASS (to prevent interpretation of text as ASS tags).
-
- subreader.c should eventually go away. It should be replaced by either
- libavformat's demuxers, or by mpv native demuxers for more common formats
- like SRT. See commit message of commit 92ae48d what needs to be done to
- replace subreader.c completely and why.
+ Subtitle loading is now in demux/ instead. demux_libass.c wraps loading
+ .ass subtitles via libass. demux_lavf.c loads most subtitle types via
+ FFmpeg. demux_subreader.c is the old MPlayer code. It's used as last
+ fallback, or to handle some text subtitle types on Libav. (It also can
+ load UTF-16 encoded subtitles without requiring the use of -subcp.)
+ demux_subreader.c should eventually go away (maybe).
+
+ The subtitles are passed to dec_sub.c and the subtitle decoders in sd_*.c
+ as they are demuxed. All text subtitles are rendered by sd_ass.c. If text
+ subtitles are not in the ASS format, subtitle converters are inserted, for
+ example sd_srt.c, which is used to convert SRT->ASS. sd_srt.c is also used
+ as general converter for text->ASS (to prevent interpretation of text as
+ ASS tags).
+
+ Text subtitles can be preloaded, in which case they are read fully as soon
+ as the subtitle is selected, and then effectively stored in an ASS_Track.
+ It's used for external text subtitles, and required to make codepage
+ detection as well as timing postprocessing work.
core/timeline/:
A timeline is the abstraction used by mplayer.c to combine several files