首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MPV无音频问题

MPV无音频问题
EN

Ask Ubuntu用户
提问于 2023-02-06 10:03:12
回答 1查看 446关注 0票数 2

我安装了MPV,我发现在播放任何媒体文件(mp3、mp4、webm等)时都会发现不会播放任何音频。

我试图添加mpv.conf文件:

代码语言:javascript
复制
# ===== Audio =====
ao=alsa
audio-device=auto

但还是没有声音。有什么问题吗?

更新1

  1. sudo fuser -v /dev/snd/*的输出:
代码语言:javascript
复制
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. mpv -audio-device=help*的输出:
代码语言:javascript
复制
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:~$
EN

回答 1

Ask Ubuntu用户

发布于 2023-03-02 05:38:56

很长一段时间后,我找到了一个解决办法:

  1. 在终端mpv --audio-device=help中运行这个程序,您将看到一些“检测到的音频设备列表”。
  2. 使用上面的列表,用音频设备逐个测试,命令如下:mpv --audio-device=alsa/speexrate your_video.mp4mpv --audio-device=alsa/vdownmix your_video.mp4等。

通过上述测试,您可以找到适合您的音频设备。然后打开/创建~/.config/mpv/mpv.conf并将以下内容添加到mpv.conf文件中:

代码语言:javascript
复制
# ===== Audio =====

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

并用上面测试过的工作选项替换alsa/speexrate

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1453704

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档