-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
On current Linux builds from this repo, the built-in truehd encoder reports support only up to 5.1(side) and rejects or collapses 7.1 inputs. I’m trying to convert PCM 7.1 → TrueHD 7.1 (lossless) while copying everything else, but every 7.1 attempt either errors out or ends up as 5.1. Is this purely an upstream FFmpeg limitation, or could these builds enable 7.1 TrueHD (via config/patch)? If it’s upstream-only, a confirmation would help users avoid chasing this.
Environment
ffmpeg version N-120803-g67c15cf541-20250820
OS: Linux x86_64
gcc 15.1.0
Encoder capability report
Command:
ffmpeg -hide_banner -h encoder=truehd | sed -n '/Supported channel layouts:/,/^$/p'
Output:
Supported channel layouts: mono stereo 2.1 3.0 3.1 4.0 4.1 5.0(side) 5.1(side)
(No 7.1 variants listed.)
Reproduction (minimal synth)
7.1 probe (fails):
ffmpeg -hide_banner -loglevel error -f lavfi -t 1 -i anullsrc=cl=7.1:ar=48000 -c:a truehd -strict experimental -f null -
5.1 probe (works):
ffmpeg -hide_banner -loglevel error -f lavfi -t 1 -i anullsrc=cl=5.1(side):ar=48000 -c:a truehd -strict experimental -f null -
Reproduction (real PCM 7.1 source)
Even with explicit channel reordering and planar sample format, encode fails or collapses to 5.1:
ffmpeg -hide_banner -loglevel warning -stats -i title_t00.mkv -filter_complex "[0:a:0]channelmap=map=0-0|1-1|2-2|3-3|6-4|7-5|4-6|5-7,aformat=sample_fmts=s16p[thd]" -map 0:v -map 0:s? -map_chapters 0 -map "[thd]" -map 0:a -map -0:a:0 -c:v copy -c:s copy -c:a copy -c:a:0 truehd -strict experimental -f null -
Typical error:
[truehd] Specified channel layout '7.1' is not supported by the truehd encoder
Encoder help shows only up to 5.1(side); sometimes the run proceeds but the output is 6 channels instead of 8.
What I’m asking
- Can BtbN builds be configured or patched to support 7.1 TrueHD encoding?
- If this is strictly an upstream limitation in FFmpeg’s truehd/mlpenc, please confirm here.
- If there’s a known patch/branch/flag that enables 7.1, I’m happy to test it.
Workarounds today
• FLAC 7.1 (lossless) encodes fine and Direct Plays on common Plex/Kodi clients (AVRs receive 7.1 PCM over HDMI).
• Keeping PCM 7.1 also works but results in very large files.
• For bitstreamable TrueHD 7.1, only proprietary Dolby encoders appear viable.
Thanks for the builds and for any guidance.