Score:2

MPV no audio issue

pg flag

I installed MPV and I found that on playing any media file (mp3,mp4,webm etc.) doesn't play any audio.

I have tried to add in mpv.conf file :

# ===== Audio =====
ao=alsa
audio-device=auto

But still no audio.
What could be the issue ?

UPDATE 1

  1. Output of sudo fuser -v /dev/snd/* :
abhishek@kamal:~$ sudo fuser -v /dev/snd/*
[sudo] password for abhishek: 
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  abhishek   1210 F.... pulseaudio
/dev/snd/controlC1:  abhishek   1210 F.... pulseaudio
abhishek@kamal:~$
  1. Output of mpv -audio-device=help* :
abhishek@kamal:~$ mpv -audio-device=help
List of detected audio devices:
  'auto' (Autoselect device)
  'pulse/alsa_output.pci-0000_00_1f.3.analog-stereo' (Built-in Audio Analog Stereo)
  'alsa' (Default (alsa))
  'alsa/samplerate' (Rate Converter Plugin Using Samplerate Library)
  'alsa/speexrate' (Rate Converter Plugin Using Speex Resampler)
  'alsa/jack' (JACK Audio Connection Kit)
  'alsa/oss' (Open Sound System)
  'alsa/upmix' (Plugin for channel upmix (4,6,8))
  'alsa/vdownmix' (Plugin for channel downmix (stereo) with a simple spacialization)
  'alsa/plughw:CARD=PCH,DEV=0' (HDA Intel PCH, ALC256 Analog/Hardware device with all software conversions)
  'alsa/plughw:CARD=PCH,DEV=3' (HDA Intel PCH, HDMI 0/Hardware device with all software conversions)
  'alsa/plughw:CARD=PCH,DEV=7' (HDA Intel PCH, HDMI 1/Hardware device with all software conversions)
  'alsa/plughw:CARD=PCH,DEV=8' (HDA Intel PCH, HDMI 2/Hardware device with all software conversions)
  'alsa/plughw:CARD=PCH,DEV=9' (HDA Intel PCH, HDMI 3/Hardware device with all software conversions)
  'alsa/plughw:CARD=PCH,DEV=10' (HDA Intel PCH, HDMI 4/Hardware device with all software conversions)
  'alsa/sysdefault:CARD=PCH' (HDA Intel PCH, ALC256 Analog/Default Audio Device)
  'alsa/front:CARD=PCH,DEV=0' (HDA Intel PCH, ALC256 Analog/Front output / input)
  'alsa/surround21:CARD=PCH,DEV=0' (HDA Intel PCH, ALC256 Analog/2.1 Surround output to Front and Subwoofer speakers)
  'alsa/surround40:CARD=PCH,DEV=0' (HDA Intel PCH, ALC256 Analog/4.0 Surround output to Front and Rear speakers)
  'alsa/surround41:CARD=PCH,DEV=0' (HDA Intel PCH, ALC256 Analog/4.1 Surround output to Front, Rear and Subwoofer speakers)
  'alsa/surround50:CARD=PCH,DEV=0' (HDA Intel PCH, ALC256 Analog/5.0 Surround output to Front, Center and Rear speakers)
  'alsa/surround51:CARD=PCH,DEV=0' (HDA Intel PCH, ALC256 Analog/5.1 Surround output to Front, Center, Rear and Subwoofer speakers)
  'alsa/surround71:CARD=PCH,DEV=0' (HDA Intel PCH, ALC256 Analog/7.1 Surround output to Front, Center, Side, Rear and Woofer speakers)
  'alsa/hdmi:CARD=PCH,DEV=0' (HDA Intel PCH, HDMI 0/HDMI Audio Output)
  'alsa/hdmi:CARD=PCH,DEV=1' (HDA Intel PCH, HDMI 1/HDMI Audio Output)
  'alsa/hdmi:CARD=PCH,DEV=2' (HDA Intel PCH, HDMI 2/HDMI Audio Output)
  'alsa/hdmi:CARD=PCH,DEV=3' (HDA Intel PCH, HDMI 3/HDMI Audio Output)
  'alsa/hdmi:CARD=PCH,DEV=4' (HDA Intel PCH, HDMI 4/HDMI Audio Output)
  'alsa/dmix:CARD=PCH,DEV=0' (HDA Intel PCH, ALC256 Analog/Direct sample mixing device)
  'alsa/dmix:CARD=PCH,DEV=3' (HDA Intel PCH, HDMI 0/Direct sample mixing device)
  'alsa/dmix:CARD=PCH,DEV=7' (HDA Intel PCH, HDMI 1/Direct sample mixing device)
  'alsa/dmix:CARD=PCH,DEV=8' (HDA Intel PCH, HDMI 2/Direct sample mixing device)
  'alsa/dmix:CARD=PCH,DEV=9' (HDA Intel PCH, HDMI 3/Direct sample mixing device)
  'alsa/dmix:CARD=PCH,DEV=10' (HDA Intel PCH, HDMI 4/Direct sample mixing device)
  'alsa/usbstream:CARD=PCH' (HDA Intel PCH/USB Stream Output)
  'alsa/plughw:CARD=NVidia,DEV=3' (HDA NVidia, HDMI 0/Hardware device with all software conversions)
  'alsa/plughw:CARD=NVidia,DEV=7' (HDA NVidia, HDMI 1/Hardware device with all software conversions)
  'alsa/plughw:CARD=NVidia,DEV=8' (HDA NVidia, HDMI 2/Hardware device with all software conversions)
  'alsa/plughw:CARD=NVidia,DEV=9' (HDA NVidia, HDMI 3/Hardware device with all software conversions)
  'alsa/plughw:CARD=NVidia,DEV=10' (HDA NVidia, HDMI 4/Hardware device with all software conversions)
  'alsa/hdmi:CARD=NVidia,DEV=0' (HDA NVidia, HDMI 0/HDMI Audio Output)
  'alsa/hdmi:CARD=NVidia,DEV=1' (HDA NVidia, HDMI 1/HDMI Audio Output)
  'alsa/hdmi:CARD=NVidia,DEV=2' (HDA NVidia, HDMI 2/HDMI Audio Output)
  'alsa/hdmi:CARD=NVidia,DEV=3' (HDA NVidia, HDMI 3/HDMI Audio Output)
  'alsa/hdmi:CARD=NVidia,DEV=4' (HDA NVidia, HDMI 4/HDMI Audio Output)
  'alsa/dmix:CARD=NVidia,DEV=3' (HDA NVidia, HDMI 0/Direct sample mixing device)
  'alsa/dmix:CARD=NVidia,DEV=7' (HDA NVidia, HDMI 1/Direct sample mixing device)
  'alsa/dmix:CARD=NVidia,DEV=8' (HDA NVidia, HDMI 2/Direct sample mixing device)
  'alsa/dmix:CARD=NVidia,DEV=9' (HDA NVidia, HDMI 3/Direct sample mixing device)
  'alsa/dmix:CARD=NVidia,DEV=10' (HDA NVidia, HDMI 4/Direct sample mixing device)
  'alsa/usbstream:CARD=NVidia' (HDA NVidia/USB Stream Output)
  'jack' (Default (jack))
  'sdl' (Default (sdl))
abhishek@kamal:~$
Score:1
pg flag

After a long time, I found a solution:

  1. Run this in terminal mpv --audio-device=help
    You will see some "list of detected audio devices".
  2. Use above list and test one by one with audio-device as given below command:
    mpv --audio-device=alsa/speexrate your_video.mp4 or
    mpv --audio-device=alsa/vdownmix your_video.mp4 etc etc.

From the above test, you can find which audio-device is working for you.
Then open/create ~/.config/mpv/mpv.conf and add given below content to the mpv.conf file:

# ===== Audio =====

osc=no
ao=alsa
audio-device=alsa/speexrate

And replace alsa/speexrate with the working option for you which you have tested above.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.