Skip to content

[Triage] Pinchflat always forces m4a/AAC and ignores yt-dlp format selectors (Opus impossible) #845

@RudiVL

Description

@RudiVL

Description

Pinchflat currently forces audio extraction to m4a/AAC, even when yt-dlp is explicitly configured to prefer Opus via custom yt-dlp config files.

This makes it impossible to download native Opus audio, despite:

Opus being available from YouTube

yt-dlp correctly selecting Opus when run standalone

Pinchflat loading the custom yt-dlp config file

This behavior appears to be hard-coded and cannot be disabled via UI or config.

Environment

Pinchflat: latest (ghcr.io/kieraneglin/pinchflat:latest)

yt-dlp: 2025.12.08

Docker on Proxmox LXC

Custom yt-dlp config mounted at:

/config/extras/yt-dlp-configs/base-config.txt

Steps to Reproduce

Configure a custom yt-dlp selector in Pinchflat config:

-f ba[acodec=opus]/ba

Download a YouTube video that clearly offers Opus audio:

yt-dlp -F https://www.youtube.com/watch?v=u-HEopHeHb8

Output includes:

251 webm audio only opus 130k 48k

Verify yt-dlp inside the Pinchflat container correctly selects Opus:

yt-dlp -f "ba[acodec=opus]/ba" URL

Result:

test.webm (codec=opus)

Start the same download via Pinchflat UI.

Observed Behavior

Pinchflat always runs yt-dlp with the following hard-coded flags (from logs):

--extract-audio
--format-sort +acodec:m4a
--audio-format best
--format bestaudio/best

Full example from logs:

/usr/local/bin/yt-dlp called with:
--extract-audio
--format-sort +acodec:m4a
--audio-format best
--format bestaudio/best
--config-locations /config/extras/yt-dlp-configs/base-config.txt

Result:

Output is always .m4a

Opus is never selected

Custom yt-dlp format selectors are ignored due to CLI precedence

Expected Behavior

One of the following should be possible:

Allow disabling audio extraction

Allow preserving original audio container/codecs

Allow custom yt-dlp configs to override forced flags

Or expose an option to not force m4a/AAC

At minimum, this limitation should be clearly documented.

Why This Matters

yt-dlp explicitly supports Opus and selects it correctly

YouTube Opus streams are often higher quality than AAC

Power users expect Pinchflat’s “custom yt-dlp config” feature to actually apply

Current behavior makes Pinchflat unsuitable for high-quality audio archiving

Conclusion

This appears to be a design limitation or bug, not a configuration error.

Pinchflat always enforces:

--extract-audio

m4a/AAC preference

overriding any user-defined yt-dlp format selection

Please consider making this behavior configurable or documenting it clearly.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions