>>29260693 (OP)*Use a FFmpeg front end. I've tried them all and Xmedia Recode is the best imo, allows you to do everything including removing watermarks and changing saturation etc.
*Use a high quality source, ideally 4K.
*Around 45 secs is the upper limit but 30 secs is much more reasonable.
*1024x576 is the lowest "looks like HD" aspect ratio. 540p and 480p are also decent but loses some of that sharpness, however are useful if you have to back off to reduce pixelation or blur.
*Lower the frame rate. You can get away with 20 fps for a slow moving scene, but normally 24 fps is the lowest decent fps for a scene with motion.
*Use VP9 webm, 2-pass variable bitrate. OPUS audio with 48 kbps variable bitrate (32 minimum, 64 kbps max).
*The min vid bitrate should be set to a couple of hundred lower than the average bitrate. Max bitrate set to a decent amount, about 1200 for 576p. Over-doing it will make the codec shift from sharp to blurred and unpixelated to pixelated, which is perceived as lower quality than an overall lower bitrate.
*You can feed the video codec, clip length, aspect ratio, fps, audio bitrate and desired file size into Grok and ask for min, max and avg bitrate values to eliminate trial and error.
*Quality set to "best" increases uniformity a tiny bit compared to quality set to "good". Tune can be set to "SSIM" (visual perception) instead of "PSNR" (signal to noise) - SSIM focuses on perceived quality (contrast and removing artifacts) rather than max sharpness. Tune centent type should be set to "film" - this is the most important tune. "Best" and "SSIM" takes significantly longer, so it's a good idea to use "good" and "PSNR" until you're happy with the results and then switch, or skip them altogether unless you really need them.
Picrel: Random clip with 42 secs of complex textures. 1024x576, 20 fps, 2-pass VP9, quality "best", tunes "film" and "SSIM", Opus 32 kbps.