I'm trying to transcode my H.264 screen recordings (of video games) to AV1, but I noticed that the first frame output of SVT-AV1 seems off compared to the reference video or equivalent rav1e version
The commands I'm using are:
$ ffmpeg -i ref.mp4 -colorspace bt709 -an -c:v libsvtav1 -preset 5 -svtav1-params tune=2:film-grain-denoise=0 -pix_fmt yuv420p10le -crf 16 svtav1.webm
ffmpeg version 7.0.2-1 Copyright (c) 2000-2024 the FFmpeg developers
...
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ref.mp4':
...
Stream #0:0[0x1](und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuvj444p(pc, bt709/bt709/iec61966-2-1, progressive), 640x480 [SAR 1:1 DAR 4:3], 9314 kb/s, 60 fps, 60 tbr, 15360 tbn (default)
...
Output #0, webm, to 'svtav1.webm':
...
Stream #0:0(und): Video: av1, yuv420p10le(bt709/bt709/iec61966-2-1, progressive), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 60 fps, 1k tbn (default)
$ ffmpeg -i ref.mp4 -colorspace bt709 -an -c:v librav1e -speed 9 -tiles 24 -pix_fmt yuv420p10le -qp 64 rav1e.webm
...
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ref.mp4':
...
Stream #0:0[0x1](und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuvj444p(pc, bt709/bt709/iec61966-2-1, progressive), 640x480 [SAR 1:1 DAR 4:3], 9314 kb/s, 60 fps, 60 tbr, 15360 tbn (default)
...
Output #0, webm, to 'rav1e.webm':
...
Stream #0:0(und): Video: av1, yuv420p10le(bt709/bt709/iec61966-2-1, progressive), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 60 fps, 1k tbn (default)
Video files (cut and cropped for this question to keep filesizes small):
- ref.mp4: https://files.catbox.moe/q8oy1h.mp4
- svtav1.webm: https://files.catbox.moe/jmeaa6.webm
- rav1e.webm: https://files.catbox.moe/05p7gh.webm
If I extract the first frame of each video (with ffmpeg -i ... -vframes 1 frame.png
), the reference and rav1e frames looks so similar it's difficult to tell them apart. But comparing to the SVT-AV1 frame, there's some quite obvious differences in the SVT-AV1 encoding:
- The dark diamonds on the purple "aura" are larger
- The pink stripes in the same "aura" are blurrier
- The red/orange particles (e.g., at the bottom and bottom right) are very faded
- Overall the colours are paler than the reference
However, if I seek to 0.5s (i.e., 30th frame) with -ss 0.5
, the problems disappear, and there's no major differences between the 3 encodes.
Is this some quirk with the SVT-AV1 encoder, where the first frame (or I-frames in general?) is inaccurate? Or am I invoking the encoder incorrectly? Or perhaps a bug somewhere?