FFMpegCore icon indicating copy to clipboard operation
FFMpegCore copied to clipboard

add Crop supprot

Open 929496959 opened this issue 2 years ago • 1 comments

VideoCropArgument.cs ` namespace FFMpegCore.Arguments { public class VideoCropArgument : IArgument {

	public VideoCropArgument(string w,string h,string x, string y) 
	{ 
		this.w = w;
		this.h = h;
		this.x = x;
		this.y = y;
	}

    private string w { get; set; }
	private string h { get; set; }
	private string x { get; set; }
	private string y { get; set; }

    public string Text => $"-vf crop={w}:{h}:{x}:{y}";

}

}

`

FFMpegArgumentOptions.cs file add method

` public FFMpegArgumentOptions VideoCrop(string w, string h, string x, string y) { return WithArgument(new VideoCropArgument(w, h, x, y)); }

`

929496959 avatar May 25 '23 09:05 929496959

A PR that adds this as an IVideoFilterArgument instead an IArgument would be welcome

rosenbjerg avatar Aug 24 '23 21:08 rosenbjerg