Log in

View Full Version : x264 speed


Pages : [1] 2

sirt
24th January 2013, 21:53
The basic question is I could I improve speed without being forced to adjust my preset ? Let's say I use medium. In my situation, encoding a movie in 2 pass (by resizing to HD Ready) would take 3 days or more. You can imagine how long it would be for a 4K and so on. If you have time, would mind downloading one of those 4K samples listed above by Blue_MisFit and encode them (High@L5.2/preset medium) and see how long it takes.

paradoxical
24th January 2013, 21:56
The basic question is I could I improve speed without being forced to adjust my preset ? Let's say I use medium. In my situation, encoding a movie in 2 pass (by resizing to HD Ready) would take 3 days or more.

I can encode 2 hour movies on an Athlon X2 4800+ in far less time than that and that processor is going on 8 years old. Maybe you need to get a computer from this decade?

sirt
24th January 2013, 22:55
Hi,

So here we go guys with my speed tradeoff thread. As explained elsewhere, my system doesn't allow me to benefit from x264 in any way. I have many DVDS I would like to encode with x264 instead of muxing their content into MKV containers. The problem is it is totally impossible if I use medium preset. I don't want to use a lower one and nor the highest.

Currently, any encode in 2 pass with medium preset leads to a practically never-ending process : it results in useless days of encoding that not only kill my computer but also prevent me from doing anything while encoding.

So, what x264 parmeters could be possible to muck with in order to speed up the process ? Of course I precise it is out of the question to use crf or a faster preset. Otherwise, is there something to configure on my system specifications ? My computer is 6 years old so I doubt it can't afford any decent encode.

paradoxical
24th January 2013, 22:59
Of course I precise it is out of the question to use crf or a faster preset.

Why? 2pass does not give you any better quality than CRF for a waste of encoding time unless you absolutely must have a specific size.

My computer is 6 years old so I doubt it can't afford any decent encode.

Yes, if your computer is 6 years old and an encode takes 3 days you are doing something wrong. As I said in the other thread, I can encode 2 hour movies with x264 on even a nearly 8-year-old Athlon 64 X2 4800+ in far less time than that.

So what exactly are your computer specs? What is your source resolution? What decoder are you using? What pre-filtering are you doing? What are your exact x264 settings. We need all this information before being able to help you.

sirt
24th January 2013, 23:23
I want to use 2pass because I would like to divide the source sizes by 2; the DVDs resolution are generally 720x480 or 720x476 and I simply crop black bars without resizing anything. I don't pre-filter anything for dvds in so far as I want to keep them in the exact way they are. Howhever, I may use avisynth scripts where I configure the cropping and import d2v files.

I don't understand why you ask me about which decoder I use ; In what way would this matter ?

I would like to use a comand line like this :


x264.exe --preset medium --tune film --pass 1 --bitrate xxxx --sar 1:1 -o file.mkv source.avs

x264.exe --preset medium --tune film --pass 2 --bitrate xxxx --sar 1:1 -o file.mkv source.avs


Finally here you go with my detailed system specifications : check the attached file.

paradoxical
24th January 2013, 23:32
I don't understand why you ask me about which decoder I use ; In what way would this matter ?

Because the decoder you use can greatly impact encoding speed since you have to decode the frames first.


I would like to use a comand line like this :


x264.exe --preset medium --tune film --pass 1 --bitrate xxxx --sar 1:1 -o file.mkv source.avs

x264.exe --preset medium --tune film --pass 2 --bitrate xxxx --sar 1:1 -o file.mkv source.avs


Finally here you go with my detailed system specifications : check the attached file.

Is that the actual command you use? There's no way that DVD resolution video would take 3 days to encode at medium settings on that processor if you are doing no prefiltering. As I said, I was encoding full length movies on a 4800+ in far less time than that. For example, an X2 5200+ can get nearly 7fps on the second pass of 720p encodes which would put it at about 8 hours for the second pass of a 2 hour movie. From here (http://www.anandtech.com/show/2832/12). It would be faster than that for DVD.

Guest
24th January 2013, 23:34
@Sirt

Can you post the actual command lines and Avisynth script you used that required 3 days for a DVD transcode?

filler56789
24th January 2013, 23:36
...
Of course I precise it is out of the question to use crf or a faster preset. Otherwise, is there something to configure on my system specifications ?

Yes, get a faster rig. Seriously. I myself have and use a machine which probably is even slower than yours, BUT I do not mind using --crf 21 plus 1 or zero B-frames plus --ref 2 maximum plus --rc-lookahead 10 plus --partitions none, for example.

paradoxical
24th January 2013, 23:38
Yes, get a faster rig. Seriously. I myself have and use a machine whuch probably is even slower than yours, BUT I do not mind using --crf 21 plus 1 or zero B-frames plus --ref 2 maximum plus --rc-lookahead 10 plus --partitions-none, for example.

Honestly he really doesn't need anything faster to get better than 3 days. From the Anandtech link I posted above the 5200+ gets 7fps on second pass for 720p encodes. Which would mean it can do a 2 hour movie in 8 hours for the second pass. He's claiming it's taking him nearly 9 times longer for the entire encode of a DVD source. There's something rather fishy going on as the 100 mhz less speed of the 5000+ would not cause encoding times to be 9 times longer especially with a lower resolution source.

sirt
24th January 2013, 23:42
Actually, it is unclear how I could set up the decoder : I simply use CLI x264 and that's all with official x264 (x264.nl) or Kmod builds from komisar site sometimes. What else should I do ? The encoded stream will finally be muxed with untouched audio via MKVmerge or YAMB.

Yes it is the actual command line. No way it can take less than at least one day to encode a full movie from a DVD with my computer. It even takes 2 or 3 hours while using XviD (3 Bframes, H264 matrix, well usual settings) ; my AVS script is incredibly simple : MPEG2SOURCE + crop(...) and that's all. Save this and then use the comand-line above. But there is something relatively annoying : each time I use x264 or encode anything the electric fan inside my computer is absolutely noisy. Does that have some influence ?

neuron2 : well that is the actual comand line ; I could even upload any of my DVDs but I don't think it will help. The bitrate used is generally around 1000 / 1500 kbit/s.

paradoxical
24th January 2013, 23:44
No way it can take less than at least one day to encode a full movie from a DVD with my computer.

Then you have something seriously jacked up or are not telling us exactly what you are doing. As I posted above, Anandtech benchmarked the 5200+ at ~30fps first pass and ~7 fps on second pass of a 720p MPEG-2 source encoded with x264. That means for a 2 hour movie you're looking at around ~10 hours total based on their figures. It's just not possible that a DVD resolution source would take 3 days even accounting for the 100mhz speed difference of your processor.

filler56789
24th January 2013, 23:48
Honestly he really doesn't need anything faster to get better than 3 days.

I know that --- and NOW I am sure his machine is faster than mine, which has never taken more than 10 or 12 hours to do a DVD reencode with x264. Therefore the actual problem is somewhere behind the "age" of his rig. :)

sirt
24th January 2013, 23:50
Okay, well then let me rip a personal DVD and use the actual comand-line with 1000 kbit/s right now. I will let it encode at night and see what happens. It is true I haven't encoded any full movie since a long time so let's see.

paradoxical
24th January 2013, 23:52
Okay, well then let me rip a personal DVD and use the actual comand-line with 1000 kbit/s right now. I will let it encode at night and see what happens. It is true I haven't encoded any full movie since a long time so let's see.

You also need to know that the benchmarks from Anandtech are also nearly 4 years old at this point and x264 is most likely substantially faster than it was then. So even if you were encoding things back in 2009 with x264 your results are just not possible unless you were doing something incredibly wrong. So, yes, actually do an encode and get results and then post exactly the commandline you used.

Groucho2004
24th January 2013, 23:53
Then you have something seriously jacked up or are not telling us exactly what you are doing.
Maybe the CPU cooler is full of dust and/or needs re-seating. The CPU might be throttling as a result when tortured with x264.

paradoxical
24th January 2013, 23:55
Then you have something seriously jacked up or are not telling us exactly what you are doing.
Maybe the CPU cooler is full of dust and/or needs re-seating. The CPU might be throttling as a result.

Unless it was throttling itself down to sub ghz speeds, his results would still not be possible in that case. He was claiming nearly 3 days to encode a DVD source. Anandtech benchmarked 720p on a 100mhz faster 5200+ in less than 10 hours. The math just wouldn't add up.

