summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-23 22:15:04 +0200
committerwm4 <wm4@nowhere>2013-06-25 00:11:56 +0200
commitf735a03346e8ec743bc89d5bdbaafd62dc0f084d (patch)
tree819054a1a641447742897388a0e03d13552ed946 /DOCS
parentfeb64c2717139f030974823756f51cbe215ef818 (diff)
downloadmpv-f735a03346e8ec743bc89d5bdbaafd62dc0f084d.tar.bz2
mpv-f735a03346e8ec743bc89d5bdbaafd62dc0f084d.tar.xz
sub: add subtitle charset conversion
This code was once part of subreader.c, then traveled to libass, and now made its way back to the fork of the fork of the original code, MPlayer. It works pretty much the same as subreader.c, except that we have to concatenate some packets to do auto-detection. This is rather annoying, but for all we know the actual source file could be a binary format. Unlike subreader.c, the iconv context is reopened on each packet. This is simpler, and with respect to multibyte encodings, more robust. Reopening is probably not a very fast, but I suspect subtitle charset conversion is not an operation that happens often or has to be fast. Also, this auto-detection is disabled for microdvd - this is the only format we know that has binary data in its packets, but is actually decoded to text. FFmpeg doesn't really allow us to solve this properly, because a) the input packets can be binary, and b) the output will be checked whether it's UTF-8, and if it's not, the output is thrown away and an error message is printed. We could just recode the decoded subtitles before sd_ass if it weren't for that.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/en/options.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index 83ceb15c49..aae283d213 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -2031,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*:
@@ -2041,6 +2041,8 @@
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.