[Bug 451565] Automatic detection of subtitle encoding

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Aug 4 09:37:55 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=451565

Jehan <jehan at zemarmot.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jehan at zemarmot.net

--- Comment #13 from Jehan <jehan at zemarmot.net> ---
Hello,

mpv just add support for "uchardet" which is basically the C binding for
mozilla algorithm: https://github.com/BYVoid/uchardet

It works well and has a much broader support that enca. Do `enca --list
languages` to get a full list of ENCA supported languages. Basically enca does
support only latin and cyrillic languages, with the exception of Chinese as
only Asian language.
Also after some test and doc reading, I realize that ENCA does not work without
a hint language for monobyte encoding, which means for nearly all its list.
This is actually documented in its manual:

> The special language none can be shortened to __, it contains no 8bit encodings, so only multibyte encodings are detected.

And actually even with a language hint, it does not seem the most efficient (I
had several failures with encoding supposed to work, even when giving the
language). That really does not make it very useful as a default.

> For future reference: libguess was also mentioned today

mpv also has a support for libguess, so I tested it. It apparently requires a
language hint at all time (at least this is how they implemented it in mpv) and
was not able to detect a file in EUC-KR with the hint "korean". So this is not
a very broad test case, and maybe also mpv has a broken implementation, but it
did not look very promising.

On the other hand, uchardet works very well. It is able to detect the encoding
of my files in non-UTF-8 Korean or Japanese.
It is now the default in mpv. (see:
https://github.com/mpv-player/mpv/issues/908 and
https://github.com/mpv-player/mpv/pull/2193).
Could it be supported, and why not even become the default in gstreamer too?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list