View Full Version : Slow fps speed encoding in x264


Robertus
27th April 2011, 15:30
Hi everybody

i change my pc to encode .ts from HDTV but speed isn't good for me.

I get usually 36fps for the first pass and 22fps for the second pass.

a tipically .ts that i encode is always hdtv 1080i like that:

Generale
ID : 1
Nome completo : F:\La.Vita.Secondo.Jim\6x16\6x16.ts
Formato : MPEG-TS
Dimensione : 1,13 GiB
Durata : 20min
BitRate totale : 7 799 Kbps

Video
ID : 2586 (0xA1A)
ID menů : 1 (0x1)
Formato : AVC
Formato/Informazioni : Advanced Video Codec
Profilo del formato : Main@L4.0
Impostazioni del formato, CABAC : Si
Impostazioni del formato, ReFram : 4 fotogrammi
Codec ID : 27
Durata : 20min
BitRate : 7 220 Kbps
Larghezza : 1 920 pixel
Altezza : 1 080 pixel
AspectRatio : 16:9
FrameRate : 25,000 fps
ColorSpace : YUV
ChromaSubsampling : 4:2:0
BitDepth/String : 8 bits
Tipo di scansione : MBAFF
Bit/(Pixel*Frame) : 0.139
Dimensione della traccia : 1,04 GiB (93%)
colour_primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
transfer_characteristics : BT.709-5, BT.1361
matrix_coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

Audio
ID : 2587 (0xA1B)
ID menů : 1 (0x1)
Formato : AC-3
Formato/Informazioni : Audio Coding 3
Profilo del formato : Dolby Digital
Format_Settings_ModeExtension : CM (complete main)
Codec ID : 6
Durata : 20min
Modalitŕ : Costante
BitRate : 192 Kbps
Canali : 2 canali
Posizione dei canali : Front: L R
SamplingRate : 48,0 KHz
BitDepth/String : 16 bits
Dimensione della traccia : 28,4 Mb (2%)
Lingua : Italiano

Testo #1
ID : 2589 (0xA1D)-777
ID menů : 1 (0x1)
Formato : Teletext Subtitle
Lingua : Italiano

Testo #2
ID : 2589 (0xA1D)-777
ID menů : 1 (0x1)



My configuration is:

Windows 7 64bit
CPU i7-2600 3,40GHz
8GB Ram DDR3

MeGUI 2008 svn ( last version )
x264 1924 (x86, not 64bit)
Avisynth 258 (x86)
Haali media splitter ( last version )

avs script is with directshowsource
(with avcsource i have some error in video, bad encode in some frames and anyway the speed not increase)

my x264 line in megui is:

program --level 4.1 --pass 2 --bitrate 4002 --stats ".stats" --deblock -1:-1 --b-pyramid none --ref 5 --qpmin 10 --qpmax 51 --me umh --subme 8 --output "output" "input"


i should get more than current fps ?

how can i get more speed?

i tried to install avisynth 64bit and x264 64bit without success but i see around forum that not increase a lot of fps, the difference is too bit

( in first pass i get 30 40% of my cpu and in second pass i get 50 60 70 80% of my cpu, isn't stable, but fps encoded are stable, too strange ? )

i hope that someone can help me

thanks a lot for your attention

Didée
27th April 2011, 16:03
What Avisynth-filters do you use in MeGUI? Deinterlacing, denoising, etc? Post the full script.

Robertus
27th April 2011, 17:18
What Avisynth-filters do you use in MeGUI? Deinterlacing, denoising, etc? Post the full script.

oh right, forget, my bad

for some tv not needed deinterlace so:


LoadPlugin("C:\Program Files\MeGUI\tools\dgavcindex\DGAVCDecode.dll")
directshowsource("F:\How.I.Met.Your.Mother.S01\1x01\1x01.ts")
#deinterlace
#crop
#resize
#denoise
Lanczos4Resize(1280,720) # Lanczos4 (Sharp)


some tv needed deinterlace and i use:


LoadPlugin("C:\Program Files\MeGUI\tools\dgavcindex\DGAVCDecode.dll")
directshowsource("F:\NationalGeoHD\Episode1\1.ts")
#deinterlace
#crop
#resize
#denoise
Lanczos4Resize(1280,720) # Lanczos4 (Sharp)LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\Decomb.dll")
FieldDeinterlace(blend=false)

i know that with deinterlace i get a speed less than without, but anyway i encoded the most of my .ts without deinterlace, because the source is 1080i but not needed in the most of case.

i tried with all at 64bit? ( i tried in past without success )

or i must try another settings?

or with my configuration i can't get more ?

thanks for the support

roozhou
27th April 2011, 17:28
some tv needed deinterlace and i use:


LoadPlugin("C:\Program Files\MeGUI\tools\dgavcindex\DGAVCDecode.dll")
directshowsource("F:\NationalGeoHD\Episode1\1.ts")
#deinterlace
#crop
#resize
#denoise
Lanczos4Resize(1280,720) # Lanczos4 (Sharp)LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\Decomb.dll")
FieldDeinterlace(blend=false)

You use resize before deinterlace. This will screw up your video. Always perform deinterlace and ivtc before any other filters, including resize, denoise and sharpen. If you put crop before deinterlace, top and bottom cropped pixel must be mod 4.

Robertus
27th April 2011, 17:34
You use resize before deinterlace. This will screw up your video. Always perform deinterlace and ivtc before any other filters, including resize, denoise and sharpen. If you put crop before deinterlace, top and bottom cropped pixel must be mod 4.

oh i see, thanks for this info

but not increase fps, right?

i don't see difference

Blue_MiSfit
28th April 2011, 05:36
Near realtime 1080i encoding on a consumer quad core is pretty awesome ;)

However, your x264 command is just silly. Use the preset / tune settings. You are using an up to date version of MeGUI that supports these.. right?

1) Cut it down to one pass by using CRF encoding. You don't REALLY need to hit 4002kbps, do you?
2) Use something simpler like this:


program --crf 20 --tune film --preset medium --output "output" "input"


A) If your bitrate is too high in the end, use a higher CRF number.

B) If encoding is going too slow, try --preset fast or --preset faster. If adjusting the --preset doesn't change speed, then AviSynth is your bottleneck and you need to use a different filter chain.

C) Consider fast deinterlacers like YADIF, or (if you have an nvidia video card) possibly switch to DGDecNV for decode, which will give you realtime hardware deinterlacing of reasonable quality. Certainly better than FieldDeinterlace.

Derek