|
@@ -13,8 +13,8 @@ namespace MovieBarcodeGenerator {
|
|
|
private static log4net.ILog log = log4net.LogManager.GetLogger("SharpFF");
|
|
|
|
|
|
public static void ExecuteCommand(string parameters) {
|
|
|
- if (String.IsNullOrEmpty(ffmpegPath)) {
|
|
|
- log.ErrorFormat("FFmpeg was not found at '{0}'.", ffmpegPath);
|
|
|
+ if (String.IsNullOrEmpty(ffmpegPath) || !File.Exists(Path.Combine(ffmpegPath, "ffmpeg.exe"))) {
|
|
|
+ log.FatalFormat("FFmpeg was not found at '{0}'.", ffmpegPath);
|
|
|
throw new Exception("Path to ffmpeg not specified. Set ffmpeg path (excluding exe) before attempting to use SharpFF.");
|
|
|
}
|
|
|
Process p = new Process();
|
|
@@ -28,8 +28,8 @@ namespace MovieBarcodeGenerator {
|
|
|
}
|
|
|
|
|
|
public static decimal GetDuration(string videoPath) {
|
|
|
- if (String.IsNullOrEmpty(ffmpegPath)) {
|
|
|
- log.ErrorFormat("FFmpeg was not found at '{0}'.", ffmpegPath);
|
|
|
+ if (String.IsNullOrEmpty(ffmpegPath) || !File.Exists(Path.Combine(ffmpegPath, "ffmpeg.exe"))) {
|
|
|
+ log.FatalFormat("FFmpeg was not found at '{0}'.", ffmpegPath);
|
|
|
throw new Exception("Path to ffmpeg not specified. Set ffmpeg path (excluding exe) before attempting to use SharpFF.");
|
|
|
}
|
|
|
Process p = new Process();
|