Jump to content

How to choose audio output device?


stplatt

Recommended Posts

stplatt

I need Emby theater to output audio to a non-default windows audio device, but I don't see a way to change the device in the audio settings. Below is a screenshot of all available options:

 

xlsAs7z.png

 

 

 

I know there used to be an option in a past version, I feel like I must be missing something obvious. Thanks for any help.

Link to comment
Share on other sites

Hi, it's not currently in there although we an restore it for a future update, thanks.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
stplatt

Hi, it's not currently in there although we an restore it for a future update, thanks.

 

Any progress on that? It's the only thing keeping me from switching to Emby theater full time. Been having issues with Kodi and would love to make the switch.

Edited by stplatt
Link to comment
Share on other sites

Guest asrequested

You can add it in your mpv.conf, if you want. I have. This is mine. But it won't work if you use MadVR. This is for MPV

audio-device=wasapi/SC-95 (Intel(R) Display Audio)

59a62528c8d7e_Snapshot_187.jpg

Edited by Doofus
  • Like 1
Link to comment
Share on other sites

  • 1 month later...
stplatt

Where do I put the mpv.conf file? Also what's the easiest way to get the specific device name? 

 

I have tried to place the file into C:\Users\MyName\AppData\Roaming\Emby-Theater\system

 

If that is the right location, I guess I have the wrong device name because it is still playing on my default audio device.

 

 

Edit: Nevermind, I found the right location for mpv.conf is with mpv.exe (duh) in the folder: C:\Users\MyName\AppData\Roaming\Emby-Theater\system\x64\mpv

 

It works, thanks!

Edited by stplatt
Link to comment
Share on other sites

stplatt

@@stplatt

 

You may want to put the mpv.conf, here

 

C:\Users\MyName\AppData\Roaming\mpv

 

That way, it won't get written over

Thank you

Link to comment
Share on other sites

Guest asrequested

And I'm just learning that Theater is probably switching to a portable config. If that happens, you'll need to put it in that folder.

Link to comment
Share on other sites

  • 1 year later...
lifespeed

You can add it in your mpv.conf, if you want. I have. This is mine. But it won't work if you use MadVR. This is for MPV

audio-device=wasapi/SC-95 (Intel(R) Display Audio)

or

audio-device=wasapi/{bdfd81a5-9901-477a-92d2-a4e2cb3edb35}

59a62528c8d7e_Snapshot_187.jpg

 

I would like to make Emby/MPV use WASAPI based on the (possibly faulty) presumption that this would support bit-perfect output to my analog soundcard (Essence STX II 7.1) at the file bit depth and sample rate without a need for me to manually re-configure windows sound to match the various audio configurations.

 

What I am not sure is how to use the instructions above to identify the exact name of the audio device to put in the mpv.conf file.  Where do I enter audio-device=help to list the audio devices?

Link to comment
Share on other sites

 

 

Where do I enter audio-device=help to list the audio devices?

 

That would be by interacting with the mpv executable on the command line.

Link to comment
Share on other sites

lifespeed

That would be by interacting with the mpv executable on the command line.

I can't find the MPV executable, I looked in program files and C:\Users\user1\AppData\Roaming\Emby-Theater\system\electronapp\plugins\mpvplayer

Link to comment
Share on other sites

lifespeed

Thanks, now I just have to figure out if it is actually using WASAPI and using the appropriate bit rate.

 

Hey, @, is there a way to tell MPV to use WASAPI exclusive mode?  I think this would cause the soundcard to play the audio at whatever bitrate the file contained.

Edited by lifespeed
Link to comment
Share on other sites

Guest asrequested

I don't think you're going to get what you want. You'd need to bitstream the audio to that card, and it doesn't look like it supports all the audio codecs. This means everything will be decoded by software, which mpv can/will do. But that it is all subject to the windows audio config. You should be bitstreaming the audio directly to your receiver. But using the info I posted above, that will use your audio card, exclusively. You can check the mpv log to confirm it. You'll see something like this;

[   0.713][v][ao] Trying audio driver 'wasapi'
[   0.713][v][ao] Using preferred device 'marantz-AVR (NVIDIA High Definition Audio)'
[   0.713][v][ao/wasapi] requested format: 192000 Hz, 7.1 channels, spdif-truehd
[   0.713][d][ao/wasapi] Init wasapi
[   0.713][d][ao/wasapi] Find device 'marantz-AVR (NVIDIA High Definition Audio)'
[   0.719][v][ao/wasapi] Selecting device by name: 'marantz-AVR (NVIDIA High Definition Audio)'
[   0.719][v][ao/wasapi] Selecting device '{8e7d87f0-6c1b-4a30-ad52-87708369ca9d}' (marantz-AVR (NVIDIA High Definition Audio))
[   0.719][v][ao/wasapi] Monitoring changes in device {0.0.0.00000000}.{8e7d87f0-6c1b-4a30-ad52-87708369ca9d}

But if you don't bitstream, mpv will decode the audio, not your audio card.

Link to comment
Share on other sites

lifespeed

I don't have or want a receiver, I connect the sound card directly to 4 channels of ADCOM GFA5500 amplifier and Martin-Logan Quest Z front speakers - the side speakers are more pedestrian.  It would be silly to have this sound card only to send bits out over HDMI.  There is nothing wrong with the software decoding DTSHD, etc, I would just like to relieve myself of the drudgery of changing audio bit rates/depths to match the media while sending the unmolested data to the soundcard.

 

Looking at the log file below of Emby playing a rock concert MKV file with 96/24 audio, it does appear as though it is dropping the bit rate down to the Windows-configured 48KHz.  I wish there  was some way to get the sound card to accept whatever bit rate is sent.  I thought exclusive mode would do this, as it is not required to accept sound from other sources, presumably all at a common bit rate.

 

Can MPV be configured for WASAPI exclusive mode?  As always, your expertise in enthusiast-level configuration is appreciated!

[   0.617][v][ao] Trying audio driver 'wasapi'
[   0.617][v][ao] Using preferred device '{edd9b2bc-e144-4577-81ef-ab33074e02aa}'
[   0.617][v][ao/wasapi] requested format: 96000 Hz, 5.1(side) channels, s32
[   0.617][d][ao/wasapi] Init wasapi
[   0.617][d][ao/wasapi] Find device '{edd9b2bc-e144-4577-81ef-ab33074e02aa}'
[   0.622][v][ao/wasapi] Selecting device by id: '{edd9b2bc-e144-4577-81ef-ab33074e02aa}'
[   0.622][v][ao/wasapi] Selecting device '{edd9b2bc-e144-4577-81ef-ab33074e02aa}' (Speakers (ASUS Essence STX II Audio Device))
[   0.622][v][ao/wasapi] Monitoring changes in device {0.0.0.00000000}.{edd9b2bc-e144-4577-81ef-ab33074e02aa}
[   0.626][d][ao/wasapi] Init wasapi thread
[   0.626][d][ao/wasapi] Activating pAudioClient interface
[   0.629][d][ao/wasapi] Probing formats
[   0.629][v][ao/wasapi] Trying 5.1(side) s32 (32/32 bits) @ 96000hz (shared) -> ok
[   0.629][v][ao/wasapi] Closest match is 5.1(side) float (32/32 bits) @ 48000hz
[   0.629][v][ao/wasapi] Accepted as 5.1(side) float @ 48000hz -> 5.1(side) float (32/32 bits) @ 48000hz (shared)
[   0.629][d][ao/wasapi] Fixing format
[   0.629][d][ao/wasapi] IAudioClient::GetDevicePeriod
[   0.629][v][ao/wasapi] Device period: 10 ms
[   0.629][d][ao/wasapi] IAudioClient::Initialize
[   0.655][d][ao/wasapi] IAudioClient::Initialize pRenderClient
[   0.655][d][ao/wasapi] IAudioClient::Initialize IAudioClient_SetEventHandle
[   0.655][d][ao/wasapi] IAudioClient::Initialize IAudioClient_GetBufferSize
[   0.655][v][ao/wasapi] Buffer frame count: 2400 (50 ms)
[   0.655][v][ao/wasapi] IAudioClock::GetFrequency gave a frequency of 1152000.
[   0.657][d][ao/wasapi] IAudioClient::Initialize pAudioVolume
[   0.658][d][ao/wasapi] Entering dispatch loop
[   0.658][d][ao/wasapi] Init wasapi done
[   0.658][v][ao/wasapi] device buffer: 2400 samples.
[   0.658][v][ao/wasapi] using soft-buffer of 9600 samples.
[   0.658][i][cplayer] AO: [wasapi] 48000Hz 5.1(side) 6ch float
[   0.658][v][cplayer] AO: Description: Windows WASAPI audio output (event mode)

