Log in

View Full Version : x264 - First 12000 frames encode very slow


Penecho
15th March 2012, 16:21
So i was wondering what could be wrong there.

I pretty often record stuff from TV and encode it to x264 afterwards. Source is 1080i @ 25 FPS. I usually make a 720p x264 encode (in commandline, not megui).

The weird thing is, that around the first 12000 frames the encode x264.exe only runs at around 1,07 fps, and after the 12000 frames it runs as it should, with ~16 fps.

My avs script looks like this:


DirectShowSource("X:\Temp\record.ts", fps=25.000, audio=false, convertfps=true).AssumeFPS(25,1)
Load_Stdcall_Plugin("C:\Program Files (x86)\Megui\tools\yadif\yadif.dll")
Yadif(order=-1)
crop( 4, 4, -4, -6)

Spline36Resize(1280,720)


and the command i run x264.exe with:


x264.exe --crf 23 --preset slow --level 4.1 -o endfile.mkv encoding.avs


Shouldnt the encode run at the same speed all the time? it really is weird that it goes super slow for the first 12000 frames and then speeds up...

Atak_Snajpera
15th March 2012, 16:27
DirectShowSource("X:\Temp\record.ts", fps=25.000, audio=false, convertfps=true).AssumeFPS(25,1)
Why do you use fps 25 twice? Why do you use convertfps=true?

Penecho
15th March 2012, 16:35
I use MeGui's analyze function to analyse the video + the preview to crop it and copy the stuff from the avs script that is created, so i thought could do no harm leaving it...

telefunken
16th March 2012, 10:44
I have a similar problem, not sure this will help you solve it though...

My problem seems to come only on clips from a certain channel, and I often have slow encoding on all frames, not just part of it. It seems that if there is a glitch in the recording somehere (on several subsequent frames) that could cause the problem. Splitting the clip in 2 parts and encoding them separately usually helps. I have been wondering if this is a bug in x264 or Videoredo (which i use for editing), but I am no wiser as of yet. Your vaules on fps are the same as mine with/without the problem, and my problem source is also 1080i 25fps.

Groucho2004
16th March 2012, 11:15
Shouldnt the encode run at the same speed all the time? it really is weird that it goes super slow for the first 12000 frames and then speeds up...

You should probably check first if it's a problem with the script itself. You can run the script through AVSMeter (http://forum.doom9.org/showthread.php?t=162155) to see if it exhibits the same behaviour.