mpv-player / mpv-player/mpv

Coreaudio_exclusive only work with audio-format=s16 on a 24bit external DAC

Open
#4,478 41 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

mpv version and platform

MacOS 10.12.5 (16F73), MPV Git 7e889e5

Reproduction steps

Run with -no-config -audio-format=s16 -audio-exclusive=yes and -no-config -audio-format=s24 -audio-exclusive=yes

The specification of my DAC. It is 24 bit compatible.
"[ 0.292][v][ao/coreaudio_exclusive] - 192000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 176400.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 96000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 88200.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 48000.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 44100.0Hz 24bit mcpl [4][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 192000.0Hz 16bit mcpl [12][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 176400.0Hz 16bit mcpl [12][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 96000.0Hz 16bit mcpl [12][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 88200.0Hz 16bit mcpl [12][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 48000.0Hz 16bit mcpl [12][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 44100.0Hz 16bit mcpl [12][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 192000.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 176400.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 96000.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 88200.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 48000.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 44100.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 0.292][v][ao/coreaudio_exclusive] - 192000.0Hz 16bit mcpl [76][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 176400.0Hz 16bit mcpl [76][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 96000.0Hz 16bit mcpl [76][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 88200.0Hz 16bit mcpl [76][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 48000.0Hz 16bit mcpl [76][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)
[ 0.292][v][ao/coreaudio_exclusive] - 44100.0Hz 16bit mcpl [76][4bpp][1fbp][4bpf][2ch] int LE S packed (s16)"

Expected behavior

Both audio-format=s16 and audio-format=s24should work properly

Actual behavior

audio-format=s16 works fine. audio-format=s24 terminates.

Error message:
"[ 1.009][v][ao/coreaudio_exclusive] virtual format 96000.0Hz 24bit mcpl [68][8bpp][1fbp][8bpf][2ch] int LE S (-)
[ 1.009][e][ao/coreaudio_exclusive] hardware format not supported
[ 1.009][e][ao] Failed to initialize audio driver 'coreaudio'
[ 1.009][e][cplayer] Could not open/initialize audio device -> no sound.
[ 1.009][v][ad] Uninit audio decoder.
[ 1.009][v][af] Removing filter lavrresample
[ 1.010][i][cplayer] Audio: no audio
[ 1.010][v][cplayer] playback restart complete
[ 1.010][v][cplayer] EOF code: 1
[ 1.010][v][vd] Uninit video.
[ 1.010][v][cplayer] finished playback, audio output initialization failed (reason 4)"

Log file

s16.log
s24.log

Sample files

Sample files needed to reproduce this issue can be uploaded to https://0x0.st/
or similar sites. (Only needed if the issue cannot be reproduced without it.)

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 at the ao/coreaudio_exclusive audio-output entry point and compare the s16 and s24 reproduction commands with the linked s16.log and s24.log output. Done means playback initializes successfully with audio-format=s24 as well as audio-format=s16 on the reported 24-bit DAC.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, macos
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.