Request: Per-Device Audio SampleRate; (Alternative Samplerates per hardware)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Before requesting a new feature make sure it hasn't been requested yet.
(x) None found
Expected behavior of the wanted feature
audio-samplerate=pulse/alsa_output.pci-0000=48000,pipewire:devyyy=96000,alsa/plughw:1,0=192000 (please forgive me, i dont know device selection for pipewire)
Option to set per-device audio sample rates and/or poll hardware rate support from default/selected device to prevent resampling (sound system not mpv)
Alternative behavior of the wanted feature
alternative-sample-rate option would be a alternative, however soundsystem/hardware polling would be necessary in this case to be of any use.
Why
I use Pipewire, and I have two DAC's. One for headphones and one for Speakers. They default to and support two different sample rates. There is no way to switch between sample rates when MPV is running, resulting in any time the default output is switched in pipewire/pulse, resampling occurs in pipewire to match the hardware rate. (This results in popping, audio anomalies and other pipewire and previously pulseaudio issues)
Resampling at the sound system not only takes significant resources, it add latency and introduces issues (including sync issues). There is no way to fix this, outside using MPV profiles (which GUI clients cant support), or manually relaunching with the new samplerate and seeking back to previous point in media.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating mpv's audio output configuration and device-selection entry points; done should mean per-device sample rates can be selected or supported rates can be detected without unwanted sound-system resampling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- audio-video-rtc
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100