Audio channels (L-R) swapped
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c, macos
調査の方向性
Start by reading the CoreAudio output code and the history of PR #15622 and PR #18679, which changed handling of kAudioOutputUnitProperty_ChannelMap. Compare the current behavior with the attached log and reproduce using the stated stereo test and Audio MIDI Setup channel swap on macOS. Done means mpv's CoreAudio output reflects that channel map without breaking initialization.
索引モデルが issue の本文から書いたものです。
説明
mpv Information
mpv v0.42.0 Copyright © 2000-2026 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.387.0
FFmpeg version: 9.0.2
FFmpeg library versions:
libavcodec 63.1.102
libavdevice 63.1.102
libavfilter 12.1.102
libavformat 63.1.102
libavutil 61.1.102
libswresample 7.1.102
libswscale 10.1.102
Other Information
- macOS version: macOS 27.2 (26B123)
- Source of mpv: Homebrew
- Latest known working version: 0.41.0, sort of, further discussion below
- Issue started after the following happened: Audio MIDI Setup used to reverse channels
Reproduction Steps
- Download the YouTube video Stereo Test - Left/Right Audio Test for Headphones/Speakers using yt-dlp with the option -f 137+140 to obtain a format compatible with QuickTime Player
- Attach an Apple/LG UltraFine™ 27MD5KL-B monitor to a compatible Mac
- Open the Audio MIDI Setup app found in
/Applications/Utilities - Select
LG UltraFind Display Audio 2(the speakers) and click onConfigure Speakers… - Swap the left and right channels as shown here:
- Play the video with mpv and note that the left and right channels are not swapped
When reproducing the problem I ran mpv with these options:
low-batt@gag ~$ mpv --no-config --gpu-debug --log-file=output.txt ~/Movies/Stereo\ Test\ -\ Left⧸Right\ Audio\ Test\ for\ Headphones⧸Speakers\ \[YwNs1Z0qRY0\].mp4
● Video --vid=1 --vlang=eng (h264 1920x1080 30 fps 384 kbps) [default]
● Audio --aid=1 --alang=eng (aac 2ch 48000 Hz 128 kbps) [default]
AO: [coreaudio] 48000Hz fr-fl (stereo) 2ch floatp
VO: [gpu-next] 1920x1080 yuv420p
Audio device underrun detected.
AV: 00:00:20 / 00:00:20 (100%) A-V: 0.000 Dropped: 4
Exiting... (End of file)
low-batt@gag ~$
Expected Behavior
The mpv audio channel layout reflects the changes made using the Audio MIDI Setup app.
Actual Behavior
The channel layout does not reflect the configuration applied by Audio MIDI Setup.
This is sort of a reopening of closed issue #15584. I say "sort of" because the situation is now different.
The title of #15584 indicates the problem is with the coreaudio driver:
Audio channels (L-R) swapped using coreaudio, avfoundation correct
Also in #15584 I reported this:
Play the above video with QuickTime Player and VLC and note the left and right channels are reversed as expected
And this:
Running mpv with --ao=avfoundation the behavior is as expected and matches QuickTime Player and VLC.
That was under macOS 15. Much of this behavior has changed. This is the behavior I'm now experiencing under macOS 27 with the speakers swapped:
| App | Left Speaker | Right Speaker |
|---|---|---|
| ffplay 9.0.2 | Left Channel | Right Channel |
| QuickTime 10.5 (1278.2) | Left Channel | Right Channel |
| mpv 0.39.0 avfoundation | Left Channel | Right Channel |
| mpv 0.42.0 coreaudio | Left Channel | Right Channel |
| mpv 0.42.0 avfoundation | Left Channel | Right Channel |
| VLC 3.0.24 | Right Channel | Left Channel |
Now only VLC properly reflects the configuration applied in Audio MIDI Setup.
Issue #15584 was "fixed" by PR #15622. With the changes in that PR, mpv exhibited the correct behavior and reflected the configuration applied in Audio MIDI Setup. However the wrong type of value was being assigned to the kAudioOutputUnitProperty_ChannelMap property. Apparently the incorrect value just happened to provide the correct behavior. That was up until macOS 27 where Apple added validation that detected the wrong type of value was being assigned and rejected it causing coreaudio initialization to fail (issue #18384). Setting the wrong type of value has been fixed by PR #18679, without addressing the problem described in this issue.
Log File
Sample Files
I downloaded the YouTube video Left/Right Audio Test for Headphones/Speakers like so:
yt-dlp -f 137+140 https://www.youtube.com/watch?v=YwNs1Z0qRY0
I carefully read all instruction and confirm that I did the following:
- I tested and confirmed that the issue exists with the latest release version or newer.
- I provided all required information including system and mpv version.
- I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- I attached the full, untruncated log file.
- I attached the backtrace in the case of a crash.
- 主要言語
- C
- スター
- 38.2k
- フォーク
- 3.7k
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 76
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mpv-player/mpv のほかの issue
-
meta:feature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
mpv-player/mpv#18855 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
meta:feature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
mpv-player/mpv#18683 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Subtitle delay value displays "-0ms"再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンos:linux
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
mpv-player/mpv#18649 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
meta:feature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mpv-player/mpv#18464 ·
メンテナーはふだん 1 日以内に返信
-
Keyboard shortcut next and previous secondary subtitle file対応中かも @ravarnax が 225 日前に担当しました。 オープンmeta:feature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
mpv-player/mpv#17693 · コメント 5 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ChupathingyCE/chupathingyce#1550 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] SWAPDB sends no invalidation to CLIENT TRACKING clients対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
redis/redis#16302 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
slice
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
Life-Framework/Life-Framework#3878 ·
メンテナーはふだん 1 日以内に返信
-
`sha256()` returns a wrong hash when libsql-ffi is built with gcc 11 or later対応中かも @colinhacks が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tursodatabase/libsql#2333 ·
メンテナーはふだん 11 日以内に返信