2014-11-09 18:24:57 +00:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Server.Startup.Common.FFMpeg
|
|
|
|
|
{
|
|
|
|
|
public class FFMpegDownloadInfo
|
|
|
|
|
{
|
|
|
|
|
public string Version { get; set; }
|
|
|
|
|
public string FFMpegFilename { get; set; }
|
|
|
|
|
public string FFProbeFilename { get; set; }
|
|
|
|
|
public string ArchiveType { get; set; }
|
|
|
|
|
public string[] DownloadUrls { get; set; }
|
|
|
|
|
|
|
|
|
|
public FFMpegDownloadInfo()
|
|
|
|
|
{
|
|
|
|
|
DownloadUrls = new string[] { };
|
|
|
|
|
Version = "Path";
|
|
|
|
|
FFMpegFilename = "ffmpeg";
|
|
|
|
|
FFProbeFilename = "ffprobe";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static FFMpegDownloadInfo GetInfo(NativeEnvironment environment)
|
|
|
|
|
{
|
|
|
|
|
var info = new FFMpegDownloadInfo();
|
|
|
|
|
|
|
|
|
|
// Windows builds: http://ffmpeg.zeranoe.com/builds/
|
2015-04-01 04:23:34 +00:00
|
|
|
|
// Linux builds: http://johnvansickle.com/ffmpeg/
|
2014-11-09 18:24:57 +00:00
|
|
|
|
// OS X builds: http://ffmpegmac.net/
|
|
|
|
|
// OS X x64: http://www.evermeet.cx/ffmpeg/
|
|
|
|
|
|
|
|
|
|
switch (environment.OperatingSystem)
|
|
|
|
|
{
|
|
|
|
|
case OperatingSystem.Bsd:
|
|
|
|
|
break;
|
|
|
|
|
case OperatingSystem.Linux:
|
|
|
|
|
|
2015-02-13 02:30:00 +00:00
|
|
|
|
info.ArchiveType = "7z";
|
2016-02-15 17:37:34 +00:00
|
|
|
|
info.Version = "20160215";
|
2014-11-09 18:24:57 +00:00
|
|
|
|
break;
|
|
|
|
|
case OperatingSystem.Osx:
|
|
|
|
|
|
|
|
|
|
info.ArchiveType = "7z";
|
|
|
|
|
|
|
|
|
|
switch (environment.SystemArchitecture)
|
|
|
|
|
{
|
|
|
|
|
case Architecture.X86_X64:
|
2016-01-24 22:00:44 +00:00
|
|
|
|
info.Version = "20160124";
|
2014-11-09 18:24:57 +00:00
|
|
|
|
break;
|
|
|
|
|
case Architecture.X86:
|
2015-01-12 05:20:41 +00:00
|
|
|
|
info.Version = "20150110";
|
2014-11-09 18:24:57 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case OperatingSystem.Windows:
|
|
|
|
|
|
|
|
|
|
info.FFMpegFilename = "ffmpeg.exe";
|
|
|
|
|
info.FFProbeFilename = "ffprobe.exe";
|
2016-02-01 21:01:20 +00:00
|
|
|
|
info.Version = "20160131";
|
2014-11-09 18:24:57 +00:00
|
|
|
|
info.ArchiveType = "7z";
|
|
|
|
|
|
|
|
|
|
switch (environment.SystemArchitecture)
|
|
|
|
|
{
|
|
|
|
|
case Architecture.X86_X64:
|
|
|
|
|
break;
|
|
|
|
|
case Architecture.X86:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
info.DownloadUrls = GetDownloadUrls(environment);
|
|
|
|
|
|
|
|
|
|
return info;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static string[] GetDownloadUrls(NativeEnvironment environment)
|
|
|
|
|
{
|
|
|
|
|
switch (environment.OperatingSystem)
|
|
|
|
|
{
|
|
|
|
|
case OperatingSystem.Windows:
|
|
|
|
|
|
|
|
|
|
switch (environment.SystemArchitecture)
|
|
|
|
|
{
|
|
|
|
|
case Architecture.X86_X64:
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
2016-02-01 21:01:20 +00:00
|
|
|
|
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160131-win64.7z",
|
2015-11-11 15:46:30 +00:00
|
|
|
|
"http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20151109-git-480bad7-win64-static.7z"
|
2014-11-09 18:24:57 +00:00
|
|
|
|
};
|
|
|
|
|
case Architecture.X86:
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
2016-02-01 21:01:20 +00:00
|
|
|
|
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160131-win32.7z",
|
2015-11-11 15:46:30 +00:00
|
|
|
|
"http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20151109-git-480bad7-win32-static.7z"
|
2014-11-09 18:24:57 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case OperatingSystem.Osx:
|
|
|
|
|
|
|
|
|
|
switch (environment.SystemArchitecture)
|
|
|
|
|
{
|
|
|
|
|
case Architecture.X86_X64:
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
2016-01-24 22:00:44 +00:00
|
|
|
|
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/osx/ffmpeg-x64-2.8.5.7z"
|
2014-11-09 18:24:57 +00:00
|
|
|
|
};
|
|
|
|
|
case Architecture.X86:
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
2015-05-23 20:44:15 +00:00
|
|
|
|
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/osx/ffmpeg-x86-2.5.3.7z"
|
2014-11-09 18:24:57 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case OperatingSystem.Linux:
|
|
|
|
|
|
|
|
|
|
switch (environment.SystemArchitecture)
|
|
|
|
|
{
|
|
|
|
|
case Architecture.X86_X64:
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
2016-02-15 17:37:34 +00:00
|
|
|
|
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-git-20160215-64bit-static.7z"
|
2014-11-09 18:24:57 +00:00
|
|
|
|
};
|
|
|
|
|
case Architecture.X86:
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
2016-02-15 17:37:34 +00:00
|
|
|
|
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-git-20160215-32bit-static.7z"
|
2014-11-09 18:24:57 +00:00
|
|
|
|
};
|
2015-10-30 17:03:26 +00:00
|
|
|
|
case Architecture.Arm:
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
|
|
|
|
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-arm.7z"
|
|
|
|
|
};
|
2014-11-09 18:24:57 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// No version available
|
|
|
|
|
return new string[] { };
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|