No audio when playing videos using mpv or vlc but same video will play audio and video in firefox
Description of Problem:
I noticed recently when I played various MP4 video files that I was only getting video and no audio. Sending the same video file to Firefox both audio + video played correctly.
How Reproducible:
- I did some testing and decided to open the same MP4 file via terminal in MPV via command line and explicitly requestion pipewire audio (still no sound):
❯ mpv --ao=pipewire 'Dune Imperium - How To Play.mp4'
(+) Video --vid=1 (*) (h264 1280x720 29.970fps)
(+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
AO: [pipewire] 44100Hz stereo 2ch floatp
VO: [gpu] 1280x720 yuv420p
Exiting... (Quit)
- I also explicitly had the file use 'pulse' and 'alsa' and in both cases audio + video played correctly:
❯ mpv --ao=pulse 'Dune Imperium - How To Play.mp4'
(+) Video --vid=1 (*) (h264 1280x720 29.970fps)
(+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 1280x720 yuv420p
Exiting... (Quit)
❯ mpv --ao=alsa 'Dune Imperium - How To Play.mp4'
(+) Video --vid=1 (*) (h264 1280x720 29.970fps)
(+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
AO: [alsa] 44100Hz stereo 2ch float
VO: [gpu] 1280x720 yuv420p
Exiting... (Quit)
Expected Results:
Video files should also play the encoded audio when using pipewire.
Operating System:
Distro: EndeavourOS base: Arch Linux Kernel: 6.6.16-1-lts arch: x86_64 bits: 64 compiler: gcc v: 13.2.1 Desktop: GNOME v: 45.3 tk: GTK v: 3.24.41 wm: gnome-shell dm: GDM v: 45.0.1
Application Versions:
Firefox 122.01 ❯ pipewire --version pipewire Compiled with libpipewire 1.0.3 Linked with libpipewire 1.0.3
mpv --version mpv v0.37.0 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects built on Jan 19 2024 09:09:45 libplacebo version: v6.338.2 FFmpeg version: n6.1.1 FFmpeg library versions: libavutil 58.29.100 libavcodec 60.31.102 libavformat 60.16.100 libswscale 7.5.100 libavfilter 9.12.100 libswresample 4.12.100