Open andrewbaxter opened 2 days ago
I think this is the same as https://github.com/mpv-player/mpv/issues/9535 maybe? I.e. I don't think the issue with audio not playing is platform/driver specific. AFAIK this has always happened.
I'm not sure but my guess would be the audio sink hasn't finished initializing before playback starts and some audio data goes into the void. I'm not sure initialization is even reported, or if it's possible to solve this other than by just sleeping a bit before playing for short audio files (where the important audio information is at the very start).
Doing -loop=inf
makes the sound audible, although in looped fashion.
The samples play fine for me on pipewire and alsa on git master.
I'm pretty certain this is a pipewire issue
set the following options in your pipewire.conf
default.clock.allowed-rates = [ 44100 48000 ]
default.clock.quantum = 128
I can't hear it with a ridiculously high default quantum (>1000) but I can at lower quantums.
You should be able to reproduce with just pw-play
as well.
Try pw-play then try it with PIPEWIRE_QUANTUM=128/44100 pw-play click_pixabay_21156.ogg
Thanks for the replies!
So, I just tried pw-play
with no env overrides and it produced sound. I reran mpv and it didn't play anything. I reran mpv again and it played, as it did in subsequent invocations.
I did sysctl vm.drop_caches=3
then mpv and it failed to play again, then subsequent invocations played fine.
I did
sysctl vm.drop_caches=3
then mpv and it failed to play again, then subsequent invocations played fine.
Can you do this and also restart pipewire systemctl --use restart pipewire
then play the file with pw-play?
I 1. dropped caches, 2. systemctl --user restart pipewire
, 3. ran pw-play
and it produced audio on the first invocation. To confirm, I ran mpv
again and on the first invocation it didn't produce audio.
I will note that my testing environment isn't super clean... browsers open, various editors, etc. I made sure nothing was playing audio first before dropping caches and restarting pipewire.
And what if you reduce the default quantum size in your pipewire config? Does mpv play it then? Also make sure you aren't setting any pipewire options in mpv config
Ah sorry, I should have tried that earlier. I just tried it now and the pipewire config file didn't work (read: I didn't have an existing config and I'm not exactly sure where to put it) but PIPEWIRE_QUANTUM=128/44100 mpv click_pixabay_21156.ogg
did work on the first invocation after dropping caches. So it seems like PIPEWIRE_QUANTUM=128/44100
does help.
mpv Information
Other Information
Reproduction Steps
mpv clip_pixabay_21156.ogg
Expected Behavior
To hear the sound
Actual Behavior
I hear nothing
Log File
If there's something specific in the log I can provided it. Here's the end
Sample Files
sample.zip
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.