Page 1 of 1

[CLOSED] ENCA update for better MEncoder subtitles support

Posted: Sat Jul 02, 2016 11:01 pm
by Sami32
http://cihar.com/software/enca/#

Improved bielorusian, chinese, slovenian support and fixed some bugs fro OSX, ... since 1.13 that is actually used by UMS for some subtitles.

Re: ENCA latest update (1.18) for better subtitles support

Posted: Sun Jul 03, 2016 8:29 am
by SubJunk
Where do we use ENCA?

Re: ENCA latest update (1.18) for better subtitles support

Posted: Sun Jul 03, 2016 9:12 pm
by Sami32
Actually it's look like it's used for MPlayer/MEncoder only.

In SubtitleUtilsTest.java
assertThat(getSubCpOptionForMencoder(sub1)).isEqualTo("enca:zh:big5");
assertThat(getSubCpOptionForMencoder(sub3)).isEqualTo("enca:ru:cp1251");

and in SubtitleUtils.java :
// Cyrillic / Russian
put(CHARSET_IBM855, "enca:ru:cp1251");
put(CHARSET_ISO_8859_5, "enca:ru:cp1251");
put(CHARSET_KOI8_R, "enca:ru:cp1251");
put(CHARSET_MACCYRILLIC, "enca:ru:cp1251");
// Chinese
put(CHARSET_ISO_2022_CN, "ISO-2022-CN");
put(CHARSET_BIG5, "enca:zh:big5");
put(CHARSET_GB18030, "enca:zh:big5");
put(CHARSET_EUC_TW, "enca:zh:big5");

Also mentioned in contrib/binaries-deps-versions, contrib/download-pms-binaries-source.sh, contrib/download-pms-binaries-source.sh and contrib/build-pms-binaries.sh.

P.S. Do you imply that is old code from 2012 that was not cleaned ?

Re: ENCA latest update (1.18) for better subtitles support

Posted: Thu Jul 07, 2016 11:33 pm
by valib
Sami32 wrote:Actually it's look like it's used for MPlayer/MEncoder only.

P.S. Do you imply that is old code from 2012 that was not cleaned ?
Sami32 the ENCA itself is not used in the UMS. So I guess that it is used internally in the MEncoder so the UMS only prepares the subs parameters for MEncoder. If in the MEncoder is used the latest ENCA code I don't know.

In the SubtitleUtils.java there is a fileCharsetToMencoderSubcpOptionMap which is used to prepare the correct MEncoder parameters regarding the detected subs charset.

The contrib/binaries-deps-versions, contrib/download-pms-binaries-source.sh, contrib/download-pms-binaries-source.sh and contrib/build-pms-binaries.sh are there for Linux and OSX. These scripts are only meant for enthusiasts who want to bundle their UMS with custom built versions of libraries and tools, replacing the standard versions shipped with the regular UMS distribution. Those scripts should be updated. ;)

Re: ENCA update for better MEncoder subtitles support

Posted: Sat Jul 09, 2016 4:20 am
by Sami32
Valib Thank you very much for your answer and your explanations :)