Add mirror and default ForceFormat for OutputPipeArgument

Former-commit-id: ec1b8a6b07
This commit is contained in:
Victor Horobchuk 2021-03-17 00:09:56 +02:00
parent 59dc8e6b94
commit 229fb93980
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace FFMpegCore.Arguments
{
public class SetMirrorVideo : IArgument
{
public string Text { get; set; } = "-vf \"hflip\"";
}
}

View file

@ -57,6 +57,12 @@ private FFMpegArgumentProcessor ToProcessor(IOutputArgument argument, Action<FFM
{
var args = new FFMpegArgumentOptions();
addArguments?.Invoke(args);
if (argument is OutputPipeArgument && !Arguments.Any(x => x is ForceFormatArgument))
{
args.ForceFormat("matroska");
}
Arguments.AddRange(args.Arguments);
Arguments.Add(argument);
return new FFMpegArgumentProcessor(this);