mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 22:43:07 +03:00
update container value
This commit is contained in:
@@ -53,7 +53,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
|
||||
if (data.format != null)
|
||||
{
|
||||
info.Container = data.format.format_name;
|
||||
info.Container = NormalizeFormat(data.format.format_name);
|
||||
|
||||
if (!string.IsNullOrEmpty(data.format.bit_rate))
|
||||
{
|
||||
@@ -195,6 +195,23 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
return info;
|
||||
}
|
||||
|
||||
private string NormalizeFormat(string format)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(format))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (string.Equals(format, "mpegvideo", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "mpeg";
|
||||
}
|
||||
|
||||
format = format.Replace("matroska", "mkv", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
private int? GetEstimatedAudioBitrate(string codec, int? channels)
|
||||
{
|
||||
if (!channels.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user