Jump to content

MPV not reading correct channel order from audio stream


Recommended Posts

flippyfingw
Posted (edited)

Was playing a media file in Emby Theater and could only hear background audio from my headphones, played the file (.mkv) with Windows media player (k lite codec pack with LAV package) and the audio came through fine. The specific audio track I'm having problem with has 5 channels and it seems the LAV package recognizes the correct order and downmixes the audio to stereo, while libmpv fails to do so. Tried with the standalone mpv player, to same effect (wrong channels playing). Emby theater uses libmpv with directplay on my hardware (GTX 1070, R5 2600, Windows 10 1809x64, latest nvidia drivers). Extracted the audio file which plays incorrectly on windows media player (media foundation), groove music, mpv player but plays correctly on VLC.
 
VLC can also play the file video file with correct channels and so can emby webapp on firefox, with audio directplay.
 
I'm attaching the file (.mka) here but the upload always gets stuck in a weird state I'm not allowed to upload .mka so also linking to firefox send, with maximum 20 downloads possible (limitation of firefox send). https://send.firefox.com/download/458e0ae409/#_gvUCf9gUQ2SVESQpNUroQ

Edited by flippyfingw
flippyfingw
Posted

Thanks, didn't know if that would be called circumventing the rules or something. Uploaded now with this reply

01.zip

Guest asrequested
Posted

I'll test it, later. How do you have your audio configured in Theater? A screenshot would be helpful.

Guest asrequested
Posted (edited)

Just a quick test in mpv, results in stereo.

[   0.683][v][ao/wasapi] Disabling multichannel output.
[   0.683][v][ao/wasapi] Channel layouts:
[   0.683][v][ao/wasapi]  - stereo
[   0.683][v][ao/wasapi]  - 5.1
[   0.683][v][ao/wasapi]  - 7.1
[   0.683][v][ao/wasapi]  - 4.0
[   0.683][v][ao/wasapi]  - quad
[   0.683][v][ao/wasapi]  - 5.1(side)
[   0.683][v][ao/wasapi]  - 7.1(wide)
[   0.683][v][ao/wasapi] result: stereo
[   0.683][v][ao/wasapi] Accepted as stereo s32 @ 48000hz -> stereo s32 (32/24 bits) @ 48000hz (exclusive)
[   0.700][d][ao/wasapi] Init wasapi done
[   0.700][v][ao/wasapi] device buffer: 480 samples.
[   0.700][v][ao/wasapi] using soft-buffer of 9600 samples.
[   0.700][i][cplayer] AO: [wasapi] 48000Hz stereo 2ch s32
[   0.700][v][cplayer] AO: Description: Windows WASAPI audio output (event mode)
[   0.700][d][osc] osc_init 
[   0.700][v][autoconvert] inserting resampler
[   0.700][v][swresample] format change, reinitializing resampler
[   0.700][v][swresample] 48000Hz 5.0 floatp -> 48000Hz stereo s32
[   0.700][v][swresample] Remix: 5.0 -> stereo
[   0.701][v][af] [out] 48000Hz stereo 2ch s32

I need to know how you've configured Theater's audio, to be able try and figure out what's happening.

Edited by Doofus
flippyfingw
Posted

My speaker layout was set to auto, which had gave me those issues, changed to stereo and everything works fine now. Adding screenshots anyway. Might be an issue on my end with audio device configuration. Thanks for the help :-)5c762e0fc1a90_emby_theater.png

Posted

Yea mpv docs actually suggest to always explicitly set the speaker layout rather than leaving it on auto.

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...