0

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:

x264 encoded frame

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:

h264_nvenc encded frame

Is it possible to achieve near same overall quality (for low bitrate) using h264_nvenc encoder?

0

Not really no. Newer Turing based nvidia cards will produce better quality than previous generations. But since nvenc is fixed function, and not software running on the GPU it’s not upgradable, or modifiable except for a few options like presets.

| improve this answer | |
  • I tried every possible option, this is really a shame. – Edney Mar 7 at 18:40
  • It’s just the nature of hardware accelerated video encoding. There is no such thing as a free lunch. – SlimSCSI Mar 7 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.