[x264-devel] x264 taking longer to encode static scenes (than scenes with movements)

Danilo Gasques Rodrigues danilod100 at gmail.com
Thu Sep 3 21:02:24 CEST 2015


​​
​​
​Hi,
I'm using x264 for live video streaming and I've noticed that the thread
responsible for encoding uses ​
​more cpu (around 50% more with 1920x1080) when the video stream is frozen
(i.e.: camera is sending the same frame over an over again) or when I make
it encode the same image over and over again.

This seems somewhat counter intuitive to me, as I would expect x264 to use
more processing power when encoding complex scenes other then static ones.

I created a github gist based on the example.c encoder bundled in x264's
source code and tested encoding times with it. (You can find it here:
https://gist.github.com/danilogr/ab4976ff4e0831ab274b)

Average encoding time for the static scene is ~38% bigger than for a scene
with movements. (You can find my test case and also the output from my test
encoder on the link above).

​​
​I've also noticed that by setting "​
​scenecut=0, subme=0, trellis=0 and me=dia" I can get rid of this problem​
​​
​ but with some quality​
​​
​ decrease. (Not really noticeable in the test case provided).

​
​​
​​
​Could anyone, please, shed some light on the reasons for this odd
behavior? ​
​Also, what can be done in order to avoid this situation without a major
decrease in quality?​

​​

​​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20150903/fa4405b8/attachment-0001.html>


More information about the x264-devel mailing list