chinese subtitle

VLC for Android and Chrome OS specific usage questions
DoDenny
Blank Cone
Blank Cone
Posts: 23
Joined: 15 Nov 2014 14:48

chinese subtitle

Postby DoDenny » 31 Jan 2015 07:39

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!

DoDenny
Blank Cone
Blank Cone
Posts: 23
Joined: 15 Nov 2014 14:48

chinese subtitle

Postby DoDenny » 31 Jan 2015 07:41

supplementary: srt file perhaps not normal, sometimes it can show correctly , mostly it can not show corectlly . thanks!

DoDenny
Blank Cone
Blank Cone
Posts: 23
Joined: 15 Nov 2014 14:48

chinese subtitle

Postby DoDenny » 01 Feb 2015 14:53

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 ?

DoDenny
Blank Cone
Blank Cone
Posts: 23
Joined: 15 Nov 2014 14:48

chinese subtitle

Postby DoDenny » 01 Feb 2015 15:06

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

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: chinese subtitle

Postby edwardw » 05 Feb 2015 04:11

There is an option in settings to change the subtitle encoding.

DoDenny
Blank Cone
Blank Cone
Posts: 23
Joined: 15 Nov 2014 14:48

Re: chinese subtitle

Postby DoDenny » 06 Feb 2015 07:18

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.

DoDenny
Blank Cone
Blank Cone
Posts: 23
Joined: 15 Nov 2014 14:48

Re: chinese subtitle

Postby DoDenny » 06 Feb 2015 08:30

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.

DoDenny
Blank Cone
Blank Cone
Posts: 23
Joined: 15 Nov 2014 14:48

Re: chinese subtitle

Postby DoDenny » 06 Feb 2015 08:31

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);

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: chinese subtitle

Postby edwardw » 06 Feb 2015 20:17

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.

DoDenny
Blank Cone
Blank Cone
Posts: 23
Joined: 15 Nov 2014 14:48

Re: chinese subtitle

Postby DoDenny » 09 Feb 2015 02:25

feedbacks:

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


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 19 guests