PDA

View Full Version : x264 speed


ataylor
27th April 2008, 04:18
Hi people,

I ran my first x264 encode using MeGUI last night, and found the compression/quality to be excellent compared to xVid/AutoGK.

The only problem is, I find x264 encoding to be very slow; for example, with an encode of Akira in AutoGK at 80% quality, original audio, burnt in subtitles, it would take between 2-3 hours. With x264, using the AE-GoodQuality preset, it would take 2 hours for the first pass, and then 10 hours for the second pass. While x264 beats xvid hands down from my perspective, I can't really afford spare 12 hours for every encode.

Is this a typical encoding time for x264? Is there any way of speeding it up? Any advice would be much appreciated.

Dark Shikari
27th April 2008, 04:30
You can of course choose faster settings; x264 scales quite well, from "relatively fast" to "extremely slow" based on how willing you are to sacrifice speed for quality or vice versa.

The other thing you can do is get a Core 2 Quad ;)

--pass 2 --bitrate 1000 --stats ".stats" --ref 8 --mixed-refs --bframes 16 --b-pyramid --b-rdo --bime --weightb --direct auto --filter 1,1 --subme 6 --trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --merange 12 --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

is the AE-GoodQuality preset. Instead, try this:


--pass 2 --bitrate 1000 --stats ".stats" --ref 4 --bframes 16 --b-pyramid --bime --weightb --direct auto --filter 1,1 --subme 6 --trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me hex --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

or

--pass 2 --bitrate 1000 --stats ".stats" --ref 3 --bframes 3 --b-pyramid --bime --weightb --filter 1,1 --subme 4 --trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me hex --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

ataylor
27th April 2008, 04:34
Thanks for the quick reply :) What sort of settings should I be looking at? I really want to maintain high quality levels (size matters less than quality for me).

Indeed, the machine I'm currently running it on isn't exactly top notch - a Celeron M. Probably doesn't help ;)

Edit: Just saw your edit; thank you! Might have to do a bit of reading up to understand exactly what you've done there, but I'll give them a try :)

Dark Shikari
27th April 2008, 04:36
Thanks for the quick reply :) What sort of settings should I be looking at? I really want to maintain high quality levels (size matters less than quality for me).Size is quality, in a sense; if the encoder uses worse settings and is 20% less efficient, it means you'll need 20% more bitrate for the same quality, for example.
Indeed, the machine I'm currently running it on isn't exactly top notch - a Celeron M. Probably doesn't help ;)Ouch. On the one hand, x264 is pretty heavily optimized for Intel CPUs. On the other hand, its a Celeron! :p

Shinigami-Sama
27th April 2008, 05:25
why not try a crf 20 then?
most people seem to agree crf 18-22 are good choices

and its only one pass, and is very nice
if you do some digging ddog has a thread that contained some goodies that would estimate the final output size as well

plonk420
27th April 2008, 07:26
"back in my day" </old man accent> it would take like 6-12 hours PER PASS be it MPEG1, MPEG2 or Divx/Xvid. is there a reason why you can't? i run my computers 24-7 (they literally were my heating this winter (as well as a PS3))...

ChronoCross
28th April 2008, 02:19
"back in my day" </old man accent> it would take like 6-12 hours PER PASS be it MPEG1, MPEG2 or Divx/Xvid. is there a reason why you can't? i run my computers 24-7 (they literally were my heating this winter (as well as a PS3))...

Back when I did this more regularly I would usually spend a week on a 3 episode set for re mastering. IMHO if your going to take the time to change them to another format for viewing on various devices you might as well do the best possible job for each medium.

This probably doesn't doesn't work so well for fansub groups where "the fastest release" wins the popularity contest.

akupenguin
28th April 2008, 05:37
This probably doesn't doesn't work so well for fansub groups where "the fastest release" wins the popularity contest.
Why not? It's not like typical fansubs are released less than a day after the raws. 24h to encode one episode is plenty, even at 720p hq-insane. (And no, you don't have to wait for the translators, unless you're doing archaic hardsubs.)

IgorC
28th April 2008, 05:43
How about update to low price dual core something like E2180, mother,512 MB DDR2 etc... Around 200$ and it's pretty fast.

plonk420
28th April 2008, 06:58
Back when I did this more regularly I would usually spend a week on a 3 episode set for re mastering. IMHO if your going to take the time to change them to another format for viewing on various devices you might as well do the best possible job for each medium.

This probably doesn't doesn't work so well for fansub groups where "the fastest release" wins the popularity contest.

well, if a certain group had a translation i liked, i'd wait for it. i'd wait for *cough* CTU internals over the other groups from a certain joke-generating action-packed show because of their quality. well, SLIGHTLY better quality. the anime scene doesn't really have "only (legit) propers allowed" rules last i checked, either, so i'd stick with my fave group regardless of how many other crappy/differently translated releases came out before it by hours or days.

does the OP really have anything to do with scene/anime scene or anything? i ususally don't expect top quality from the internet anyways and prefer to do what i want with my own high quality sources (DVDs/Blu-rays), even though with high def i'm now back to encode times of xvid/divx back in the day...

edit: i think i vaguely remember 24-hour passes when it came to encoding monsters like The Matrix to (DC)VCD MPEG1...
edit2: keeping on topic, i say to just wait the extra time and do a full quality encode. check taskmanager to make sure the processor is being kept busy on pass 2. (and yes, do 2 passes) otherwise, just stick with xvid. xvid plays on more computers and standalones anyways and changes less... me, i'll stick to squeezing out that last drop of quality, even if i end up spending 300% more time and encoding it multiple times with multiple versions (of x264)

puffpio
28th April 2008, 09:03
i would 2nd using CRF
if quality matters more than filesize..CRF ensures a specific quality level...plus it's only one pass so that saves you some time

I use a CRF of 23-24 cuz my eyes are not as anal as a lot of others here :)

cogman
1st May 2008, 17:37
i would 2nd using CRF
if quality matters more than filesize..CRF ensures a specific quality level...plus it's only one pass so that saves you some time

I use a CRF of 23-24 cuz my eyes are not as anal as a lot of others here :)

Gahh! How does that not make your eyes bleed!, lol, j/k.

One more vote for CRF x264 has excellent bitrate controls, and does a really good job with crf.

If you want a faster encode then I would recommend taking your reference frames down to 2-3 and changing your motion search method to Hexagonal. That in itself should give a decent speed boost with a small quality drop.

ohh, looks like Dark Shikari said exactly that, Guess thats my fault for not reading the post all the way through :)

Blue_MiSfit
1st May 2008, 19:43
Yeah.. I'm a big fan of CRF also. It lets me backup a whole 1080p movie overnight, which is win.

~MiSfit

rebkell
1st May 2008, 20:40
Yeah.. I'm a big fan of CRF also. It lets me backup a whole 1080p movie overnight, which is win.

~MiSfit

I tried using crf after reading this thread the other day and it looks pretty good, I have a question and it pertains to the ffdshow decoder, I normally display the bit rate on the screen when I'm watching something, it's just interesting and out of the way anyway. But anyway, when I use crf 22, the bitrate seems to just climb higher and higher as the show/movie progresses and it also appears that the quality improves as the show plays out. I'm using megui with the PD-PS3-Xbox profile with crf 22 selected.

Am I imagining the increase in quality and does anyone know how the ffdshow bitrate that is displayed is calculated(average over a set time, instantaneous, etc)?

Blue_MiSfit
1st May 2008, 22:24
It's not accurate, from what I recall. It may be for MPEG-2 and MPEG-4 ASP, but I don't think it's accurate for AVC.

Don't quote me on it though :)

~MiSfit

ajp_anton
2nd May 2008, 03:42
does anyone know how the ffdshow bitrate that is displayed is calculated(average over a set time, instantaneous, etc)?I'm pretty sure it's an average for everything you've watched so far.