mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
parent
0fc86a1a52
commit
37f12fd2ea
1 changed files with 9 additions and 0 deletions
|
@ -363,7 +363,16 @@ Custom video converting presets could be created with help of `ArgumentsContaine
|
||||||
var container = new ArgumentsContainer();
|
var container = new ArgumentsContainer();
|
||||||
container.Add(new VideoCodecArgument(VideoCodec.LibX264));
|
container.Add(new VideoCodecArgument(VideoCodec.LibX264));
|
||||||
container.Add(new ScaleArgument(VideoSize.Hd));
|
container.Add(new ScaleArgument(VideoSize.Hd));
|
||||||
|
```
|
||||||
|
or use Fluent API
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var container = new ArgumentContainer()
|
||||||
|
.VideoCodec(VideoCodec.LibX264)
|
||||||
|
.Scale(VideoSize.Hd);
|
||||||
|
```
|
||||||
|
|
||||||
|
```csharp
|
||||||
var ffmpeg = new FFMpeg();
|
var ffmpeg = new FFMpeg();
|
||||||
var result = ffmpeg.Convert(container, new FileInfo("input.mp4"), new FileInfo("output.mp4"));
|
var result = ffmpeg.Convert(container, new FileInfo("input.mp4"), new FileInfo("output.mp4"));
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue