mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
New: Improve video stream formatting
(cherry picked from commit 39350ed0de4aca769ef7661f1dce08f9f462e7c3)
This commit is contained in:
parent
85aecbe67e
commit
9a23b7f0fc
@ -25,6 +25,7 @@ public class FormatVideoCodecFixture : TestBase
|
||||
[TestCase("msmpeg4, DIV3", "Movie the Title (1976) 360p MPEG Audio.avi", "DivX")]
|
||||
[TestCase("msmpeg4v2, DIV3", "Movie the Title (1976) 360p MPEG Audio.avi", "DivX")]
|
||||
[TestCase("msmpeg4v3, DIV3", "Movie the Title (1976) 360p MPEG Audio.avi", "DivX")]
|
||||
[TestCase("vp6f, 4", "Movie the Title (1976) 360p MPEG Audio.flv", "VP6")]
|
||||
[TestCase("vp6, 4", "Top Gear - S12E01 - Lorries - SD TV.flv", "VP6")]
|
||||
[TestCase("vp7, VP70", "Movie the Title.avi", "VP7")]
|
||||
[TestCase("vp8, V_VP8", "Movie the Title.mkv", "VP8")]
|
||||
|
@ -154,7 +154,7 @@ public static string FormatAudioCodec(MediaInfoModel mediaInfo, string sceneName
|
||||
}
|
||||
|
||||
Logger.ForDebugEvent()
|
||||
.Message("Unknown audio format: '{0}' in '{1}'.", mediaInfo.RawStreamData, sceneName)
|
||||
.Message("Unknown audio format: '{0}' in '{1}'. Streams: {2}", audioFormat, sceneName, mediaInfo.RawStreamData)
|
||||
.WriteSentryWarn("UnknownAudioFormatFFProbe", mediaInfo.ContainerFormat, mediaInfo.AudioFormat, audioCodecID)
|
||||
.Log();
|
||||
|
||||
@ -236,8 +236,12 @@ public static string FormatVideoCodec(MediaInfoModel mediaInfo, string sceneName
|
||||
return "AV1";
|
||||
}
|
||||
|
||||
if (videoFormat == "vp6" ||
|
||||
videoFormat == "vp7" ||
|
||||
if (videoFormat.Contains("vp6"))
|
||||
{
|
||||
return "VP6";
|
||||
}
|
||||
|
||||
if (videoFormat == "vp7" ||
|
||||
videoFormat == "vp8" ||
|
||||
videoFormat == "vp9")
|
||||
{
|
||||
@ -257,13 +261,15 @@ public static string FormatVideoCodec(MediaInfoModel mediaInfo, string sceneName
|
||||
videoFormat == "rv20" ||
|
||||
videoFormat == "rv30" ||
|
||||
videoFormat == "rv40" ||
|
||||
videoFormat == "cinepak")
|
||||
videoFormat == "cinepak" ||
|
||||
videoFormat == "rawvideo" ||
|
||||
videoFormat == "msvideo1")
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
Logger.ForDebugEvent()
|
||||
.Message("Unknown video format: '{0}' in '{1}'.", mediaInfo.RawStreamData, sceneName)
|
||||
.Message("Unknown video format: '{0}' in '{1}'. Streams: {2}", videoFormat, sceneName, mediaInfo.RawStreamData)
|
||||
.WriteSentryWarn("UnknownVideoFormatFFProbe", mediaInfo.ContainerFormat, videoFormat, videoCodecID)
|
||||
.Log();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user