func ScreenshotFrame(input string, frame int, options ScreenshotOptions) ffmpeg.Args {
	options.setDefaults()

	var args ffmpeg.Args
	args = args.LogLevel(options.Verbosity)
	args = args.Overwrite()

	args = args.Input(input)
	args = args.VideoFrames(1)

	args = args.VSync(ffmpeg.VSyncMethodPassthrough)

	var vf ffmpeg.VideoFilter
	// keep only frame number options.Frame)
	vf = vf.Select(frame)

	if options.Width > 0 {
		vf = vf.ScaleWidth(options.Width)
	}

	args = args.VideoFilter(vf)

	args = args.AppendArgs(options.OutputType)
	args = args.Output(options.OutputPath)

	return args
}
// ScreenshotFrame uses the select filter to get a single frame from the video.
// It is very slow and should only be used for files with very small duration in secs / frame count.
ScreenshotFrame uses the select filter to get a single frame from the video.
It is very slow and should only be used for files with very small duration in secs / frame count.
// ScreenshotFrame uses the select filter to get a single frame from the video . // It is very slow and should only be used for files with very small duration in secs / frame count .
func ScreenshotFrame(input string, frame int, options ScreenshotOptions) ffmpeg.Args {
	options.setDefaults()
	var args ffmpeg.Args
	args = args.LogLevel(options.Verbosity)
	args = args.Overwrite()
	args = args.Input(input)
	args = args.VideoFrames(1)
	args = args.VSync(ffmpeg.VSyncMethodPassthrough)
	var vf ffmpeg.VideoFilter
	vf = vf.Select(frame)
	if options.Width > 0 {
		vf = vf.ScaleWidth(options.Width)
	}
	args = args.VideoFilter(vf)
	args = args.AppendArgs(options.OutputType)
	args = args.Output(options.OutputPath)
	return args
}
func ScreenshotFrame ( input string , frame int , options ScreenshotOptions ) ffmpeg . Args { options . setDefaults ( ) var args ffmpeg . Args args = args . LogLevel ( options . Verbosity ) args = args . Overwrite ( ) args = args . Input ( input ) args = args . VideoFrames ( 1 ) args = args . VSync ( ffmpeg . VSyncMethodPassthrough ) var vf ffmpeg . VideoFilter vf = vf . Select ( frame ) if options . Width > 0 { vf = vf . ScaleWidth ( options . Width ) } args = args . VideoFilter ( vf ) args = args . AppendArgs ( options . OutputType ) args = args . Output ( options . OutputPath ) return args }
ScreenshotFrame uses the select filter to get a single frame from the video.
ScreenshotFrame uses the select filter to get a single frame from the video .
// keep only frame number options.Frame)