View Full Version : [x264] First pass slow???
nickolasemp
27th August 2011, 14:33
Hello to the world once again. I need your advice. I am about to encode a video file and the arguments (as shown in MeGui) are as shown below:
x264.exe --pass 1 --bitrate 4275 --stats ".stats" --deblock -1:-1 --b-adapt 2 --ref 5 --qpmin 10 --qpmax 51 --me umh --direct auto --subme 6 --partitions all --trellis 2 --zones 187300,189600,b=0.2/189601,195404,b=0.1 --sar 1:1 --output NUL "sample.avs"
x264.exe --pass 2 --bitrate 4275 --stats ".stats" --deblock -1:-1 --b-adapt 2 --ref 5 --qpmin 10 --qpmax 51 --me umh --direct auto --subme 6 --partitions all --trellis 2 --zones 187300,189600,b=0.2/189601,195404,b=0.1 --sar 1:1 --output "sample.mp4" "sample.avs"
My question is this: Why does the first pass has the same amount of fps as the 2nd does? I have not enabled slow first pass anywhere...
I got my x264 from here (http://komisar.gin.by/), as suggested by crl2007 (http://forum.doom9.org/showthread.php?p=1410709#post1410709).
LoRd_MuldeR
27th August 2011, 14:36
You may be bottlenecked by slow input. How does your Avisynth script look?
Also: Why not using the preset/tune system? You could throw out most of your parameters and use something like "--preset slow --tune film" instead.
nickolasemp
27th August 2011, 14:41
My script is this:
LoadPlugin("E:\demuxed\H264StereoSource.dll")
LoadPlugin("E:\demuxed\DGAVCDecode.dll")
lv=crop(AVCSource("left.dga"),0,132,-0,-132)
rv=crop(H264StereoSource("decoder.cfg",196215),0,132,-0,-132)
LeftRight3D(lv, rv)
ConvertToYV12()
Trim(0,4000)
Should I replace LeftRight3D with StakHorizontal(lv,rv)? Do you think that this is the bootleneck or is it H264StereoSource?
--Edit #1
You are probably right about the presets but I want to have more control over stuff.
Take into consideration that input file is 3840x816... But still 1st pass should be more than just 6fps that 2nd pass reaches.
--Edit #2
I am running CLI x264... for future reference.
LoRd_MuldeR
27th August 2011, 15:04
DGAVCDecode/AVCSource is outdated and discontinued. Either upgrade to DGDecNV or give FFmpegSource2 a try!
Also I would highly recommend to open your script in something like VirtualDub in order to check the output speed of your script alone.
x264 cannot process the frames faster than they are delivered by the input script. Anyway, 3840x816 is pretty big...
nickolasemp
27th August 2011, 15:32
DGAVCDecode/AVCSource is outdated and discontinued. Either upgrade to DGDecNV or give FFmpegSource2 a try!
FFmpegSource cannot handle raw streams of h264 unfortunately... So I tried to put it in mkv... After indexing it, everything works fine.
I must admit I saw a bit of a gain (from 6.40 to 7.63 in first pass).
nickolasemp
28th August 2011, 14:56
Well, I saw that second pass doesn't use all the resources, therefore I am inclining to believe that it is Avisynth's fault. Checked with 2.5.8 st, 2.6 st, 2.6 mt and all give the same result... low fps in every single pass.
Also I would highly recommend to open your script in something like VirtualDub in order to check the output speed of your script alone.
How can I test my script? Is there any option to do this? :thanks:
--Edit
H264StereoSource.dll cannot cooperate with VirtualDub. :mad:
LoRd_MuldeR
28th August 2011, 15:04
How can I test my script? Is there any option to do this? :thanks:
TimeCodec:
http://haali.cs.msu.ru/mkv/timeCodec.exe
(I would recommend to use "AVI Decompressor" as Codec and the "Null" renderer)
Stereodude
29th August 2011, 00:38
AVSmeter is another option.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.