Page 1 of 1

Selecting audio and subtitle tracks

Posted: 20 Oct 2013 13:44
by eTiMaGo
Hi Folks,

Just a question about VLC for Android... From the current app, I see no way to switch between multiple embedded audio and video tracks. Is this something not yet implemented or just not possible?

We're looking to make a multilingual android video app based around VLC, but we can't really find any indication in the documentation whether it will work or not. Thanks!

Re: Selecting audio and subtitle tracks

Posted: 20 Oct 2013 18:21
by edwardw
I recall that you can use LibVLC.setAudioTrack() and the likes to set tracks.

Re: Selecting audio and subtitle tracks

Posted: 20 Oct 2013 18:29
by eTiMaGo
OK, I'll try that when I manage to get it compiled :D

So for all intents and purposes, all regular libVLC functions should work on the Android builds?

Re: Selecting audio and subtitle tracks

Posted: 20 Oct 2013 18:31
by edwardw
Most, but not all.

And LibVLC.setAudioTrack() is a Java (wrapper) function.

Re: Selecting audio and subtitle tracks

Posted: 21 Oct 2013 05:12
by eTiMaGo
OK a couple more questions:

Can you elaborate "Most, but not all"? I can't find any kind of documentation or reference
Specifically, if there are correspondent functions of libvlc_audio_get_track_count / libvlc_video_get_spu_count to get the actual tracks info

Why is this audio and subtitle switching functionality not in the player? Not implemented yet, or having functionality issues?

Re: Selecting audio and subtitle tracks

Posted: 21 Oct 2013 05:15
by edwardw
Audio and subtitles track switching are fully supported in the VLC for Android releases.

Re: Selecting audio and subtitle tracks

Posted: 21 Oct 2013 08:30
by zero12345
Hello,

it can be me but can't find any option to switch audio nor subs tracks, the file starts with a default audio and subs playing and can't find any way to switch them.

The testing file is a MKV, plain http stream - the very same file and stream works well (including subtitle / audio switching) on vlc player for pc and two different integrations of libvlc (for both windows and osx)

There's any know issue with MKV files we should be aware of?

Re: Selecting audio and subtitle tracks

Posted: 21 Oct 2013 08:46
by eTiMaGo
Sorry for the annoying question, but do you mean the VLC release available as an APK or on the Play Store? I don't see any option to change, only to add srt subs?

Re: Selecting audio and subtitle tracks

Posted: 21 Oct 2013 11:44
by zero12345
Hello,

I think I was able to catch the issue: the very same file if loaded locally can play and switch audio and subs tracks - the same file loaded as remote stream (direct http) doesnt (just play a default audio and sub)

FWIW to confirm as i said this very same streams play over vlc on pc and mac, and some customs apps I've done using libvlc on both.

I tested with different files and get the same result, so can we assume there's an issue where vlc can't get the track info from an mkv (I didnt test other formats) stream?

Re: Selecting audio and subtitle tracks

Posted: 21 Oct 2013 15:30
by edwardw
Do you pick up the tracks with VLC desktop on the same stream?

Re: Selecting audio and subtitle tracks

Posted: 21 Oct 2013 15:34
by zero12345
Yes, on the very same stream vlc desktop on both windows and mac show the tracks and I'm able to switch, same with two apps builded over libvlc

Re: Selecting audio and subtitle tracks

Posted: 21 Oct 2013 15:37
by zero12345
FYI, I tested using other stream still using MKV files, same result: I get the tracks on vlc on desktop, I don't get the tracks on vlc for android

Re: Selecting audio and subtitle tracks

Posted: 22 Oct 2013 06:56
by zero12345
Edward I can't but notice you're avoiding to give a direct answer.