sneaker_ger
25th January 2013, 00:07
For comparison: my three year old Core i7-860 does 720x576 preset medium (CRF) with some 100 fps, so a 2 hour movie takes 30 minutes to encode. Three days (where did he say that btw.?) is just broken. You can check the CPU clocks and temp using CoreTemp (http://www.alcpu.com/CoreTemp/).

Also, the last time I looked, x264 beat xvid in both speed and quality, given the appropriate settings, so there is basically no reason to use xvid except for compatibility to old hardware.

paradoxical
25th January 2013, 00:15
Three days (where did he say that btw.?) is just broken.

He said it in a post in the "4K Video with x264" thread. I think it was one that was deleted.

sneaker_ger
25th January 2013, 00:17
I see.

Guest
25th January 2013, 01:33
It is true I haven't encoded any full movie since a long time so let's see. One wonders why you would start a thread like this, given that fact.

I will restore the deleted posts and move them here. EDIT: Done.

paradoxical
25th January 2013, 01:35
One wonders why you would start a thread like this, given that fact.

Yeah, it's rather bizarre to state things as facts when you haven't even used the software "since a long time". But as I said, even back in 2009, his results were not possible as that's when the benchmarks for the 5200+ were from.

Guest
25th January 2013, 01:42
Yes indeed, especially given the word "currently" in this:

Currently, any encode in 2 pass with medium preset leads to a practically never-ending process : it results in useless days of encoding that not only kill my computer but also prevent me from doing anything while encoding. He also talks about encoding to "HD Ready" but there is no resizing in the script. But let's overlook all that and see what his "current" results really are for a full DVD.

sirt
25th January 2013, 02:09
neuron2 : because I am curious and also experimenting ? Above I was also referring to encoding Blu rays, but that is another story. Last time I tried it took...a week, all that for absolutely nothing.

sirt
25th January 2013, 02:26
Okay, so as surprising as it it for me, the encode took approximately two hours but it is a SD NTSC dvd, not a bluray. I didn't force --slow-firstpass during the first pass which lasted 30 minutes in the contrary to the second one which lasted 1h30 ;

Here is the avs script :


DirectShowSource("C:\COPS_TEST\cops.m2v")
telecide(5)
tdecimate()
crop(20,2,-4,-2)


I demuxed both audio and video with DGindex and used the resulting m2v as my source to encode. As it is telecined, I just applied telecide which I don't except to slow down the encoding process.

Secondly, here is the poor elaborated command-line used to encode :


x264.exe --preset medium --tune film --pass 1 --bitrate 1000 --sar 1:1 -o cops_pass1.mkv cops.avs 2>log_pass1.txt

x264.exe --preset medium --tune film --pass 2 --bitrate 1000 --sar 1:1 -o cops_pass2.mkv cops.avs 2>log_pass2.txt


Finally, you can take a look at both passes logs :

Pass 1 :


[mpegvideo @ 03cef8a0] max_analyze_duration 5000000 reached at 5005000
[mpegvideo @ 03cef8a0] Estimating duration from bitrate, this may be inaccurate
[mpegvideo @ 03cefa20] max_analyze_duration 5000000 reached at 5005000
[mpegvideo @ 03cefa20] Estimating duration from bitrate, this may be inaccurate
avs [info]: 696x476p 1:1 @ 8000000/333667 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Slow SlowCTZ
x264 [info]: profile Main, level 3.0
x264 [info]: frame I:784 Avg QP:19.82 size: 26074
x264 [info]: frame P:44348 Avg QP:22.68 size: 7817
x264 [info]: frame B:43809 Avg QP:24.19 size: 2210
x264 [info]: consecutive B-frames: 18.7% 39.4% 22.2% 19.7%
x264 [info]: mb I I16..4: 38.5% 0.0% 61.5%
x264 [info]: mb P I16..4: 25.2% 0.0% 0.0% P16..4: 64.8% 0.0% 0.0% 0.0% 0.0% skip:10.1%
x264 [info]: mb B I16..4: 2.6% 0.0% 0.0% B16..8: 27.5% 0.0% 0.0% direct:18.4% skip:51.5% L0:30.9% L1:49.9% BI:19.2%
x264 [info]: final ratefactor: 21.00
x264 [info]: coded y,uvDC,uvAC intra: 37.0% 64.6% 28.6% inter: 20.7% 26.6% 0.7%
x264 [info]: i16 v,h,dc,p: 34% 31% 23% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 31% 16% 3% 6% 5% 6% 5% 7%
x264 [info]: i8c dc,h,v,p: 49% 26% 18% 7%
x264 [info]: Weighted P-Frames: Y:7.2% UV:2.2%
x264 [info]: kb/s:1000.49

encoded 88941 frames, 50.00 fps, 1000.50 kb/s



Pass 2 :


[mpegvideo @ 03c1f8a0] max_analyze_duration 5000000 reached at 5005000
[mpegvideo @ 03c1f8a0] Estimating duration from bitrate, this may be inaccurate
[mpegvideo @ 03c1fa20] max_analyze_duration 5000000 reached at 5005000
[mpegvideo @ 03c1fa20] Estimating duration from bitrate, this may be inaccurate
avs [info]: 696x476p 1:1 @ 8000000/333667 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Slow SlowCTZ
x264 [info]: profile High, level 3.0
x264 [info]: frame I:784 Avg QP:21.06 size: 22054
x264 [info]: frame P:44348 Avg QP:23.66 size: 7652
x264 [info]: frame B:43809 Avg QP:25.59 size: 2443
x264 [info]: consecutive B-frames: 18.7% 39.4% 22.2% 19.7%
x264 [info]: mb I I16..4: 12.0% 74.2% 13.8%
x264 [info]: mb P I16..4: 1.5% 6.1% 0.7% P16..4: 57.7% 16.4% 8.6% 0.0% 0.0% skip: 9.1%
x264 [info]: mb B I16..4: 0.1% 0.3% 0.0% B16..8: 47.8% 3.4% 0.5% direct: 3.2% skip:44.7% L0:39.8% L1:55.9% BI: 4.2%
x264 [info]: 8x8 transform intra:73.7% inter:78.1%
x264 [info]: coded y,uvDC,uvAC intra: 71.5% 84.3% 44.2% inter: 26.8% 42.8% 1.5%
x264 [info]: i16 v,h,dc,p: 20% 32% 7% 41%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 21% 18% 5% 7% 7% 8% 7% 8%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 33% 13% 4% 7% 6% 8% 4% 5%
x264 [info]: i8c dc,h,v,p: 47% 26% 15% 11%
x264 [info]: Weighted P-Frames: Y:7.2% UV:2.2%
x264 [info]: ref P L0: 55.5% 16.7% 19.8% 7.4% 0.5%
x264 [info]: ref B L0: 78.4% 19.4% 2.2%
x264 [info]: ref B L1: 95.1% 4.9%
x264 [info]: kb/s:999.97

encoded 88941 frames, 15.28 fps, 999.97 kb/s


So it is probably not bad regarding the time spent but encoding speed used during second pass remains still slow (15.28 fps) and I haven't applied any slow settings nor filter (such as mctemporaldenoiser that I usually gives a try and that is infamously slow).

Then is all that relatively correct ? What could I change ?

Guest
25th January 2013, 02:33
What is Telecide(5)? It makes no sense to me. Did you mean TFM()? What is the 5?

Of course, external IVTC is going to give you a fairly big hit to processing time, especially with post-processing, just like any other filtering.

That's not a DVD, right?

sirt
25th January 2013, 02:40
Well I used Telecide(5) to ivtc the interlaced source and Decimate so as to reverse it back to its original 23.976 img/s framerate. I rarely use TFM().

After reflexion, I think the infamously long encodes I've done in the past can be attributed to the denoising filtere used, notably mctemporaldenoise than can considerably slow down the process, especially if I apply it on some places via Trim function. I can try to redo this encode with mctemporal(mode="medium") on but I am pretty sure it will too slow.

It is a random DVD I have, this one : http://dangerousminds.net/comments/johnny_rotten_harvey_keitel_star_in_cop_killer_aka_the_order_of_death_aka_c

Guest
25th January 2013, 02:46
Well I used Telecide(5) to ivtc the interlaced source and Decimate so as to reverse it back to its original 23.976 img/s framerate. I rarely use TFM().. Maybe you don't know that I am the author of Telecide(). I'm telling you, that 5 in there is nonsense. What do you think that 5 is and why did you put it there? Could it be the cycle parameter to Decimate() but you put it in the wrong filter?

Talking about IVTC'ing interlaced source is also nonsense.

BTW, it's more usual to use Telecide() with Decimate(), and TFM() with TDecimate(). But I suppose there's no harm in mixing and matching. :)

