Doubt: Select audio

This forum is about all development around libVLC.
Randall_8
New Cone
New Cone
Posts: 4
Joined: 22 Feb 2009 18:34

Doubt: Select audio

Postby Randall_8 » 02 Mar 2009 12:54

I'm working with this project http://xyber.abt.googlepages.com/workingjvlcexample, and I have one question:
- How can I implement the selection between 2 audios when the video file is dual?
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: Doubt: Select audio

Postby Jean-Baptiste Kempf » 02 Mar 2009 13:03

You mean select channel when you have stereo?
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.

Randall_8
New Cone
New Cone
Posts: 4
Joined: 22 Feb 2009 18:34

Re: Doubt: Select audio

Postby Randall_8 » 02 Mar 2009 13:51

You mean select channel when you have stereo?
No, I mean select audio track, nor audio channel. Sometimes, the video files (movies) have two languajes (for example: spanish-english) and with VLC media player you can choose them in Audio/Audio track/Track 1 or Track 2 or Disable. I would like to implement that menu, because when I play a video file with this project always it is selected Track 1 and I can't change it.

kooibosmania
New Cone
New Cone
Posts: 2
Joined: 02 Mar 2009 14:11

Re: Doubt: Select audio

Postby kooibosmania » 02 Mar 2009 14:14

Hi All

I am also wondering about this something like vlc frontend: rightmousclick select audiostream or subtitle stream

please let me know if there is a solution

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: Doubt: Select audio

Postby Jean-Baptiste Kempf » 02 Mar 2009 14:52

audio-es is the variable to modify.
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.

kooibosmania
New Cone
New Cone
Posts: 2
Joined: 02 Mar 2009 14:11

Re: Doubt: Select audio

Postby kooibosmania » 02 Mar 2009 15:01

Thanks j-b

I am fairly new to c# can you elaborate on this like where to put this.
sorry for your troubles

so far i got to
desc.Dispose();
VlcPlayer.Play();
VlcPlayer.Audio.Track = 3;
int audiotrcount = VlcPlayer.Audio.TrackCount;

this seems to work

Randall_8
New Cone
New Cone
Posts: 4
Joined: 22 Feb 2009 18:34

Re: Doubt: Select audio

Postby Randall_8 » 02 Mar 2009 19:41

I got it :). If someone wants to use it in Java:

jvlc = new JVLC(arg);
playlist = new Playlist(jvlc);
audio = new Audio(jvlc);
int audioTrack = 2;
audio.setTrack(playlist.getMediaInstance(), audioTrack);


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 23 guests