The issue is easy replicable, can we know at least if is a know issue, something in a todo list - or something specific to MKV (I didn't had the chance to test other formats with multiple tracks)

Re: Selecting audio and subtitle tracks

Posted: 22 Oct 2013 13:02
by edwardw
Edward I can't but notice you're avoiding to give a direct answer.
Well, VLC developers are volunteers after all, and sometimes people are busy. :P
The issue is easy replicable, can we know at least if is a know issue, something in a todo list - or something specific to MKV (I didn't had the chance to test other formats with multiple tracks)
Anyways, I just tested with a MKV (H264+AAC+ASS subtitles) over HTTP, and it detects the subtitle/audio tracks just fine.

Re: Selecting audio and subtitle tracks

Posted: 22 Oct 2013 13:58
by zero12345
Hello Edward,

can we please have a sample link of a mkv you tested? it was multi-track?

Here I tested with different mkv, i can send you the links if want

Re: Selecting audio and subtitle tracks

Posted: 22 Oct 2013 14:00
by edwardw
Sure.

Re: Selecting audio and subtitle tracks

Posted: 22 Oct 2013 14:08
by zero12345
When you say "detects the subtitle/audio tracks just fine" means you can play the track or you can also switch between multiple audio / subs tracks?

Re: Selecting audio and subtitle tracks

Posted: 22 Oct 2013 14:17
by zero12345
I can't give you atm the direct links as are on a production server, I need to wait some authorization before can post it to you - anyway if you can please confirm me this:

"When you say "detects the subtitle/audio tracks just fine" means you can play the track or you can also switch between multiple audio / subs tracks?"

To make it short: do you see the icons for switch audio / subtitle tracks at runtime on your vlc GUI? for me, no - but they shows if I run it as a local file.

If they show, can you send me a link to test it with my device too?

Re: Selecting audio and subtitle tracks

Posted: 23 Oct 2013 06:30
by zero12345
up, any chance to have an answer?

Re: Selecting audio and subtitle tracks

Posted: 23 Oct 2013 11:48
by XilasZ
you will surely get an answer when we will have time to check / test this.

i just did a quick test with : http://streams.videolan.org/samples/Mat ... est_01.mkv
when opened with "Open stream" button in vlc-android itself, the subtitle button appears.
but when opened from Chrome, the button doesn't show up, no idea why yet.

Re: Selecting audio and subtitle tracks

Posted: 23 Oct 2013 13:13
by zero12345
Hello,

for what I see http://streams.videolan.org/samples/Mat ... est_01.mkv have only one subtitle track, so if there's an issue is an unrelated one.

I'll try to re-explain as seems here people don't get or ignore it on purpose like when you call level 1 support help desk.

THE ISSUE IS RELATED TO MKV FILES THAT HAVE MULTIPLE SUBS / AUDIO TRACKS

I mean a file with i.e. 2, 3 or more audio tracks and/or 2, 3 or more subs tracks - if I open the file from a network stream the default track is read, but there's no options in the GUI anywhere to switch to another subs / audio track.

On vlc desktop, the same network stream gives me the option to switch tracks (i.e. audio-> eng, audio->fra, audio->th etc).

On vlc Android, the same file NOT on a stream but as local file gives me the option to switch tracks (i.e. audio-> eng, audio->fra, audio->th etc).

Is now clear?

Re: Selecting audio and subtitle tracks

Posted: 23 Oct 2013 13:41
by propidadsbm
OK, I think audio and subtitles track switching are supported in the VLC for Android releases. :)

Re: Selecting audio and subtitle tracks

Posted: 23 Oct 2013 13:53
by XilasZ
for what I see http://streams.videolan.org/samples/Mat ... est_01.mkv have only one subtitle track, so if there's an issue is an unrelated one.
it's the same issue, the subtitle button is shown even if there's only one subtitle track, to allow disabling it.
and audio track selection works the same way.
I'll try to re-explain as seems here people don't get or ignore it on purpose like when you call level 1 support help desk.
We are not paid to work on VLC; we do it on our free time, so stop repeating the same thing, and someone will check/test and maybe fix something if someone has time to do it.

Re: Selecting audio and subtitle tracks

Posted: 23 Oct 2013 14:02
by Jean-Baptiste Kempf
I'll try to re-explain as seems here people don't get or ignore it on purpose like when you call level 1 support help desk.

Is now clear?
And you got yourself a one-day ban. This was your first warning.