Browse Source

add experimental flag for flac

nyanmisaka 4 years ago
parent
commit
536b054873
1 changed files with 7 additions and 1 deletions
  1. 7 1
      MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

+ 7 - 1
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

@@ -64,7 +64,7 @@ namespace MediaBrowser.Controller.MediaEncoding
         {
         {
             // Only use alternative encoders for video files.
             // Only use alternative encoders for video files.
             // When using concat with folder rips, if the mfx session fails to initialize, ffmpeg will be stuck retrying and will not exit gracefully
             // When using concat with folder rips, if the mfx session fails to initialize, ffmpeg will be stuck retrying and will not exit gracefully
-            // Since transcoding of folder rips is expiremental anyway, it's not worth adding additional variables such as this.
+            // Since transcoding of folder rips is experimental anyway, it's not worth adding additional variables such as this.
             if (state.VideoType == VideoType.VideoFile)
             if (state.VideoType == VideoType.VideoFile)
             {
             {
                 var hwType = encodingOptions.HardwareAccelerationType;
                 var hwType = encodingOptions.HardwareAccelerationType;
@@ -441,6 +441,12 @@ namespace MediaBrowser.Controller.MediaEncoding
                 return "libopus";
                 return "libopus";
             }
             }
 
 
+            if (string.Equals(codec, "flac", StringComparison.OrdinalIgnoreCase))
+            {
+                // flac is experimental in mp4 muxer
+                return "flac -strict -2";
+            }
+
             return codec.ToLowerInvariant();
             return codec.ToLowerInvariant();
         }
         }