diff options
Diffstat (limited to 'MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs index ae11712a5..a026f9a49 100644 --- a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs +++ b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs @@ -14,6 +14,7 @@ using System.Threading.Tasks; #if __MonoCS__ using Mono.Unix.Native; #endif +using MediaBrowser.ServerApplication.IO; namespace MediaBrowser.ServerApplication.FFMpeg { @@ -39,8 +40,21 @@ namespace MediaBrowser.ServerApplication.FFMpeg _fileSystem = fileSystem; } - public async Task<FFMpegInfo> GetFFMpegInfo(IProgress<double> progress) + public async Task<FFMpegInfo> GetFFMpegInfo(StartupOptions options, IProgress<double> progress) { + var customffMpegPath = options.GetOption("-ffmpeg"); + var customffProbePath = options.GetOption("-ffprobe"); + + if (!string.IsNullOrWhiteSpace(customffMpegPath) && !string.IsNullOrWhiteSpace(customffProbePath)) + { + return new FFMpegInfo + { + ProbePath = customffProbePath, + EncoderPath = customffMpegPath, + Version = "custom" + }; + } + var rootEncoderPath = Path.Combine(_appPaths.ProgramDataPath, "ffmpeg"); var versionedDirectoryPath = Path.Combine(rootEncoderPath, FFMpegDownloadInfo.Version); |
