-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"mgcb-ffmpeg": { | ||
"version": "7.0.0.5", | ||
"commands": [ | ||
"mgcb-ffmpeg" | ||
], | ||
"rollForward": false | ||
}, | ||
"mgcb-ffprobe": { | ||
"version": "7.0.0.5", | ||
"commands": [ | ||
"mgcb-ffprobe" | ||
], | ||
"rollForward": false | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,8 +69,8 @@ public static void ProbeFormat(string sourceFile, out AudioFileType audioFileTyp | |
{ | ||
string ffprobeStdout, ffprobeStderr; | ||
var ffprobeExitCode = ExternalTool.Run( | ||
"ffprobe", | ||
string.Format("-i \"{0}\" -show_format -show_entries streams -v quiet -of flat", sourceFile), | ||
"dotnet", | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
harry-cpp
Author
Owner
|
||
string.Format("mgcb-ffprobe -i \"{0}\" -show_format -show_entries streams -v quiet -of flat", sourceFile), | ||
out ffprobeStdout, | ||
out ffprobeStderr); | ||
if (ffprobeExitCode != 0) | ||
|
@@ -282,9 +282,9 @@ public static void WritePcmFile(AudioContent content, string saveToFile, int bit | |
{ | ||
string ffmpegStdout, ffmpegStderr; | ||
var ffmpegExitCode = ExternalTool.Run( | ||
"ffmpeg", | ||
"dotnet", | ||
string.Format( | ||
"-y -i \"{0}\" -vn -c:a pcm_s16le -b:a {2} {3} -f:a wav -strict experimental \"{1}\"", | ||
"mgcb-ffmpeg -y -i \"{0}\" -vn -c:a pcm_s16le -b:a {2} {3} -f:a wav -strict experimental \"{1}\"", | ||
content.FileName, | ||
saveToFile, | ||
bitRate, | ||
|
@@ -293,7 +293,7 @@ public static void WritePcmFile(AudioContent content, string saveToFile, int bit | |
out ffmpegStdout, | ||
out ffmpegStderr); | ||
if (ffmpegExitCode != 0) | ||
throw new InvalidOperationException("ffmpeg exited with non-zero exit code: \n" + ffmpegStdout + "\n" + ffmpegStderr); | ||
throw new InvalidOperationException("mgcb-ffmpeg exited with non-zero exit code: \n" + ffmpegStdout + "\n" + ffmpegStderr); | ||
} | ||
|
||
public static ConversionQuality ConvertToFormat(AudioContent content, ConversionFormat formatType, ConversionQuality quality, string saveToFile) | ||
|
@@ -367,9 +367,9 @@ public static ConversionQuality ConvertToFormat(AudioContent content, Conversion | |
do | ||
{ | ||
ffmpegExitCode = ExternalTool.Run( | ||
"ffmpeg", | ||
"dotnet", | ||
string.Format( | ||
"-y -i \"{0}\" -vn -c:a {1} -b:a {2} -ar {3} -f:a {4} -strict experimental \"{5}\"", | ||
"mgcb-ffmpeg -y -i \"{0}\" -vn -c:a {1} -b:a {2} -ar {3} -f:a {4} -strict experimental \"{5}\"", | ||
content.FileName, | ||
ffmpegCodecName, | ||
QualityToBitRate(quality), | ||
|
@@ -384,7 +384,7 @@ public static ConversionQuality ConvertToFormat(AudioContent content, Conversion | |
|
||
if (ffmpegExitCode != 0) | ||
{ | ||
throw new InvalidOperationException("ffmpeg exited with non-zero exit code: \n" + ffmpegStdout + "\n" + ffmpegStderr); | ||
throw new InvalidOperationException("mgcb-ffmpeg exited with non-zero exit code: \n" + ffmpegStdout + "\n" + ffmpegStderr); | ||
} | ||
|
||
byte[] rawData; | ||
|
Should this be using a environment variable so that we are not hardcoding
dotnet
into our system?