mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-09 15:20:34 +02:00
Default output audio bitrate to 128k
This commit is contained in:
parent
be2f27a069
commit
c91f42c7a0
|
@ -155,7 +155,7 @@ namespace Jellyfin.Api.Helpers
|
||||||
return new FileContentResult(Array.Empty<byte>(), MimeTypes.GetMimeType("playlist.m3u8"));
|
return new FileContentResult(Array.Empty<byte>(), MimeTypes.GetMimeType("playlist.m3u8"));
|
||||||
}
|
}
|
||||||
|
|
||||||
var totalBitrate = state.OutputAudioBitrate ?? 0 + state.OutputVideoBitrate ?? 0;
|
var totalBitrate = (state.OutputAudioBitrate ?? 0) + (state.OutputVideoBitrate ?? 0);
|
||||||
|
|
||||||
var builder = new StringBuilder();
|
var builder = new StringBuilder();
|
||||||
|
|
||||||
|
|
|
@ -1380,24 +1380,40 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
|
|
||||||
public int? GetAudioBitrateParam(BaseEncodingJobOptions request, MediaStream audioStream)
|
public int? GetAudioBitrateParam(BaseEncodingJobOptions request, MediaStream audioStream)
|
||||||
{
|
{
|
||||||
|
if (audioStream == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (request.AudioBitRate.HasValue)
|
if (request.AudioBitRate.HasValue)
|
||||||
{
|
{
|
||||||
// Don't encode any higher than this
|
// Don't encode any higher than this
|
||||||
return Math.Min(384000, request.AudioBitRate.Value);
|
return Math.Min(384000, request.AudioBitRate.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
// Empty bitrate area is not allow on iOS
|
||||||
|
// Default audio bitrate to 128K if it is not being requested
|
||||||
|
// https://ffmpeg.org/ffmpeg-codecs.html#toc-Codec-Options
|
||||||
|
return 128000;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int? GetAudioBitrateParam(int? audioBitRate, MediaStream audioStream)
|
public int? GetAudioBitrateParam(int? audioBitRate, MediaStream audioStream)
|
||||||
{
|
{
|
||||||
|
if (audioStream == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (audioBitRate.HasValue)
|
if (audioBitRate.HasValue)
|
||||||
{
|
{
|
||||||
// Don't encode any higher than this
|
// Don't encode any higher than this
|
||||||
return Math.Min(384000, audioBitRate.Value);
|
return Math.Min(384000, audioBitRate.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
// Empty bitrate area is not allow on iOS
|
||||||
|
// Default audio bitrate to 128K if it is not being requested
|
||||||
|
// https://ffmpeg.org/ffmpeg-codecs.html#toc-Codec-Options
|
||||||
|
return 128000;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetAudioFilterParam(EncodingJobInfo state, EncodingOptions encodingOptions, bool isHls)
|
public string GetAudioFilterParam(EncodingJobInfo state, EncodingOptions encodingOptions, bool isHls)
|
||||||
|
|
Loading…
Reference in a new issue