Guest
25th January 2013, 03:03
It is a random DVD I have, this one : http://dangerousminds.net/comments/johnny_rotten_harvey_keitel_star_in_cop_killer_aka_the_order_of_death_aka_c OK. If it is soft telecined you will save a lot of time by using Force Film rather than external IVTC. If it is actually interlaced, then of course you shouldn't be doing IVTC at all. What is the actual nature of the video?

I'm asking these things because you asked us if your process is correct and can it be improved.

sirt
25th January 2013, 03:03
Oh well, stupid mistakes : I should have used Telecide() + Decimate(5) in fact ; I didn't pay attention to this in so far I just wanted to encode it. But strangly this error doesn't seem to have had an impact.

I can upload a sample from both original source (that I demuxed as an m2v file) and the encoded one if needed.

EDIT : But look, I am not focusing on deinterlacing or ivtcing at all. I should have probably choosen another source or encode the later interlaced.

EDIT2 : thanks for you help regarding improvement but my concern was only about how to speed up the encode. I'm sorry if I confused you with those additionnal lines I should have not used because it is not the reason for which I opened this thread.

EDIT3 : original sample, cut with Mpeg2File from the m2v file created with DGindex : http://www.sendspace.com/file/btuqaz
Sample from the 2 pass encoded stream : http://www.sendspace.com/file/8o4tre

