mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.62k stars 2.92k forks source link

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

Open subjut opened 2 years ago

subjut commented 2 years ago

Important Information

Provide following Information:

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

Dudemanguy commented 1 year ago

Is this still an issue today?

subjut commented 1 year ago

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 commented 1 year ago

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

OLstedt commented 4 months ago

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.