Log in

View Full Version : x264 settings for better decoding speed


Ceppo
14th April 2016, 15:26
Hi, I need to encode some video that I have to use inside a video editing program so I need to keep the decoding and seeking speed as fast as possible and I would like some explainations about some setting.
Right now I'm using these settings:
--qp 13 --keyint 24 --preset veryfast --bframes 0 --tune fastdecode
Do bframes slow down the decoding and seeking speed or is it compensate by the lower bitrate? Should I use them?
Do deadzone, fast_pskip and decimate reduce quality and details for a lower bitrate whatever the quantizer or they are no problem for low quantizers like 13?
Should I use -no-psy with qp 13 for better quality?
What setting would you use to get the fastest decoding with a not insane filesize?

foxyshadis
15th April 2016, 14:09
b-frames significantly speed up seeking, as many of them can be skipped without even decoding at all. It's a huge win for intra-GOP seeking, and there's no reason not to use them unless you need zero-latency real-time communication. There's tune fastdecode, but don't use that; it's made for ancient machines that can't keep up, and disables CABAC completely, which slows down disk access more than it speeds up decoding.

For all other questions stick with the presets, they're made so you don't need to know the nitty-gritty or decide whether one option's speed cost saves more versus another option's different cost and benefit. The presets have it all worked out in nicely ascending order of value. Psy is always a visual benefit, but there's unlikely to be any visual benefit at qp 13, so it hardly matters. Why not crf? qp is more a debugging option unless there's some kind of absolute strict requirement to have it; crf is more useful in all real use cases. And carefully consider the use of qp 13 versus something higher; the size bloat of such a low qp will contribute much more to decoding latency than any of the micro-optimizations you're worried about, because spinning disk is limited in how fast it can fetch for you.

(Deadzone and decimate are both size/quality tradeoffs, whereas fast pskip is purely a time/size tradeoff.)

Ceppo
15th April 2016, 20:04
I see, thank you. For the tune... the problem its just cabac or also the other options that it disables are not worth it? Should I disable them without use the tune? For the qp I'm using it becouse this way I'm sure that all the frames got the same quality since i have to encode it again after the editing, and in the end crf it's not magic, it just reduces quality where is harder to notice, and since is a temporary solution the filesize that i save up it's not a problem.
Anyway I'm going with this:

--qp 13 --pbratio 1.0 --keyint 24 --weightp 0 --no-weightb --no-deblock --preset veryfast