mpv Information
mpv v0.41.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.360.1
FFmpeg version: 9.0 (runtime 9.0.1)
FFmpeg library versions:
libavcodec 63.1.100 (runtime 63.1.101)
libavdevice 63.1.100 (runtime 63.1.101)
libavfilter 12.1.100 (runtime 12.1.101)
libavformat 63.1.100 (runtime 63.1.101)
libavutil 61.1.100 (runtime 61.1.101)
libswresample 7.1.100 (runtime 7.1.101)
libswscale 10.1.100 (runtime 10.1.101)
Other Information
- macOS version: macOS 27.0 (26A5421a)
- Source of mpv: Homebrew
- Latest known working version: unknown
- Issue started after the following happened: started testing AVFoundation
Screen Recording:
https://github.com/user-attachments/assets/da5ae3a4-0d47-4af3-aceb-f9b20d7c833b
Reproduction Steps
- Run
mpv --no-config --ao=avfoundation file
- Press shift+i to show playback statistics
- With
autoselect as the audio device, switch sound outputs from the menu bar or sound settings (I did this between my MacBook speakers and AirPods)
- Note the "Dropped Frames" statistic. Every time I switch audio devices, 30-40 frames are dropped and the effect on the video is very noticeable.
In the console, mpv returns
[ao/avfoundation] restarting due to system notification; this will cause desync
Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).
Consider trying `--profile=fast` and/or `--hwdec=auto` as they may help.
No combination of --profile=fast and --hwdec=auto causes any change in behavior.
This behavior happens in IINA too (libmpv)
When using my AirPods, macOS shows "Multichannel" in the sound menu. Since I don't have a second device without Spatial Audio support to test on, I'm unsure if switching between 2 devices that are both stereo only would still cause the issue.
Doing the same steps but switching audio devices from inside MPV still causes dropped frames when switching between avfoundation audio devices. However, only 0-2 frames are dropped and the impact is much smaller.
Expected Behavior
No frames should be dropped, like with CoreAudio
Actual Behavior
30 to 40 frames are dropped, with a noticeable effect on the video
Log File
mpvlog.txt
Sample Files
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov.zip
I carefully read all instruction and confirm that I did the following:
mpv Information
Other Information
Screen Recording:
https://github.com/user-attachments/assets/da5ae3a4-0d47-4af3-aceb-f9b20d7c833b
Reproduction Steps
mpv --no-config --ao=avfoundation fileautoselectas the audio device, switch sound outputs from the menu bar or sound settings (I did this between my MacBook speakers and AirPods)In the console, mpv returns
No combination of
--profile=fastand--hwdec=autocauses any change in behavior.This behavior happens in IINA too (libmpv)
When using my AirPods, macOS shows "Multichannel" in the sound menu. Since I don't have a second device without Spatial Audio support to test on, I'm unsure if switching between 2 devices that are both stereo only would still cause the issue.
Doing the same steps but switching audio devices from inside MPV still causes dropped frames when switching between avfoundation audio devices. However, only 0-2 frames are dropped and the impact is much smaller.
Expected Behavior
No frames should be dropped, like with CoreAudio
Actual Behavior
30 to 40 frames are dropped, with a noticeable effect on the video
Log File
mpvlog.txt
Sample Files
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov.zip
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt.