I'm compressing some videos for archiving, and I came to this configuration which gives me a nice overall quality on a small size:
ffmpeg -threads 4 -y -hide_banner -i input.mp4 -vf scale=-2:480 -c:v libx264 -b:v 200k -preset slow -tune animation -movflags faststart -pix_fmt yuv420p -an -f mp4 -pass 1 NUL
ffmpeg -threads 4 -y -hide_banner -i input.mp4 -vf scale=-2:480 -c:v libx264 -b:v 200k -preset slow -tune animation -movflags faststart -pix_fmt yuv420p -pass 2 2-pass-x264.mp4
This output quality is acceptable for my needs:
But I would like to enjoy hardware acceleration, it is way much faster.
So I tried:
ffmpeg -hwaccel nvdec -y -hide_banner -i input.mp4 -vf scale=-2:480 -movflags faststart -pix_fmt yuv420p -c:v h264_nvenc -b:v 200k -maxrate 2M -bufsize 1M -rc-lookahead:v 30 -rc:v vbr_hq -preset slow -profile:v high -level 5.1 -an h264_nvenc.mp4
But this gives me an output with worse overall quality, and in complex parts, things gets worse:
Is it possible to achieve near same overall quality (for low bitrate) using h264_nvenc encoder?