How to convert videos to AV1 lossless using FFmpeg

command lineencodingffmpeglosslessvideo

I have a set of AVI videos (lossless video streams; no audio) and my goal is to convert them to AV1 lossless using FFmpeg.

FFmpeg (with librav1e, libaom-av1 and libsvtav1 included) runs fine on my Windows 8.1 machine and I'm able to convert the videos to H.264, H.265 and VP9 (all lossless) using the Commands section from AV1 vs VP9 vs AVC (h.264) vs HEVC (h.265): Part I – Lossless.

But I'm confused with the command line parameters for AV1 on that page. I also don't know how to transform AV1 options described on ffmpeg Documentation into a FFmpeg command line (and couldn't find any tutorial).

I've also checked libaom AV1 Encoding Guide, The Rebel Alliance's AV1 Video Codec Encoding Guide and others but they don't mention AV1 lossless at all.

Could you please provide an example FFmpeg command line for one or more encoders (librav1e, libaom-av1, libsvtav1)?

Best Answer

With FFmpeg itself:

ffmpeg -i movie.avi -c:v libaom-av1 -aom-params lossless=1  "av1losslessmovie.mp4"