pub fn codec_args(
ext: &str,
encoder: &str,
crf: u32,
preset: &str,
available: &[String],
) -> Vec<String>Expand description
ffmpeg output arguments (codec/quality) for an extension, given the user’s encoder preference and the
available encoders. “auto”: mp4/mov/mkv/m4v → libx264 (+aac), webm → libvpx-vp9 (+libopus),
gif → gif, avi → mpeg4 (+mp3), audio-only → sensible codec for the container. The preference is
overridden where the container forbids it (webm: vp9/av1 only; mov: no vp9/av1).
Hardware encoders (nvenc/qsv/amf) use -cq/-global_quality/-qp instead of -crf.