mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Add mirror and default ForceFormat for OutputPipeArgument
Former-commit-id: ec1b8a6b07
This commit is contained in:
parent
59dc8e6b94
commit
229fb93980
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