I am wondering, how much the speed gain is, when using multiple threads (16), because there is more than just writing frames out simultaneously? Can someone give some information?


  • I don't know about this specific library, but some tests around the web compare h264 encoding with and without hyperthreading (simplified: twice the threads with more or less half the performance) and it's usually a wash. That means it's pretty close to 2x threads = 2x performance. Things might get more complicated if you want to do realtime encoding. – Peter Sep 11 '14 at 11:14

x264 scales pretty linearly. So doubling the thread will double the FPS ( give or take a few percent due to memory speed CPU cache size and locks). But it may increase the final file size (very) slightly. Especially if you use slice based threading.

| improve this answer | |
  • As i read per default, it uses just one thread, so would i have 16 times speed gain, when i up it to 16? – user1767754 Sep 11 '14 at 17:32
  • You may start loosing efficiency after 8 or so, but it really depends on your CPU, RAM speed, other x264 options, etc. – szatmary Sep 11 '14 at 17:36

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.