Here we see the 96/24 sound is accepted when Windows has been set to that sample rate.

[   0.606][d][ao/wasapi] Probing formats
[   0.606][v][ao/wasapi] Trying 5.1(side) s32 (32/32 bits) @ 96000hz (shared) -> ok
[   0.606][v][ao/wasapi] Accepted as 5.1(side) s32 @ 96000hz -> 5.1(side) s32 (32/32 bits) @ 96000hz (shared)
Edited by lifespeed
Link to comment
Share on other sites

Guest asrequested

But that's what I was trying to say, WASAPI is Windows audio. mpv will decode to whatever Windows audio is configured to.

 

Looking at that log snippet, you're using the numeric ID. Try this. Make that audio card the default. Delete the audio device config from the mpv.conf. Play your video, and post the mpv log. I'll take a look at it.

Link to comment
Share on other sites

lifespeed

Same results as before, without the WASAPI entry in mpv.conf, it tries 96KHz but sets it to 48KHz instead due to windows config.  I think there is a possibility WASAPI exclusive mode will accept the bitrate of the media.  But MPV is not using exclusive mode by default.

[   0.805][v][ao] Trying audio driver 'wasapi'
[   0.805][v][ao/wasapi] requested format: 96000 Hz, 5.1(side) channels, s32
[   0.805][d][ao/wasapi] Init wasapi
[   0.805][d][ao/wasapi] Find device ''
[   0.808][v][ao/wasapi] No device specified. Selecting default.
[   0.811][v][ao/wasapi] Selecting device '{edd9b2bc-e144-4577-81ef-ab33074e02aa}' (Speakers (ASUS Essence STX II Audio Device))
[   0.811][v][ao/wasapi] Monitoring changes in device {0.0.0.00000000}.{edd9b2bc-e144-4577-81ef-ab33074e02aa}
[   0.815][d][ao/wasapi] Init wasapi thread
[   0.815][d][ao/wasapi] Activating pAudioClient interface
[   0.818][d][ao/wasapi] Probing formats
[   0.818][v][ao/wasapi] Trying 5.1(side) s32 (32/32 bits) @ 96000hz (shared) -> ok
[   0.818][v][ao/wasapi] Closest match is 5.1(side) float (32/32 bits) @ 48000hz
[   0.818][v][ao/wasapi] Accepted as 5.1(side) float @ 48000hz -> 5.1(side) float (32/32 bits) @ 48000hz (shared)
[   0.818][d][ao/wasapi] Fixing format
[   0.819][d][ao/wasapi] IAudioClient::GetDevicePeriod
[   0.819][v][ao/wasapi] Device period: 10 ms
[   0.819][d][ao/wasapi] IAudioClient::Initialize
[   0.852][d][ao/wasapi] IAudioClient::Initialize pRenderClient
[   0.852][d][ao/wasapi] IAudioClient::Initialize IAudioClient_SetEventHandle
[   0.852][d][ao/wasapi] IAudioClient::Initialize IAudioClient_GetBufferSize
[   0.852][v][ao/wasapi] Buffer frame count: 2400 (50 ms)
[   0.852][v][ao/wasapi] IAudioClock::GetFrequency gave a frequency of 1152000.
[   0.854][d][ao/wasapi] IAudioClient::Initialize pAudioVolume
[   0.854][d][ao/wasapi] Entering dispatch loop
[   0.854][d][ao/wasapi] Init wasapi done
[   0.854][v][ao/wasapi] device buffer: 2400 samples.
[   0.854][v][ao/wasapi] using soft-buffer of 9600 samples
Link to comment
Share on other sites

lifespeed

And here we have 44.1/16 CD audio, same result - 48KHz.

 

 

