diff --git a/ScreenCaptureLib/Screencast/ScreencastOptions.cs b/ScreenCaptureLib/Screencast/ScreencastOptions.cs index dc4826e3f..26e4da882 100644 --- a/ScreenCaptureLib/Screencast/ScreencastOptions.cs +++ b/ScreenCaptureLib/Screencast/ScreencastOptions.cs @@ -56,6 +56,11 @@ public string GetFFmpegArgs() args.AppendFormat("-f gdigrab -framerate {0} -offset_x {1} -offset_y {2} -video_size {3}x{4} -draw_mouse {5} -show_region {6} -i desktop ", ScreenRecordFPS, CaptureArea.X, CaptureArea.Y, CaptureArea.Width, CaptureArea.Height, DrawCursor ? 1 : 0, 0); + if (!string.IsNullOrEmpty(FFmpeg.UserArgs)) + { + args.Append(FFmpeg.UserArgs + " "); + } + args.AppendFormat("-c:v {0} ", FFmpeg.VideoCodec.ToString()); // output FPS @@ -86,11 +91,6 @@ public string GetFFmpegArgs() args.AppendFormat("-t {0} ", Duration); } - if (!string.IsNullOrEmpty(FFmpeg.UserArgs)) - { - args.Append(FFmpeg.UserArgs + " "); - } - // -y for overwrite file args.AppendFormat("-y \"{0}\"", Path.ChangeExtension(OutputPath, FFmpeg.Extension));