diff --git a/FFMpegCore.Test/FFMpegCore.Test.csproj b/FFMpegCore.Test/FFMpegCore.Test.csproj
index b3defdd..d7fa1ad 100644
--- a/FFMpegCore.Test/FFMpegCore.Test.csproj
+++ b/FFMpegCore.Test/FFMpegCore.Test.csproj
@@ -6,6 +6,16 @@
false
+
+
+
+
+
+
+ Always
+
+
+
diff --git a/FFMpegCore.Test/ffmpeg.config.json b/FFMpegCore.Test/ffmpeg.config.json
new file mode 100644
index 0000000..7d50e79
--- /dev/null
+++ b/FFMpegCore.Test/ffmpeg.config.json
@@ -0,0 +1,3 @@
+{
+ "RootDirectory": ".//FFMPEG//bin"
+}
\ No newline at end of file
diff --git a/FFMpegCore/FFMPEG/FFBase.cs b/FFMpegCore/FFMPEG/FFBase.cs
index 03bb3d7..cc52b39 100644
--- a/FFMpegCore/FFMPEG/FFBase.cs
+++ b/FFMpegCore/FFMPEG/FFBase.cs
@@ -1,17 +1,25 @@
-using System;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
using System.Diagnostics;
+using System.IO;
using System.Linq;
namespace FFMpegCore.FFMPEG
{
public abstract class FFBase : IDisposable
{
+ private static string _ConfigFile = "./ffmpeg.config.json";
+ private static string _DefaultRoot = ".\\FFMPEG\\bin";
protected string ConfiguredRoot;
protected Process Process;
protected FFBase()
{
- ConfiguredRoot = ".\\FFMPEG\\bin";
+ ConfiguredRoot =
+ !File.Exists(_ConfigFile) ?
+ _DefaultRoot :
+ JsonConvert.DeserializeObject>(File.ReadAllText(_ConfigFile))["RootDirectory"];
}
///
diff --git a/README.md b/README.md
index 58b322d..9aa2809 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,16 @@ Install-Package FFMpegCore
A great way to use FFMpeg encoding when writing video applications, client-side and server-side. It has wrapper methods that allow conversion to all web formats: MP4, OGV, TS and methods of capturing screens from the videos.
+### Configuratoin
+
+The root directory for the ffmpeg binaries can be configured via the `ffmpeg.config.json` file.
+
+```json
+{
+ "RootDirectory": ".//FFMPEG//bin"
+}
+```
+
### FFProbe
FFProbe is used to gather video information