paradoxical
25th January 2013, 03:09
Okay, so as surprising as it it for me, the encode took approximately two hours but it is a SD NTSC dvd, not a bluray.

Why was it surprising? I showed you benchmarks from 2009 showing that a 720p encode on a 5200+ could be done in around 10 hours. Your numbers of "3 days" or "a week" seem to be stuff you're making up to be honest.

Above I was also referring to encoding Blu rays, but that is another story. Last time I tried it took...a week, all that for absolutely nothing.

Sorry, I don't buy it. Full-length Bluray movies can easily be encoded at 1080p in 12-16 hours on my 4800+ with moderate settings.

Guest
25th January 2013, 03:18
thanks for you help regarding improvement but my concern was only about how to speed up the encode. Your encode will include your filtering. You reported ridiculously long encode times. I am trying to help you see that there are important factors other than just your x264 options that determine your encode time. You should be able to determine the nature of that video in 2 minutes. There's no need to upload it for me. Your inability to properly analyze the video and choose appropriate filtering is way more significant than tweaking a few x264 parameters. If you are not interested in that, then I will butt out.

sirt
25th January 2013, 03:19
Yes, in fact I realized all this problem is probably related to the slow filtering I may have applied at that time (mctemporaldenoise, temporaldegrain...)

Well of course I should use the methods I read on your site(Separetefields() AssumeTFF() and so on as you explained step by step) but as I said I was not interested in anything excepted encode the full movie. I just wanted to ivtc it without checking the nature. I know what you mean : I would have be more carefull with the nature of the content instead of applying that random telecide. That's it. In fact those too lines lead to some confusion : my goal was just to encode it but as it was 29 img/s fps I ivtced without paying attention. I know it is wrong but It didn't matter to me as much as only encode the full movie is what I aimed that.

Guest
25th January 2013, 03:27
I know it is wrong but It didn't matter to me ... Try SelectEvery() to decimate the next time you don't care.

Guest
25th January 2013, 03:32
That doesn't look like DVD quality. Where did you buy it if I may ask?

sirt
25th January 2013, 03:32
What do you mean ? There is a misunderstanding : you probably think I asked for help regarding deinterlacing and improvement. But I probably didn't express myself clearly enough. My concern is to encode quicker, the telecide+decimate is another external mistake I commited. As you see average encoding speed during the second pass is around 15 fps which I consider relatively slow. Then, I would like to know if I can do something to speed up the process without changing the preset. It would be great if the encoding would reach 100 fps.

Well, you will probably be entairtained but it is unwanted article an ebay seller sent to me with another package I got from him. I've never watched nor use this poor dvd until now. It is some pretty useless and unknown material.

Guest
25th January 2013, 03:39
Thanks for clarifying about the source.

"As you see average encoding speed during the second pass is around 15 fps which I consider relatively slow."

Again, relative to what? Try the same thing with Xvid and let us know what you get.

"I would like to know if I can do something to speed up the process without changing the preset."

Reduce filtering overhead or get a faster machine. Are you looking for some magic bullet?

And BTW, external IVTC is the correct thing for that video. :)

EDIT: Oh, I forgot you wrote:

"It even takes 2 or 3 hours while using XviD"

Assuming say 120,000 frames that is about 11fps encoding, so x264 is faster. Did I make a math mistake? I don't think so, because you said your x264 encode took 2 hours. So what did you mean by x264 being "relatively slow"?

You say you want 100fps. You think some tweak can give you a ~7-times speedup? And why stop at 100fps? Why not ask for 1000? :)

sirt
25th January 2013, 03:41
Ok, then I will reply back later with the result. Nonetheless, I don't really know how I could encode this with xvid in order to compare it to the later x264 encode.

