mpv-player / mpv

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

mpv randomly mutes my Bluetooth speaker when I try to play some video #12314

Closed c02y closed 3 months ago

c02y commented 1 year ago

Important Information

Provide following Information:

If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

Try to reproduce your issue with --no-config first. If it isn't reproducible with --no-config try to first find out which option or script causes your issue.

Describe the reproduction steps as precise as possible. It's very likely that the bug you experience wasn't reproduced by the developer because the workflow differs from your own.

Sorry I cannot reproduce this issue, since it happens totally randomly, sometimes if I play some video with MPV, my Bluetooth speaker is muted or maybe disconnected, the status of my Bluetooth device is not mute, but no sound comes out from the MPV video or other application such as Firefox which is playing YouTube video, I have to reconnect my Bluetooth speaker manually, then the sound is back to normal.

If I close the MPV window and replay the same video file, it won't happen again. This kind of issue only happens when I try to open some random video with MPV.

I know this is a tricky issue since it happens totally randomly, it already happened over ten time in the last few months.

I don't know what other info I can provide, if you need any info, please let me know.

Here is the journalctl -xe log for that period of time:

Sep 02 15:36:37 archlinux wireplumber[1023]: 0x56429a46a520: (0 missed) out of buffers on port 0 2
Sep 02 15:36:39 archlinux wireplumber[1023]: 0x56429a46a520: (93 missed) out of buffers on port 0 2
Sep 02 15:36:41 archlinux wireplumber[1023]: 0x56429a46a520: (93 missed) out of buffers on port 0 2
Sep 02 15:36:43 archlinux wireplumber[1023]: 0x56429a46a520: (93 missed) out of buffers on port 0 2
Sep 02 15:36:45 archlinux wireplumber[1023]: 0x56429a46a520: (93 missed) out of buffers on port 0 2
Sep 02 15:36:47 archlinux wireplumber[1023]: 0x56429a46a520: (93 missed) out of buffers on port 0 2
Sep 02 15:36:48 archlinux wireplumber[1023]: (bluez_output.60_AB_D2_0F_72_EB.1-127) running -> error (Received error event)
Sep 02 15:36:48 archlinux wireplumber[1023]: Failure in Bluetooth audio transport /org/bluez/hci0/dev_60_AB_D2_0F_72_EB/sep1/fd16
Sep 02 15:36:48 archlinux dbus-daemon[597]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.5771" (uid=1000 pid=1023 comm="/usr/bin/wireplumber") interface="(unset)" member="(uns>
Sep 02 15:36:48 archlinux pipewire[1022]: pw.node: (bluez_output.60_AB_D2_0F_72_EB.1-127) running -> error (Received error event)
Sep 02 15:36:54 archlinux wireplumber[1023]: RFCOMM receive command but modem not available: AT+BTRH?
Sep 02 15:36:54 archlinux wireplumber[1023]: RFCOMM receive command but modem not available: AT+XEVENT=Bose SoundLink,158
Sep 02 15:36:54 archlinux bluetoothd[769]: /org/bluez/hci0/dev_60_AB_D2_0F_72_EB/sep1/fd17: fd(29) ready
Sep 02 15:36:54 archlinux kernel: input: Bose Revolve+ SoundLink (AVRCP) as /devices/virtual/input/input153
Sep 02 15:36:54 archlinux systemd-logind[610]: Watching system buttons on /dev/input/event25 (Bose Revolve+ SoundLink (AVRCP))

Expected behavior

Actual behavior

Log file

Make a log file made with -v -v or --log-file=output.txt, paste it to https://0x0.st/ or attach it to the github issue, and replace this text with a link to it.

The issue will be closed for ignoring the issue template.

Sample files

Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ or similar sites. (Only needed if the issue cannot be reproduced without it.) Do not use garbage like "cloud storage", especially not Google Drive.

Mershl commented 9 months ago

I see (hear) the same on Fedora 39.

Connect Bose QC35II via Bluetooth, listen to something in native Firefox, start playing something in Flatpak mpv - headphones turn completly silent, playing test sounds in Gnome Settings are not heard - close Flatpak mpv, wait 10 seconds and sounds are working again.

Sporadically doing this reproducer will lead to the sound device of the headphones being completly lost when starting flatpak mpv. The headphones are still connected (confirmed bluez and gnome settings), but in sound settings only the built-in speakers of the notebook is listed. Closing mpv and turning the headphones on and off fixes the issue again.

shimeike commented 6 months ago

I think this is the corresponding issue for this topic over at pipewire with some more discussion and details: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3384

I experience the issue sporadically also (using Manjaro, mpv from Manjaro repos v0.37, mpv audio-device=pipewire) with similar log entries (out of buffers) as reported by @c02y .

The issue is difficult to reproduce reliably. As others have stated, audio is "lost" after switching back to play media from mpv after playing media in another application (usually firefox in my case) with a bluetooth audio device connected. I only recently switched to pipewire, and never experienced it previously with pulseaudio.

Mershl commented 3 months ago

pipewire-1.0.6 (released 2 days ago) contains a potential fix for this issue. Can you still reproduce the issue on 1.0.6?

c02y commented 3 months ago

@Mershl I'm using pipewire-1.0.5 (Archlinux) right now, actually this issue has been gone for quite a while, I'll add an update if it happens again.

But I got another issue recently when I'm playing some game, when I try to launch a game or open some page inside the game, my audio will change, it seems it switches to another channel or something like that, the timbre is different and I will get an audio just like you toggle Bluetooth speaker on and off. It happens in just around 2 seconds, it will be normal again. Not sure it is the issue of pipewire though.

Mershl commented 3 months ago

I've actually seen (heard) the same when trying to start certain games on Steam (the game was Zero Escape via Steam in my case).

Seems like this issue with mpv can be closed though.