mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 00:24:14 +01:00
parent
a5b5965924
commit
084f8b3a58
2 changed files with 23 additions and 3 deletions
|
@ -98,7 +98,7 @@ IEnumerable<IVideoFrame> CreateFrames(int count)
|
|||
yield return GetNextFrame(); //method of generating new frames
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var videoFramesSource = new RawVideoPipeSource(CreateFrames(64)) //pass IEnumerable<IVideoFrame> or IEnumerator<IVideoFrame> to constructor of RawVideoPipeSource
|
||||
{
|
||||
FrameRate = 30 //set source frame rate
|
||||
|
@ -115,10 +115,20 @@ await FFMpegArguments
|
|||
GlobalFFOptions.Configure(new FFOptions { BinaryFolder = "./bin", TemporaryFilesFolder = "/tmp" });
|
||||
// or
|
||||
GlobalFFOptions.Configure(options => options.BinaryFolder = "./bin");
|
||||
|
||||
|
||||
// or individual, per-run options
|
||||
await FFMpegArguments
|
||||
.FromFileInput(inputPath)
|
||||
.OutputToFile(outputPath)
|
||||
.ProcessAsynchronously(true, new FFOptions { BinaryFolder = "./bin", TemporaryFilesFolder = "/tmp" });
|
||||
|
||||
// or combined, setting global defaults and adapting per-run options
|
||||
GlobalFFOptions.Configure(new FFOptions { BinaryFolder = "./bin", TemporaryFilesFolder = "./globalTmp", WorkingDirectory = "./" });
|
||||
|
||||
await FFMpegArguments
|
||||
.FromFileInput(inputPath)
|
||||
.OutputToFile(outputPath)
|
||||
.Configure(options => options.WorkingDirectory = "./CurrentRunWorkingDir")
|
||||
.Configure(options => options.TemporaryFilesFolder = "./CurrentRunTmpFolder")
|
||||
.ProcessAsynchronously();
|
||||
}
|
12
README.md
12
README.md
|
@ -182,7 +182,17 @@ await FFMpegArguments
|
|||
.FromFileInput(inputPath)
|
||||
.OutputToFile(outputPath)
|
||||
.ProcessAsynchronously(true, new FFOptions { BinaryFolder = "./bin", TemporaryFilesFolder = "/tmp" });
|
||||
```
|
||||
|
||||
// or combined, setting global defaults and adapting per-run options
|
||||
GlobalFFOptions.Configure(new FFOptions { BinaryFolder = "./bin", TemporaryFilesFolder = "./globalTmp", WorkingDirectory = "./" });
|
||||
|
||||
await FFMpegArguments
|
||||
.FromFileInput(inputPath)
|
||||
.OutputToFile(outputPath)
|
||||
.Configure(options => options.WorkingDirectory = "./CurrentRunWorkingDir")
|
||||
.Configure(options => options.TemporaryFilesFolder = "./CurrentRunTmpFolder")
|
||||
.ProcessAsynchronously();
|
||||
```
|
||||
|
||||
### Option 2
|
||||
|
||||
|
|
Loading…
Reference in a new issue