lisamelton / other_video_transcoding

Other tools to transcode videos.
MIT License
549 stars 25 forks source link

Presets? #51

Closed vasuvasu closed 3 years ago

vasuvasu commented 4 years ago

I saw a preset flag when looking at the full help documentation, but don't see what the valid options are. When using nvenc is it possible to use a slow/slower/veryslow etc preset like from handbrake, or is this preset for something else?

Apart from --nvenc-temporal-aq are there any other options to squeeze out some more quality like with the old handbrake presets and tunes?

Looking at the code with very little understanding of it, do presets manipulate lookahead, reference, or bframes?

skj-dev commented 4 years ago

When it comes to hardware encoding, my understanding is the coarse knob is the target bitrate. For more esoteric adjustments it means delving into the dark realm of ffmpeg configs, and that is something not for the faint of heart. Perhaps more to the point, the primary reason I use this tool is so I don't have to mess with ffmpeg configs, since Don and Company have already done the heavy lifting there. So for me, I typically use the defaults, add --nvenc-temporal-aq when using a Turing card, and might lower the target bitrate. I'm pretty sure I've never increased it, as the default is pretty good.

Anyway, that's a bit of a ramble just to say there's a lot of goodness in the defaults. 😎

lisamelton commented 4 years ago

@vasuvasu This is a good question. Thanks for asking. And thanks to @ttyS0 for the very sensible advice.

The only hardware encoders with presets available from FFmpeg are from Nvidia and QSV. For Nvidia, the only presets allowed are fast, medium and slow.

I've tried all of those presets and, frankly, they don't really seem to do anything to improve quality, at least when using slow.

The other-transcode tool has other options to manipulate lookahead, refs and bframes for the Nviidia encoder. But these don't do much to improve quality either. In fact, they all the potential to lower quality. Go figure.

My advice is, if you're curious, to try out these features and see what happens. But as @ttyS0 writes, we have tuned the defaults so changing your target bitrate is the best way to impact quality.

vasuvasu commented 4 years ago

ah cool, thanks. I know with x264 handbrake encodes I can definitely see a difference between the speed presets at the same bitrate. I like to lock the bitrate for encodes when streaming to family over plex and then turn up the knobs elsewhere to eek out as much quality as I can given a fixed target bitrate.

I got a friend to do a test encode for me on his nvidia card while the parts for my pc build (first one in 17 years) shows up and the quality was really nice so I'm not complaining, just seeing if a lil' more can be squeezed out at a 6Mbps target.