Anyone succeeded in using two sound cards with libVLC?

This forum is about all development around libVLC.
djdjdj
Blank Cone
Blank Cone
Posts: 15
Joined: 09 Sep 2010 16:42

Anyone succeeded in using two sound cards with libVLC?

Postby djdjdj » 08 Oct 2010 04:53

If so, please share how you did it. I've been trying with libvlc_audio_output_device_set, but haven't been successful.

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: Anyone succeeded in using two sound cards with libVLC?

Postby Jean-Baptiste Kempf » 11 Oct 2010 00:35

You want 2 audio outputs at the same time?
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.

djdjdj
Blank Cone
Blank Cone
Posts: 15
Joined: 09 Sep 2010 16:42

Re: Anyone succeeded in using two sound cards with libVLC?

Postby djdjdj » 12 Oct 2010 16:29

Yes. One internal and one external (USB) sound card. I can get the information of the sound cards with libvlc, but can't change the device for a media player to one or the other. The sound always comes through the default card. Detailed description is at viewtopic.php?f=32&t=82724. I would appreciate any help and clue.

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: Anyone succeeded in using two sound cards with libVLC?

Postby Jean-Baptiste Kempf » 13 Oct 2010 01:16

I am not sure VLC's infrastructure allows that.
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.

djdjdj
Blank Cone
Blank Cone
Posts: 15
Joined: 09 Sep 2010 16:42

Re: Anyone succeeded in using two sound cards with libVLC?

Postby djdjdj » 13 Oct 2010 19:31

You mean, it is not possible to create one vlc.Instance and link it to sound card A and create another vlc.Instance and link it to sound card B?

Also, I was not successful with changing the audio output for even one media player, like (in vlc python binding) i=vlc.Instance(); mp=i.media_player_new(); mp.audio_output_device_set('waveout', 'USB Audio Codec'). Is audio_output_device_set working?

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: Anyone succeeded in using two sound cards with libVLC?

Postby Jean-Baptiste Kempf » 15 Oct 2010 00:50

You can, but you cannot have 1 instance of VLC using 2 audio outputs.
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.

djdjdj
Blank Cone
Blank Cone
Posts: 15
Joined: 09 Sep 2010 16:42

Re: Anyone succeeded in using two sound cards with libVLC?

Postby djdjdj » 16 Oct 2010 17:57

Using two audio outputs, one for one Instance and the other for another Instance is fine with me.

I found the following difference between VLC application and libvlc.

- I have an internal sound card "Realtek" and an external sound card "USB Audio".

- In VLC application->Tools->Preferences->Audio, if I choose "Win32 waveOut extension output" as "Output module", I don't see "Device" choice. Changing the sound output is possible by using Window 7's "Sound" configuration window.
- In VLC application->Tools->Preferences->Audio, if I choose "DirectX audio output", I see "Device" choice and this has "Speakers (USB Audio)" and "Speakers (Realtek)". I can choose the audio output in this VLC configuration window.

- In libvlc, with vlc.Instance.audio_output_enumerate_devices(), I see two identical "waveout"s, with devices "USB Audio" and "Realtek" for them. However, vlc.Instance.audio_output_enumerate_devices()'s "aout_directx" does not have any associated device.

So, VLC application and libvlc behave differently. What can I do here?

djdjdj
Blank Cone
Blank Cone
Posts: 15
Joined: 09 Sep 2010 16:42

Re: Anyone succeeded in using two sound cards with libVLC?

Postby djdjdj » 16 Oct 2010 17:59

By the way, with libvlc, I couldn't change audio output for an Instance. No matter what I tried, the sound always comes from the default device set by Windows.

Kevin Hoang
Blank Cone
Blank Cone
Posts: 43
Joined: 25 Mar 2010 05:14

Re: Anyone succeeded in using two sound cards with libVLC?

Postby Kevin Hoang » 18 Oct 2010 06:45

I have a question too: I need 2 play the same video on 2 windows, so I created one instance and 2 players. My question is: Can I use 2 sound devices in this case?

djdjdj
Blank Cone
Blank Cone
Posts: 15
Joined: 09 Sep 2010 16:42

Re: Anyone succeeded in using two sound cards with libVLC?

Postby djdjdj » 19 Oct 2010 18:55

I can answer your question Kevin. 1 instance can have only 1 sound device. So, to use 2 sound devices you'll have to use 2 different instances.

But, my original question remains. How to use two sound cards for two different instances?

Kevin Hoang
Blank Cone
Blank Cone
Posts: 43
Joined: 25 Mar 2010 05:14

Re: Anyone succeeded in using two sound cards with libVLC?

Postby Kevin Hoang » 20 Oct 2010 07:12

In VLC 1.1.x, the audio function made for each player. But, In fact, I seen these functions does not works correctly as the meaning of them.

cen
New Cone
New Cone
Posts: 9
Joined: 13 Jan 2014 12:17

Re: Anyone succeeded in using two sound cards with libVLC?

Postby cen » 13 Feb 2014 11:47

If so, please share how you did it. I've been trying with libvlc_audio_output_device_set, but haven't been successful.
2. steps
libvlc_audio_output_set(name)
libvlc_audio_output_device_set(name,device)


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 39 guests