Page 1 of 1

chinese subtitle

Posted: 31 Jan 2015 07:39
by DoDenny
Hi,

so far , i have changed chinese ttf (Fallback.ttf) correctly , but chinese srt can not be show correctly , i check the encoding style , it seems that encoding mode were not set from java layer to libvlc ,right ? is there any wany to set the encoding mode ?

Thanks in advance!

chinese subtitle

Posted: 31 Jan 2015 07:41
by DoDenny
supplementary: srt file perhaps not normal, sometimes it can show correctly , mostly it can not show corectlly . thanks!

chinese subtitle

Posted: 01 Feb 2015 14:53
by DoDenny
hi, once i changed srt file to utf-8 manually , it can show correctly ,perhaps vlc can not decode srt file automatically ,and set encoding function do not work so far. can you share me when the function will add to master ?

chinese subtitle

Posted: 01 Feb 2015 15:06
by DoDenny
and i fount there are some two-window srt(see below) that can not be shown on vlc , but it can be show on other kinds of players with two-windows chinese subtiltle .

1
00:00:34,146 --> 00:00:38,439
<i>Cele mai vechi mituri cunoscute
sunt scrise 頽 stele.</i>

2
00:00:40,441 --> 00:00:45,410
<i>Mituri ce preced oamenii 篿 zeii,
de c鈔d titanii st鉷鈔eau lumea.</i>

3
00:00:47,174 --> 00:00:50,606
<i>Titanii erau puternici,
dar st鉷鈔irea lor a fost 頽cheiat?/i>

4
00:00:50,606 --> 00:00:56,610
<i>de propriii lor fii,
Zeus, Poseidon 篿 Hades.</i>

5
00:00:58,886 --> 00:01:03,385
<i>Zeus l-a convins pe fratele s鉼, Hades,
s?creeze un monstru at鈚 de puternic</i>

6
00:01:03,605 --> 00:01:05,264
<i>頽c鈚 s?i poat?頽fr鈔ge
pe p鉹ini lor.</i>

7
00:01:05,535 --> 00:01:08,869
<i>猧 din propria-i carne
Hades a dat na簍ere</i>

8
00:01:08,869 --> 00:01:11,092
<i>unei orori nemai頽t鈒nite...</i>

9
00:01:11,669 --> 00:01:13,392
<i>Krakenul.</i>

10
00:01:20,296 --> 00:01:23,492
<i>Zeus a devenit st鉷鈔ul v銁duhului.</i>

11
00:01:24,566 --> 00:01:27,757
<i>Poseidon, regele m鉹ilor.</i>

12

Re: chinese subtitle

Posted: 05 Feb 2015 04:11
by edwardw
There is an option in settings to change the subtitle encoding.

Re: chinese subtitle

Posted: 06 Feb 2015 07:18
by DoDenny
can libvlc play http video stream (mkv file in http server) and select local subtitle file on the phone ? i did some tests ,it seems not work.

Re: chinese subtitle

Posted: 06 Feb 2015 08:30
by DoDenny
Hi ,i did same tests on laptop's vlc player (mkv from http server , srt from local disk) , it can work ;
it seem that android's vlc player have a lot difference with laptop's vlc.

Re: chinese subtitle

Posted: 06 Feb 2015 08:31
by DoDenny
attach my codes:
// Create a new media player
mLibVLC = LibVLC.getInstance();
mMediaListPlayer = new MediaListPlayer(mLibVLC);
mLibVLC.setHardwareAcceleration(LibVLC.HW_ACCELERATION_DISABLED);

mLibVLC.setAout(LibVLC.AOUT_AUDIOTRACK);
mLibVLC.setTimeStretching(true);
mLibVLC.setVerboseMode(true);
mLibVLC.setRate(1);
//mLibVLC.setFrameSkip(true); //NOTE
//if(LibVlcUtil.isGingerbreadOrLater())
mLibVLC.setVout(LibVLC.VOUT_ANDROID_WINDOW);
//else
//mLibVLC.setVout(LibVLC.VOUT_ANDROID_SURFACE);


if(srt_exist == true)
{
mLibVLC.setSubtitlesEncoding(GVRUtils.getEncoding(mSrtPath));
mLibVLC.addSubtitleTrack(mSrtPath);
Log.d(TAG, "srt_exist:" + srt_exist + " : " + mSrtPath + ":" + GVRUtils.getEncoding(mSrtPath));
}


mLibVLC.restart(this); // nativeinit called in restart function,pls NOTE the call flow
EventHandler.getInstance().addHandler(mHandler);
mSurfaceView.setKeepScreenOn(true);
mMediaListPlayer.getMediaList().clear();
mMediaListPlayer.getMediaList().add(new Media(mLibVLC, LibVLC.PathToURI(media)));
mMediaListPlayer.playIndex(0);

mLibVLC.eventVideoPlayerActivityCreated(true);

Re: chinese subtitle

Posted: 06 Feb 2015 20:17
by edwardw
can libvlc play http video stream (mkv file in http server) and select local subtitle file on the phone ? i did some tests ,it seems not work.
Yes. In fact, it is already done in the official VLC app.

Re: chinese subtitle

Posted: 09 Feb 2015 02:25
by DoDenny
feedbacks:

change the codes below to the end of create player ,it seems work!
mLibVLC.addSubtitleTrack(mSrtPath);