VLC android disable track

This forum is about all development around libVLC.
brbcod1
New Cone
New Cone
Posts: 4
Joined: 26 Jun 2020 14:12

VLC android disable track

Postby brbcod1 » 26 Jun 2020 14:26

Hello, I noticed that there's no method on the MediaPlayer for disabling a track.
In particular, I'm looking for a way to disable a subtitle track.
I turn it on with the setSpuTrack method, then, to disable it, I tried with a high value (like 99) and a negative value (like -1) but the subtitles don't get disabled.
Am I missing something or there's no way to disable a track?
Thanks!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC android disable track

Postby Jean-Baptiste Kempf » 28 Jun 2020 17:45

Are you sure the subtitles are a track (and not burned in)? Because setSputrack should be the right thing to do.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

brbcod1
New Cone
New Cone
Posts: 4
Joined: 26 Jun 2020 14:12

Re: VLC android disable track

Postby brbcod1 » 29 Jun 2020 09:51

Yes it's a track, not burned in.
In my example, the video starts without subtitles and I turn it on with setSpuTrack(2).
Then, I want to allow the user to disable them again.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC android disable track

Postby Jean-Baptiste Kempf » 29 Jun 2020 10:11

Track 0?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

brbcod1
New Cone
New Cone
Posts: 4
Joined: 26 Jun 2020 14:12

Re: VLC android disable track

Postby brbcod1 » 29 Jun 2020 11:20

No, even setSpuTrack(0) doesn't disable them

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: VLC android disable track

Postby unidan » 29 Jun 2020 12:58

Hi,

setSpuTrack(-1) should disable it, according to EsSpuCallback in vlc3 core and the VLC Android code.

Since it doesn't work for you but works for libvlc android, we'll need more information about your setup. What version of libvlc are you linking ?

brbcod1
New Cone
New Cone
Posts: 4
Joined: 26 Jun 2020 14:12

Re: VLC android disable track

Postby brbcod1 » 29 Jun 2020 15:11

Hi, I ended up upgrading to the latest version and the problem seems to be fixed now, using setSpuTrack(-1).
Thanks!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 24 guests