Log in

View Full Version : X264 and Quad Core


greath
3rd November 2007, 11:09
Hi,

I have just purchased a Q6600 with the intent to speed up encoding of video using x264. I used to have a E6600 and used --threads 2 as a paramater for x264. I changed this to --threads 4 with my quad core and, using exactly the same paramaters on the command line, I now get VBV underflow whilst encoding. It I change back to --threads 2 then the VBV underflow warning disappears. It also works with --threads 3 and --thread-input. Just 4 threads gives the underflow warning.

Does anyone have any experience of this? Why would the encode be different when using 4 threads as opposed to 2?

I am using x264 core:56 svn-667 build of the software.

I also downloaded build 682 from the download section and that gives VBV underflow warnings even with --threads 3, so would appear to be more problematic than version 667.

Manao
3rd November 2007, 11:50
In x264, the more threads, the harder it is to enforce VBV compliancy. So it's not surprising that x264 fails to enforce VBV compliancy with 4 threads (especially if the VBV duration is short).

--thread-input don't influence VBV compliancy.

It will happens with all versions that have the new threading algorithm. However, since different versions don't necessarily give bit identical results, it may sometimes fail with --threads 3, and sometimes not (it also depends on the video).

greath
3rd November 2007, 12:01
That would explain it. If I try with 4 threads in build 682 it works:-) So different builds with different number of threads have different buffer management schemes.

I was trying to make HD DVD compliant streams ( even though I was going to put them into an mkv container, but in the future I could demux them into HD DVD ) so I had the buffer size fixed to --vbv-bufsize 14745 as I believe this is needed, along with the HRD pulldown, to make HD DVD encodes.

Thanks for the reply.

Manao
3rd November 2007, 12:06
So different builds with different number of threads have different buffer management schemesNo. Buffer management hardly changed. But different builds give different sizes for each frames, thus slightly changing the data collected by the rate control, which will change the quantizer decision.

burfadel
3rd November 2007, 17:49
I thought it was generally best now to leave the threads as auto, or does this only apply to single and dual cores?

bluebebe
3rd November 2007, 18:07
try auto detection of multithread! in my encoded h264 vids is -thread=6 marked (Q6600)

LoRd_MuldeR
3rd November 2007, 19:26
try auto detection of multithread! in my encoded h264 vids is -thread=6 marked (Q6600)

Auto detect uses:
Threads = (Number of Cores) * (3/2)

Hence 4 cores result in 6 threads, which so far did not fail to get 100% CPU load on my Q6600...