mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Add mirror and default ForceFormat for OutputPipeArgument
This commit is contained in:
parent
cce6c6983c
commit
ec1b8a6b07
2 changed files with 17 additions and 0 deletions
11
FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs
Normal file
11
FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs
Normal 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\"";
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue