Picking output audio device w command line in .bat file

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Robben
New Cone
New Cone
Posts: 4
Joined: 14 Dec 2013 19:43

Picking output audio device w command line in .bat file

Postby Robben » 14 Dec 2013 20:26

Hi all :)

I like to be able to drag a video onto a .bat file that starts that video only on my 2nd screen (TV) via HDMI.
I found some code to put in a .bat file that I kind of understand and that is working for the video part, namely...:

Code: Select all

set vlcPath="c:\Program Files (x86)\VideoLAN\VLC\vlc.exe" %vlcPath% %1 --video-x=1921 --video-y=350 --width=300 --height=300 --fullscreen --novideo-title-show --no-embedded-video --no-qt-fs-controller
I've been trying all day to find the parameters that will use the HDMI for audio too...

At this point the amount of threads or suggestions are getting confusing and there's too much combinations to keep on trying.

If in VLC 2.1.2. I pick/change an audio device in the menu, it always works. Can't get it to work with the command line.

I'd like to know what parameters to try first and how to get the exact name of the audio device that VLC needs, please?

In VLC's menu, it is currently called "TV (NVIDIA High Definition Audi ($1,$64)" [yes, it says "Audi", not "Audio"]

So far I've tried:

--waveout-audio-device="TV"
--directx-audio-device="TV"
--directx-audio-device-name="TV"
... w. full or partial name or abbreviated, with and without quotes, with numbers instead of audio device text, etc.

Some threads seem to suggest you couldn't do this at one point.
So does this work at all in 2.1.2. and if so, how please? TY!

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: Picking output audio device w command line in .bat file

Postby Jean-Baptiste Kempf » 15 Dec 2013 02:44

Change it in preferences and then look into vlcrc to see what is the recorded name :)
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.

Robben
New Cone
New Cone
Posts: 4
Joined: 14 Dec 2013 19:43

Re: Picking output audio device w command line in .bat file

Postby Robben » 15 Dec 2013 14:30

You mean "change the name in the Windows Sound Control Panel"...?

If I change "TV" into "HDMI", that's the only part that changes.
Inside in VLC the 2nd part remains "(NVIDIA High Definition Audio)"
So at least I discovered it is "Audio" and not "Audi".

Still, none of these work in .bat ...:

--directx-audio-device="TV"
--directx-audio-device-name="TV"
--directx-audio-device="TV (NVIDIA High Definition Audio)"
--directx-audio-device-name="TV (NVIDIA High Definition Audio)"

--waveout-audio-device="TV"
--waveout-audio-device="TV (NVIDIA High Definition Audio)"

Always works via the menu...

Ludrax
Big Cone-huna
Big Cone-huna
Posts: 568
Joined: 07 Jul 2010 14:28

Re: Picking output audio device w command line

Postby Ludrax » 13 Jan 2014 13:43

If in VLC 2.1.2. I pick/change an audio device in the menu, it always works. Can't get it to work with the command line.

--directx-audio-device="TV (NVIDIA High Definition Audio)"

Always works via the menu...
and Default is not selected in menu after command :?
An' if ain't broke, then don't try to fix it...

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Picking output audio device w command line in .bat file

Postby Rémi Denis-Courmont » 20 May 2014 08:59

As JB said, you can change it in the VLC preferences, save and check the value in vlcrc.

Anyway, the DirectSound output plugin internally identifies audio device by their GUID, consistent with what most Windows software does. (The device name is not unique, so that's not an option.)
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

caleb666
New Cone
New Cone
Posts: 9
Joined: 11 May 2014 00:04

Re: Picking output audio device w command line in .bat file

Postby caleb666 » 20 May 2014 19:14

As JB said, you can change it in the VLC preferences, save and check the value in vlcrc.

Anyway, the DirectSound output plugin internally identifies audio device by their GUID, consistent with what most Windows software does. (The device name is not unique, so that's not an option.)
As I said in my thread (https://forum.videolan.org/viewtopic.php?f=14&t=119322) the command line doesn't work, even if you use the GUID from the vlcrc file!

Heck, even doing "vlc --aout=directx" doesn't work!
Can you please test this yourself? I'm not the only one getting this problem.

Ludrax
Big Cone-huna
Big Cone-huna
Posts: 568
Joined: 07 Jul 2010 14:28

Re: Picking output audio device w command line in .bat file

Postby Ludrax » 21 May 2014 10:57

As JB said, you can change it in the VLC preferences, save and check the value in vlcrc.

Anyway, the DirectSound output plugin internally identifies audio device by their GUID, consistent with what most Windows software does. (The device name is not unique, so that's not an option.)
same in 2.2.0 for new plugin? some handy command to keep automatic output module and select(in audio device menu all items are unique) :?:
An' if ain't broke, then don't try to fix it...

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Picking output audio device w command line in .bat file

Postby Rémi Denis-Courmont » 21 May 2014 13:46

Somewhat obviously, DirectSound-related command line options only work with the DirectSound plugin. If you use MMDevice or WaveOut instead, the command line parameter will be ignored.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

caleb666
New Cone
New Cone
Posts: 9
Joined: 11 May 2014 00:04

Re: Picking output audio device w command line in .bat file

Postby caleb666 » 23 May 2014 11:33

Somewhat obviously, DirectSound-related command line options only work with the DirectSound plugin. If you use MMDevice or WaveOut instead, the command line parameter will be ignored.
I simply want a command line option that will let me do the following:
* Switch the audio output module to "DirectX audio output"
* Enable "Use S/PDIF when available"
* Choose a particular output device

Is this possible with VLC or not? Because the command lines above don't do anything.

Ludrax
Big Cone-huna
Big Cone-huna
Posts: 568
Joined: 07 Jul 2010 14:28

Re: Picking output audio device w command line in .bat file

Postby Ludrax » 23 May 2014 13:51

Somewhat obviously, DirectSound-related command line options only work with the DirectSound plugin. If you use MMDevice or WaveOut instead, the command line parameter will be ignored.
wouldn't it better some more general command to tell VLC which entry from Audio Device menu to prefer w/o specifying any audio module(same command for all modules - even alsa) :?:
An' if ain't broke, then don't try to fix it...

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Picking output audio device w command line in .bat file

Postby Rémi Denis-Courmont » 24 May 2014 12:50

I don't see how you can abstract the list of devices in a functional yet platform-independent fashion.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Ludrax
Big Cone-huna
Big Cone-huna
Posts: 568
Joined: 07 Jul 2010 14:28

Re: Picking output audio device w command line in .bat file

Postby Ludrax » 26 May 2014 14:20

then i'm missing something :?

Code: Select all

add_string ("alsa-audio-device", "default",
if i understand correctly, dsound will search for matched guid of entered name(ticket 7102)

Code: Select all

add_obsolete_string( "directx-audio-device-name")
how to accomplish that every plugin can inherit same string if user enters name as displayed in device menu?

far as I can see, there is no command line option to select mmdevice(which can be selected from menu)

Code: Select all

mmdevice debug: using selected device {0.0.0.00000000}.{} mmdevice debug: display name changed: VLC media player mmdevice debug: version 2 session control unavailable
An' if ain't broke, then don't try to fix it...

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Picking output audio device w command line in .bat file

Postby Rémi Denis-Courmont » 28 May 2014 05:54

The audio output device for DirectSound is stored in the VLC preferences and identified by its GUID.

The audio output device for mmdevice is stored by the Windows session manager, not VLC. It must be somewhere in the Windows registry if you care. The ID of the VLC session is 4533f59d-59ee-00c6-ad-b2-c6-8b-50-1a-66-55.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 22 guests