mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Playback does not start on file open when default Windows audio output device is switched

Open subjut opened this issue 4 years ago • 4 comments

Important Information

Provide following Information:

  • mpv version: mpv 0.34.0-185-g0197729949
  • Windows Version: 10 21H1
  • Source of the mpv binary: Windows builds by shinchiro (releases and git) | https://sourceforge.net/projects/mpv-player-windows/files

Reproduction steps

I have separated my front and back audio output in the Realtek Audio Console. Everything works fine, if I leave the default output in Windows on the back audio jacks. But if I switch my default output in Windows from the back to the front output jack (Settings --> System --> Audio) and play a file, the file opens, but the playback does not start.

It seems that the audio thread gets shut down and not restarted again (see attached log file).

Expected behavior

The file starts to play right away on the default audio output.

Actual behavior

MPV opens the file, displays the first frame but does not start playing it. Pressing play/pause button or keyboard shortcut has no effect. Playback only starts after seeking, either on the osd or via keyboard shortcut.

Log files

log-front.txt log-back.txt

subjut avatar Feb 08 '22 12:02 subjut

Is this still an issue today?

Dudemanguy avatar Aug 09 '23 01:08 Dudemanguy

I don't have access to a system with two audio outputs right now. I can test the newest build in a couple of weeks and get back to you.

subjut avatar Aug 09 '23 09:08 subjut

I have tested mpv-x86_64-v3-20230820-git-19384e0.7z and the video starts now right away. But my OS has now also changed to Windows 11 22H2. So that might be a factor.

It does still not work correctly, though. mpv chooses the back audio output regardless of what default audio output is set in the windows sound settings control panel (see logs). Interestingly, the old release version 0.34 does select the default audio output device correctly now.

back.txt front.txt back_0.34.txt front_0.34.txt

subjut avatar Aug 24 '23 13:08 subjut

Is this still an issue today?

It is for me on Windows 10 with speakers and headphone plugged in. Audio is routed. But I solved the issue by adding

--audio-device=sdl to mpv.conf.

With mpv --audio-device=help everyone can see the available options.

OLstedt avatar Jul 05 '24 19:07 OLstedt