Add custom command argument for ffmpeg.

This commit is contained in:
Adrien Allard committed 2019-07-12 18:14:11 +02:00
1 parent f3d61e4570
commit deec7e2a6b
2 files changed
+11

No files matched your search

@@ -84,6 +84,16 @@ namespace FileConverter.ConversionJobs
protected virtual void FillFFMpegArgumentsList()
{
string customCommand = this.ConversionPreset.GetSettingsValue<string>(ConversionPreset.ConversionSettingKeys.FFMPEGCustomCommand);
if (!string.IsNullOrEmpty(customCommand))
{
// Custom command override other settings.
string arguments = string.Format("-n -stats -i \"{0}\" {2} \"{1}\"", this.InputFilePath, this.OutputFilePath, customCommand);
this.ffmpegArgumentStringByPass.Add(new FFMpegPass(arguments));
return;
}
// This option are necessary to be able to read metadata on Windows. src: http://jonhall.info/how_to/create_id3_tags_using_ffmpeg
const string MP3MetadataArgs = "-id3v2_version 3 -write_id3v1 1";
@@ -597,6 +597,7 @@ namespace FileConverter
public const string VideoScale = "VideoScale";
public const string VideoRotation = "VideoRotation";
public const string VideoFramesPerSecond = "VideoFramesPerSecond";
public const string FFMPEGCustomCommand = "FFMPEGCustomCommand";
public const string EnableAudio = "EnableAudio";
public const string EnableVideo = "EnableVideo";