mpv-player / mpv-player/mpv

mpv and pulse: EAC3 passthru sets sample rate to 192000 and doesn't work with pulse ao

Open
#9,603 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

os:linux
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Important Information

During EAC3 passthru mpv requests 192000 from pulse: this does not work with pulse 15 as it is expecting 48000 (and then will multiply by 4 by itself). Apparently, vlc, will request 48000.

See: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1902. In the provided fix in the pulse emulation layer there is defensive coding to skip the 4x step if the value provided exceeds 48000.

This issue was also reproduced on native pulseaudio and filed here: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1307

Provide following Information:

  • mpv version: 0.34.0 (pulseaudio 15.0, pipwire/pipewire-pulseaudio 0.3.40)
  • Linux Distribution and Version: Fedora 35
  • Source of the mpv binary: distro
  • If known which version of mpv introduced the problem:unknown
  • Window Manager and version: Gnome 41
  • GPU driver and version: NA
  • Possible screenshot or video of visual glitches: NA

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

Attempt EAC3 passthru; mpv requests 192000, (vlc requests 48000):

mpv --audio-device=pulse/alsa_output.pci-0000_01_00.1.hdmi-stereo-extra5 --audio-spdif=eac3 EAC3FILE.mkv, 
[ao] Trying audio driver 'pulse'                                             
[ao] Using preferred device 'alsa_output.pci-0000_07_00.1.hdmi-stereo-extra1' 
[ao/pulse] requested format: 192000 Hz, stereo channels, spdif-eac3
[ao/pulse] Library version: 15.0.0 
[ao/pulse] Proto: 35                                                         
[ao/pulse] Server proto: 4294967295
[ao/pulse] Channel layouts:                                                  
[ao/pulse]  - #fl                                                            
[ao/pulse]  - #fr                                                            
[ao/pulse]  - #fc                                                            
[ao/pulse]  - #lfe                                                           
[ao/pulse]  - #bl                                                            
[ao/pulse]  - #br                  
[ao/pulse]  - #flc                                                           
[ao/pulse]  - #frc                                                           
[ao/pulse]  - #bc                                                            
[ao/pulse]  - #sl                                                            
[ao/pulse]  - #sr                                                            
[ao/pulse]  - #tc         
[ao/pulse]  - #tfl                                                           
[ao/pulse]  - #tfc                                                           
[ao/pulse]  - #tfr                                                           
[ao/pulse]  - #tbl                                                           
[ao/pulse]  - #tbc                                                           
[ao/pulse]  - #tbr                                                           
[ao/pulse] result: stereo          
[ao/pulse] Stream failed. 
Expected behavior

EAC3 passthru works

Actual behavior

EAC3 passthru fails

Log file

mpv-pulse.log

Sample files

NA - any EAC3 file will work

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied mpv command with an EAC3 file and inspect the linked mpv-pulse.log, focusing on the pulse audio-output path and the requested sample rate. Compare the behavior with VLC and the linked PulseAudio and PipeWire reports; done means EAC3 passthrough succeeds through the pulse audio driver instead of failing with a 192000 Hz request.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.