[   0.570][v][ao] Trying audio driver 'wasapi'
[   0.570][v][ao/wasapi] requested format: 44100 Hz, stereo channels, s16p
[   0.570][d][ao/wasapi] Init wasapi
[   0.570][d][ao/wasapi] Find device ''
[   0.579][v][ao/wasapi] No device specified. Selecting default.
[   0.585][v][ao/wasapi] Selecting device '{edd9b2bc-e144-4577-81ef-ab33074e02aa}' (Speakers (ASUS Essence STX II Audio Device))
[   0.585][v][ao/wasapi] Monitoring changes in device {0.0.0.00000000}.{edd9b2bc-e144-4577-81ef-ab33074e02aa}
[   0.592][d][ao/wasapi] Init wasapi thread
[   0.593][d][ao/wasapi] Activating pAudioClient interface
[   0.596][d][ao/wasapi] Probing formats
[   0.597][v][ao/wasapi] Trying stereo s16 (16/16 bits) @ 44100hz (shared) -> ok
[   0.597][v][ao/wasapi] Closest match is 5.1(side) float (32/32 bits) @ 48000hz
[   0.597][v][ao/wasapi] Accepted as 5.1(side) float @ 48000hz -> 5.1(side) float (32/32 bits) @ 48000hz (shared)
[   0.597][d][ao/wasapi] Fixing format
[   0.597][d][ao/wasapi] IAudioClient::GetDevicePeriod
[   0.597][v][ao/wasapi] Device period: 10 ms
[   0.597][d][ao/wasapi] IAudioClient::Initialize
[   0.656][i][refreshrate] Current Refresh Rate -: 60
[   0.656][i][refreshrate] Saving Initial Refresh Rate -: 60
[   0.656][i][refreshrate] Querying Device Refresh Rates...
[   0.677][d][ao/wasapi] IAudioClient::Initialize pRenderClient
[   0.677][d][ao/wasapi] IAudioClient::Initialize IAudioClient_SetEventHandle
[   0.677][d][ao/wasapi] IAudioClient::Initialize IAudioClient_GetBufferSize
[   0.677][v][ao/wasapi] Buffer frame count: 2400 (50 ms)
[   0.677][v][ao/wasapi] IAudioClock::GetFrequency gave a frequency of 1152000.
[   0.679][d][ao/wasapi] IAudioClient::Initialize pAudioVolume
[   0.679][d][ao/wasapi] Entering dispatch loop
[   0.679][d][ao/wasapi] Init wasapi done
[   0.679][v][ao/wasapi] device buffer: 2400 samples.
[   0.679][v][ao/wasapi] using soft-buffer of 9600 samples.
[   0.679][i][cplayer] AO: [wasapi] 48000Hz 5.1(side) 6ch float
[   0.679][v][cplayer] AO: Description: Windows WASAPI audio output (event mode)
Link to comment
Share on other sites

lifespeed

Here is the line where it shows it is using shared mode.  Which can be discerned simply by playing another audio source while Emby is playing.  Both Emby and the other windows audio source can be heard.

 

Edit:  Here is a Microsoft article on the subject.

[   0.597][v][ao/wasapi] Accepted as 5.1(side) float @ 48000hz -> 5.1(side) float (32/32 bits) @ 48000hz (shared)
Edited by lifespeed
Link to comment
Share on other sites

Guest asrequested

Exclusive mode is the device, not parameters. The parameters are set by Windows. As I said, you need to choose that device/card, and bitstream to it. But it needs to be able to decode the audio, and I don't think it has the ability to do that. At least not all of them. Just because it's an internal card/device, doesn't change how the mechanics, work. Bitstreaming isn't exclusive to HDMI. You need to digitally send the audio to the card, and let the card decode it to analog. 

Link to comment
Share on other sites

lifespeed

Both MPC-BE and Foobar2000 support WASAPI exclusive mode with my soundcard, playing FLAC and DTSHD.  Yes, the software is decoding but the decoded bits are still "streamed" to the soundcard.  I know the soundcard doesn't decode DTSHD, it doesn't need to.

post-44858-0-27720000-1549095437_thumb.png

Edited by lifespeed
Link to comment
Share on other sites

lifespeed

Do you have the audio exclusive option enabled?

Yes, it is shown in the MPC-BE screenshot.  Foobar2000 lets me do the same thing.  Or maybe you mean windows sound configuration?  The answer is still yes.  I would like to know if MPV supports configuration for exclusive mode.  In the log file it clearly states it is using shared mode.

 

I know exclusive mode works because when I play audio in a web page while another application has the soundcard in exclusive mode the web page audio (or windows sounds for that matter) are not heard.

Edited by lifespeed
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...