Log in

View Full Version : x264 - Usual encoding speed drops to less than 1fps


odin24
5th July 2009, 18:28
I'm using x264, build 1173 on Vista 32bit, quad core. I start an encoding through MeGUI, use a profile as usual, the encoding starts OK, first pass is at ~24fps then drops off to approx 1fps. I've tried on 3 different video files, my usual speed for these settings is ~20-24fps.

I've tried to reinstall MeGUI, even using old builds of x264... I'm not sure what is going on? Any suggestions or help would be appreciated, thanks.

Here is the settings I use.

program --pass 2 --bitrate 9189 --stats "C:\Program Files\megui\.stats" --keyint 24 --min-keyint 1 --ref 4 --mixed-refs --no-fast-pskip --bframes 3 --b-pyramid --weightb --direct auto --subme 7 --trellis 2 --partitions all --8x8dct --qpmin 8 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 30000 --vbv-maxrate 38000 --qcomp 0.5 --me umh --threads auto --thread-input --progress --no-dct-decimate --no-psnr --no-ssim --output "output" "input" --mvrange 511 --aud --nal-hrd --sar 1:1

Fr4nz
5th July 2009, 20:16
What is your CPU?

buzzqw
5th July 2009, 20:32
post avs script

BHH

odin24
5th July 2009, 23:38
I also tried removing the "convertFPS", and changing it to false... at which point the encoder didn't even start, however the timer started. Thanks for your help.

This issue is new, I have encoded numerous times using the same script (I think... without the "convertFPS"). The script was created by MeGUI AVS Script Creator.

Script
DirectShowSource("C:\Videos\video.mkv", fps=23.976, audio=false, convertfps=true)
#deinterlace
#crop
#resize
#denoise

CPU
Intel Core 2 Quad Q6600 @ 2.4GHz
4GB RAM
Vista 32 bit

10L23r
6th July 2009, 02:11
ouch... what settings did u use for first pass?
can u play your avisynth script in realtime in mpc? maybe try x264 cli.
does this happen with other sources?

odin24
6th July 2009, 03:32
ouch... what settings did u use for first pass?
can u play your avisynth script in realtime in mpc? maybe try x264 cli.
does this happen with other sources?

The AVS script plays fine in MPC-HC, not sure what you mean for settings on first pass. Like I said... I've used these settings numerous times before, on other videos with success. A typical encode for a 2hr video would take approx 12-16hrs. For some reason now, on several videos I get the same problem... approx 1 minute into the play time the encoding rate on the first pass (in fps) drops from ~24 to less than 1fps. Nothing has changed since my last encoding, except the x264 version... and possibly the MeGUI version. The problem also occurs on older versions of x264, and MeGUI... or the encoding doesn't start at all.

I could try the x264 cli... not sure how though.

Thanks for the response.

10L23r
6th July 2009, 04:51
in megui, for automated 2pass, the 1st pass settings r either the same as those of the 2nd pass unless "turbo" is checked, in which case the 1st pass settings are the same as the 2nd pass settings except certain options are decreased for speed. (note that turbo's influence on the quality of the final video is usually too small to be noticed)

maybe this is a memory problem... or your cpu is getting too hot. try restarting your computer :D

it could be that a background process is sucking up cpu time.

on cli: get x264.exe from x264.nl
save it in a random folder (it's easier to have x264.exe in the folder with the .avs source)
open up command prompt
"cd" to the random folder (e.g. cd \dslkfj\asdkfa\videofolder)
type in x264.exe --help if u need help
otherwise, just copy megui's "program --..... --output 'output' 'input' " thingy into command prompt (right click, paste). replace program with x264.exe, "output" with ur desired name for the output file, and "input" with the filename of ur avisynth script
u should take out "--stats "C:\Program Files\megui\.stats"

saint-francis
6th July 2009, 05:43
I could try the x264 cli... not sure how though.

Thanks for the response.

In the MeGUI log copy out the commands, remove anything that is before "C:\Program Files (x86)\megui\tools\x264\x264.exe" and save it as .bat as opposed to .txt. If you are using 2 pass there will be two commands. Just place the first one before the second one in in the same file, but be sure to keep them on separate lines. Once you have this done all you need to do is double click on the .bat and it will run the entire 2 pass process.

odin24
6th July 2009, 16:16
Well, the strange keeps getting stranger. I muxed the same video to m2ts and it is encoding normal again... not sure why.

A while ago, I had a similar problem... except in reverse.... the encoding speed would fly through the roof if I encoded from MKV, and used similar settings. I did the same to work around the issue, muxed to m2ts.

If any brilliant minds here has an explanation to this, I'm all ears. I think I eventually re-installed FFDshow and the problem went away, I think I'll try this again... eventually.

Thanks for your help people.

10L23r
6th July 2009, 18:25
directshowsource was probably the problem. u should use ffmpegsource. it's much easier, and it's frame-accurate

odin24
6th July 2009, 19:29
directshowsource was probably the problem. u should use ffmpegsource. it's much easier, and it's frame-accurate

I use directshowsource for m2ts as well... or at least MeGUI uses it.

Inspector.Gadget
6th July 2009, 20:04
odin24, MeGUI only uses DirectShowSource if you haven't bothered to index the M2TS file first. Use DGIndex for MPEG-2 or DGAVCIndex for H.264 - VC-1 should be handled with DGVC1DecNV, ffmpegsource, or DSS2.

odin24
6th July 2009, 20:31
Great, thanks for the advice.