Guest
25th January 2013, 04:05
Ok, then I will reply back later with the result. Nonetheless, I don't really know how I could encode this with xvid in order to compare it to the later x264 encode. I'm confused. You don't know how to encode with Xvid? But you told us Xvid encodes take 2-3 hours. I mean, this thread is quite amusing, but now it's getting bizarre.

sirt
25th January 2013, 09:04
I think I don't express myself correctly : I don't know how to exactly set XviD in order to compare the encode with my previous x264 one ; I Could make one random rip of course. I will reply back with the result.

And yes of course 1000 fps would be perfect, 10000000 fps even better! But 15 fps is not great to my mind, I could apply mctemporaldenoise(preset="medium") and it would take an infinity which is really bad imo. But of course this apply to my particular situation. Does that all this mean I have to stick with my actual encoding speed without being able to raise it ?

Ok, so I've encoded late night the AVS same script with XviD ; unfortunately the log doesn't feature encoding time and usefull datas :


# XviD 2pass stat file (core version 1.3.2)
# Please do not modify this file

i 2 1320 0 0 10832 4203
b 4 0 1320 0 1137 1126
b 4 0 1320 0 1134 1120
p 2 0 1301 19 4660 1966
b 4 0 1320 0 1241 1233
b 4 0 1320 0 1235 1232
...
ect


All slow things were on : treillis, wide search 4, ultra-high 6variance-masking, bitrate : 1000 like above and so on. It took even more than with x264 : 2h an the half.

kypec
25th January 2013, 09:14
But there is something relatively annoying : each time I use x264 or encode anything the electric fan inside my computer is absolutely noisy. Does that have some influence ?


Maybe the CPU cooler is full of dust and/or needs re-seating. The CPU might be throttling as a result when tortured with x264.

I think Groucho2004 hit the nail here. I myself have been suffering from the very same problem with my PC (CPU = i920 @ stock clock) that was equipped with insufficient cooler and/or badly installed. Each time I started x264 encode it throttled down to about 30% of nominal full speed which, of course, had awful performance impact. :(
Once I replaced that cooler with better one the CPU runs at full speed even under full load and encoding performance for DVD @ CRF=20 takes about 20-30 minutes per 2h movie.:)

kypec
25th January 2013, 09:28
But 15 fps is not great to my mind, I could apply mctemporaldenoise(preset="medium") and it would take an infinity which is really bad imo.
You must understand that applying heavy filters like MCTD, QTGMC and others will take enormous long time to deliver decoded & filtered frames to encoder. If you can't afford waiting that long you have no other choice but not use those filters, end of story.
Please look at the below figures to get an idea how modern CPU (i7-2600 @ 3.40 GHz) can speed up the encoding process ;)
# Initialize variable with path to my A/V tools
plugindir="C:\PROGRAM FILES (x86)\AVTools\plugins\"
# Load all the plugins that will be used in the script
LoadPlugin(plugindir + "DGMPGDec\DGDecode.dll")
# Open source video clip
MPEG2Source("D:\Source\BezvaFinta\VTS_02_PGC_01_1.d2v", info=3)
# Crop to get rid of ugly overscan issues
Crop(10,14,-10,-14)
Spline36Resize(720, 576)

