-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot output stereo audio to ALSA rear: #3045
Comments
I could theoretically set up an audio filter within MPV to swap the front and rear audio channels, but this is an unclean solution and does not work well with my current system which has a keybind |
A stop-gap fix is:
And then you use |
Might as well be worth mentioning that even FFmpeg itself supports playing stereo audio to ALSA's
|
I don't have such a device so I can't easily test. You should be able to duplicate ffmpeg's behavior by using |
Hmm, adding Don't know what implications this would have on playing surround sound, though. |
Probably bad ones. This rear-only chmap should work in theory. The problem is probably that the chmap code selects mono instead. But it's not clear whether libswresample supports this kind of remix at all. |
Actually, I looked at the log again, and you try to output stereo to |
Would it be reasonable to ignore channel maps completely if channel count <= 2? |
I suppose it’s not going to cause any problems, as most software does this. And there have been issues like #2905. |
If the input is already mono or stereo, or if channel map selection results in mono or stereo, then disable further use of the champ ALSA API (or rather, stop trusting its results). Then we behave like a simple application that only wants to output mono or stereo. See #3045 and #2905. I couldn't actually test these cases, but this commit is supposed to fix them.
Please retest with git master. |
When playing audio with
audio-device=alsa/rear:CARD=Live
(the intent clearly being to send the sound's stereo channels to the rear stereo output of the "Live" card), MPV chokes on the fact that these are technically "rear speakers" and refuses to output the audio file's "front" stereo audio to them.Regardless of the arguability of this behavior and whether or not ALSA should be displaying the channel map as "rear speakers" or not, MPV currently downmixes the audio to mono in this scenario.
It should be possible to send audio out the rear speakers of a computer without having to fiddle around with ALSA's arcane configuration or use PulseAudio as a stream remapper (which I am currently forced to do to get stereo sound from MPV out this card's good port.)
The text was updated successfully, but these errors were encountered: