From ec1b8a6b0757281825c4c9e869b698e8ada33206 Mon Sep 17 00:00:00 2001 From: Victor Horobchuk Date: Wed, 17 Mar 2021 00:09:56 +0200 Subject: [PATCH] Add mirror and default ForceFormat for OutputPipeArgument --- FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs | 11 +++++++++++ FFMpegCore/FFMpeg/FFMpegArguments.cs | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs diff --git a/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs b/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs new file mode 100644 index 0000000..4c18cef --- /dev/null +++ b/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs @@ -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\""; + } +} diff --git a/FFMpegCore/FFMpeg/FFMpegArguments.cs b/FFMpegCore/FFMpeg/FFMpegArguments.cs index 847e68c..5aa913d 100644 --- a/FFMpegCore/FFMpeg/FFMpegArguments.cs +++ b/FFMpegCore/FFMpeg/FFMpegArguments.cs @@ -57,6 +57,12 @@ private FFMpegArgumentProcessor ToProcessor(IOutputArgument argument, Action x is ForceFormatArgument)) + { + args.ForceFormat("matroska"); + } + Arguments.AddRange(args.Arguments); Arguments.Add(argument); return new FFMpegArgumentProcessor(this);