Simple x264 Launcher (Build #360), built 2012-09-26

Job started at 2012-10-17, 14:06:27.

Source file: D:/Source/BezvaFinta/main.avs
Output file: D:/Source/BezvaFinta/main.264

--- SETTINGS ---

RC Mode: CRF
Preset: Veryslow
Tuning: Film
Profile: Auto
Custom: --sar 64:45

--- CHECK VERSION ---

Creating process:
"C:/Program Files (x86)/AVTools/Simple x264 Launcher v2/toolset/x264_8bit_x64.exe" --version

x264 0.128.2216 198a7ea
(libswscale 2.1.101)
(libavformat 54.25.105)
(ffmpegsource 2.17.2.1)
built by Komisar on Sep 6 2012, gcc: 4.7.1 (multilib.generic.Komisar)
configuration: --bit-depth=8 --chroma-format=all
x264 license: GPL version 2 or later
libswscale/libavformat/ffmpegsource license: GPL version 2 or later

Creating process:
"C:/Program Files (x86)/AVTools/Simple x264 Launcher v2/toolset/avs2yuv_x86.exe"

Avs2YUV 0.24bm2

x264 revision: 2216 (core #128)
Avs2YUV version: 0.24.2

--- AVS INFO ---

Creating process:
"C:/Program Files (x86)/AVTools/Simple x264 Launcher v2/toolset/avs2yuv_x86.exe" -frames 1 D:\Source\BezvaFinta\main.avs NUL

D:\Source\BezvaFinta\main.avs: 720x576, 25 fps, 163675 frames

Resolution: 720x576
Frame Rate: 25
No. Frames: 163675

--- ENCODING ---

Creating Avisynth process:
"C:/Program Files (x86)/AVTools/Simple x264 Launcher v2/toolset/avs2yuv_x86.exe" D:\Source\BezvaFinta\main.avs -

Creating x264 process:
"C:/Program Files (x86)/AVTools/Simple x264 Launcher v2/toolset/x264_8bit_x64.exe" --crf 20.0 --preset veryslow --tune film --sar 64:45 --output D:\Source\BezvaFinta\main.264 --frames 163675 --demuxer y4m --stdin y4m -

y4m [info]: 720x576p 64:45 @ 25/1 fps (cfr)
x264 [info]: using SAR=64/45
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
x264 [info]: profile High, level 4.0
x264 [info]: frame I:1142 Avg QP:18.22 size: 49241
x264 [info]: frame P:34435 Avg QP:21.63 size: 17420
x264 [info]: frame B:128098 Avg QP:26.29 size: 4356
x264 [info]: consecutive B-frames: 1.2% 1.5% 9.1% 20.7% 11.5% 53.1% 2.0% 0.5% 0.3%
x264 [info]: mb I I16..4: 4.8% 76.8% 18.4%
x264 [info]: mb P I16..4: 2.0% 14.6% 2.1% P16..4: 42.2% 18.6% 13.0% 0.5% 0.1% skip: 6.9%
x264 [info]: mb B I16..4: 0.1% 1.1% 0.2% B16..8: 38.7% 9.1% 2.2% direct: 4.6% skip:44.0% L0:38.9% L1:47.4% BI:13.7%
x264 [info]: 8x8 transform intra:77.8% inter:68.5%
x264 [info]: direct mvs spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 82.9% 68.2% 29.4% inter: 19.3% 15.8% 1.2%
x264 [info]: i16 v,h,dc,p: 35% 18% 8% 39%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 10% 5% 8% 12% 14% 11% 13% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 9% 3% 8% 12% 16% 11% 12% 10%
x264 [info]: i8c dc,h,v,p: 29% 27% 26% 18%
x264 [info]: Weighted P-Frames: Y:3.9% UV:0.9%
x264 [info]: ref P L0: 45.9% 13.5% 17.8% 4.4% 4.3% 2.6% 2.8% 1.3% 1.5% 1.0% 1.1% 0.8% 0.9% 0.7% 0.8% 0.6%
x264 [info]: ref B L0: 85.6% 7.8% 2.2% 1.1% 0.7% 0.6% 0.5% 0.3% 0.2% 0.2% 0.2% 0.2% 0.2% 0.1% 0.1%
x264 [info]: ref B L1: 96.2% 3.8%
x264 [info]: kb/s:1483.60
encoded 163675 frames, 7.13 fps, 1483.60 kb/s
av2y [info]: D:\Source\BezvaFinta\main.avs: 720x576, 25 fps, 163675 frames
Final file size is 1,214,141,616 bytes.

--- DONE ---

Job finished at 2012-10-17, 20:28:58. Process took 382 minutes, 31 seconds.

sirt
25th January 2013, 10:05
Okay, thanks for your advise. The problem is I am not specialized in building a pc at all, so I don't think there is a chance I replace myself this cooler. All I have ever done is dissassembled my tower and swabed meticulously inside which help avoid this annoying noise problem for a while but it came back.

EDIT : well your encoding process is of course impressive but please try out : mctemporaldenosie(preset="medium") before crop and encode it again.

EDIT2 : why did you use such a sar ?

Guest
25th January 2013, 14:55
I don't think there is a chance I replace myself this cooler. Then you should take the PC to a repair shop. If your main CPU cooler is dying and you let it fully expire, then you will likely destroy the processor.

sirt
25th January 2013, 15:22
And do you mean encoding more and more really affects the processor ? The fact is I daily do encoding tests. Back to my problem : in order to speed up the process it looks as if there is solution excepted getting another computer. But which component(s) should I change - in the contingency it is possible to - in order to remedy to this situation ? Is that reasonable or should I buy a computer and for the later which one or type would be suitable for encoding tests ?

Guest
25th January 2013, 15:28
No I don't mean that. I mean if the CPU fan fully fails, then say bye-bye to your processor. But you haven't even told us which fan it is, there are several. So take it to a shop if you don't have the expertise yourself.

You should first determine the actual cause of your problem, if indeed there is a problem. For example, is your CPU throttling back? If so, you can increase performance by fixing your cooling.

But your results are close to the expected results, aren't they? As I said, there is no magic bullet to increase your speeds to 100 or 1000 fps. Check the benchmarks for other machines/CPUs and you'll be able to assess what speedup is possible compared to your current machine. Then you have to decide whether it is worth the money.

paradoxical
25th January 2013, 15:37
As you see average encoding speed during the second pass is around 15 fps which I consider relatively slow. Then, I would like to know if I can do something to speed up the process without changing the preset. It would be great if the encoding would reach 100 fps.

How do you think you can magically get encoding speed up without changing the x264 settings? It's just not possible to get anywhere near 100fps on your hardware without doing so. Are you pulling our leg here with this?


But which component(s) should I change - in the contingency it is possible to - in order to remedy to this situation ?

Faster CPU and more, lower-latency memory, and you could throw in a good GPU for accelerated decoding. A fast SSD would probably also help, too, but would probably be less helpful than the CPU/memory option.

Groucho2004
25th January 2013, 18:07
And do you mean encoding more and more really affects the processor ?
The main problem is heat. Modern processors can last many years even if they regularly do heavy lifting like x264 encoding if you keep the core temperature low (let's say 50 degrees Celsius).

When constantly operated at the edge of their thermal envelope (~ 90 degrees Celsius), they will probably not last long. You will find these temperatures quite frequently in these (not exclusive) scenarios:
- heavily overclocked CPU
- crappy cooler
- cooler not installed properly / dust

kypec
25th January 2013, 19:39
EDIT : well your encoding process is of course impressive but please try out : mctemporaldenosie(preset="medium") before crop and encode it again.
Sorry, I'm not going to try this out just for your demonstration. Indeed, you were already told that heavy Avisynth processing like MCTD and similar would slow down the encoding considerably. No encoder can run faster than it is fed frames from frame server (Avisynth in this case). Please use AVSMeter (http://forum.doom9.org/showthread.php?p=1585008#post1585008) to measure how fast is your AVS script running before evaluating whole AVS --> x264 chain and making wrong conclusions what the real bottleneck is.

EDIT2 : why did you use such a sar ?
In order to get proper DAR (Display Aspect Ratio) which is 16:9 for this movie.
Hint: SAR = DAR / FAR
SAR = (16/9) / (720/576) = 64/45

sirt
25th January 2013, 21:36
I don't understand why you need as much precision as this and why --sar 1:1 won't satisfy you or --sar 16:9 ; to be honest, even if I already asked about the difference between DAR and SAR why would set anyone of them in the x264 comand-line ? I think it is unclear for me why one would be different from another. I generally never set any sar nor dar, just adjust it via MKVmerge. Is that weird ?

kypec, I am aware the encoder can't run faster than the fed frames but I guess all the trouble here is imputed to mctemporalfilter (not even to mention temporaldegrain which is slower) ; what would be the point of "measuring" how fast would be such and script ? The same would happen : the impossibility to encode the video when it is on. Or use MCspuds which is really fast and gives similar result to mctemporaldenoise. But if you add my computer is rather slow, anything can be great. Well if you have the time, you could just encode a short sample (5 minutes) with and without mctemporaldenoise(preset="medium") enabled in order to figure out if there is a huge difference, or well, report back AVSMeter results regarding both corresponding AVS that would be used.

Groucho2004
25th January 2013, 23:11
kypec, I am aware the encoder can't run faster than the fed frames but I guess all the trouble here is imputed to mctemporalfilter (not even to mention temporaldegrain which is slower) ; what would be the point of "measuring" how fast would be such and script ? The same would happen : the impossibility to encode the video when it is on. Or use MCspuds which is really fast and gives similar result to mctemporaldenoise. But if you add my computer is rather slow, anything can be great.
At the beginning of the thread you complained that encoding a DVD takes days on your computer even though you're not using any filtering. Then, all of a sudden, that process takes 2 hours. Now you're saying that "all the trouble" is caused by a very slow noise filter.

Well if you have the time, you could just encode a short sample (5 minutes) with and without mctemporaldenoise(preset="medium") enabled in order to figure out if there is a huge difference, or well, report back AVSMeter results regarding both corresponding AVS that would be used.
How would that be helpful to you? Kypec is using a i7 which has a completely different architecture than your AMD. How is that even related to this topic?