Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Dolby AC-4 decoder #11486

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Jellyfin.Api/Controllers/DynamicHlsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1735,6 +1735,13 @@ private string GetAudioArguments(StreamState state)
}
}

if (state.AudioStream is not null && state.AudioStream.CodecTag.Equals("ac-4", StringComparison.Ordinal))
{
// ac-4 audio tends to hava a super weird sample rate that will fail most encoders
// force resample it to 48KHz
args += " -ar 48000";
}

if (state.OutputAudioSampleRate.HasValue)
{
args += " -ar " + state.OutputAudioSampleRate.Value.ToString(CultureInfo.InvariantCulture);
Expand Down
1 change: 1 addition & 0 deletions MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public partial class EncoderValidator
"msmpeg4",
"dca",
"ac3",
"ac4",
"aac",
"mp3",
"flac",
Expand Down
Loading