diff --git a/FFMpegCore/FFMPEG/Pipes/RawVideoPipeSource.cs b/FFMpegCore/FFMPEG/Pipes/RawVideoPipeSource.cs index 5e28647..c6f3b27 100644 --- a/FFMpegCore/FFMPEG/Pipes/RawVideoPipeSource.cs +++ b/FFMpegCore/FFMPEG/Pipes/RawVideoPipeSource.cs @@ -31,11 +31,11 @@ public string GetFormat() { if (!framesEnumerator.MoveNext()) throw new InvalidOperationException("Enumerator is empty, unable to get frame"); - - StreamFormat = framesEnumerator.Current.Format; - Width = framesEnumerator.Current.Width; - Height = framesEnumerator.Current.Height; } + StreamFormat = framesEnumerator.Current.Format; + Width = framesEnumerator.Current.Width; + Height = framesEnumerator.Current.Height; + return $"-f rawvideo -r {FrameRate} -pix_fmt {StreamFormat} -s {Width}x{Height}"; }