aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/FFMpeg
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-14 11:26:33 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-14 11:26:33 -0400
commit10cb5a8bf6a32a84819e841719e2dcc958aec513 (patch)
treec0c25bd51c57d208c60f66881eef4ebef3142511 /MediaBrowser.ServerApplication/FFMpeg
parent5c615fa02448813499ed87f2a1c2b937c7a7dcd5 (diff)
add ability to customize ffmpeg path
Diffstat (limited to 'MediaBrowser.ServerApplication/FFMpeg')
-rw-r--r--MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloader.cs
index ae11712a5d..a026f9a497 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);