[CLOSED] ENCA update for better MEncoder subtitles support

General discussion about Universal Media Server (no support or requests)
Post Reply
User avatar
Sami32
Posts: 851
Joined: Mon Apr 11, 2016 5:09 am

[CLOSED] ENCA update for better MEncoder subtitles support

Post 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.
Last edited by Sami32 on Sat Jul 09, 2016 4:21 am, edited 4 times in total.
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

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

Post by SubJunk »

Where do we use ENCA?
User avatar
Sami32
Posts: 851
Joined: Mon Apr 11, 2016 5:09 am

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

Post 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 ?
User avatar
valib
Developer
Posts: 699
Joined: Fri Feb 08, 2013 3:11 am

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

Post 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. ;)
Post Reply