Log in

View Full Version : Good x264 encode command line for AMD Phenom II X6 1045T 2.70 GHZ


Pages : [1] 2

wcwman18
5th August 2012, 21:35
I am trying to encode x264 and I have very minimal speeds. Below I will include my batch file and my avs code and I hope someone can help me tweak things for better encoding speed.

Batch file

basic x264 : x264.exe --threads 12 --crf 19 --vbv-bufsize 1450 --vbv-maxrate 1500 --direct auto --level 3.1 --ref 5 --subme 9 --weightp 2 \
--b-adapt 2 --b-pyramid strict --me umh --keyint 300 --min-keyint 30 --aud --output %1.video.mkv %1

720p x264 : x264.exe --threads 12 --crf 14 --vbv-bufsize 4650 --vbv-maxrate 4700 --direct auto --level 3.1 --ref 5 --subme 9 --weightp 2 \
--b-adapt 2 --b-pyramid strict --me umh --keyint 300 --min-keyint 30 --aud --output %1.video.mkv %1

Here are my AVS Scripts

Basic x264

LoadPlugin("C:\Users\Owner\Desktop\pack\DG\DGAVCDecode.dll")
Load_STDCall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
DirectShowSource("prelims.ts")
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)

720p

LoadPlugin("C:\Users\Owner\Desktop\pack\DG\DGAVCDecode.dll")
Load_STDCall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
DirectShowSource("prelims.ts")
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(1280,720,6,6,-6,-6)

LoRd_MuldeR
5th August 2012, 21:55
wcwman18, please fix the title of your thread according to rule #12:
http://forum.doom9.org/forum-rules.htm

vivan
5th August 2012, 21:57
Just use presets.

wcwman18
5th August 2012, 22:12
wcwman18, please fix the title of your thread according to rule #12:
http://forum.doom9.org/forum-rules.htm

Sorry about that. How would I change it?

wcwman18
5th August 2012, 22:14
Just use presets.

What preset would you recommend for what I have written?

detmek
5th August 2012, 22:18
Why do you use --vbv-maxrate and --vbv-bufsize? Are you streaming video over internet?

LoRd_MuldeR
5th August 2012, 22:27
What preset would you recommend for what I have written?

Use the "--tune" option that matches the kind of footage you are encoding, pick the slowest "--preset" that you can accept speed-wise and kick out all the other options. It's as easy as that ;)

(In case you are going to author a BluRay disc, you of course have to keep those extra options required for BluRay compatibility)

wcwman18
5th August 2012, 22:30
Use the "--tune" option that matches the kind of footage you are encoding, pick the slowest "--preset" that you can accept speed-wise and kick out all the other options.

Is it really the fact that I don't use a preset that gives me about 18fps while encoding or is it within my batch file or avs?

LoRd_MuldeR
5th August 2012, 22:35
Is it really the fact that I don't use a preset that gives me about 18fps while encoding or is it within my batch file or avs?

The preset system makes it easy to control the "speed -vs- quality" trade-off with x264.

In almost any case you will be better off by using the suitable "--preset" instead of trying to mess with the individual options manually.

If the encoding speed is too low for your purpose, then use a faster preset. If you want to squish out more quality (at the same bit-rate), then use a slower preset.

That's it! There are no "secret" options that will magically make x264 faster without sacrificing quality. It's all a trade-off...

(Nonetheless it should be clear that the presets only control the encoding-speed of x264 itself. It will not help if you are bottlenecked by your AVS script!)

wcwman18
5th August 2012, 22:44
The preset system makes it easy to control the "speed -vs- quality" trade-off with x264.

In almost any case you will be better off by using the suitable "--preset" instead of trying to mess with the individual options manually.

If the encoding speed is too low for your purpose, then use a faster preset. If you want to squish out more quality (at the same bit-rate), then use a slower preset.

That's it! There are no "secret" options that will magically make x264 faster without sacrificing quality. It's all a trade-off...

(Nonetheless it should be clear that the presets only control the encoding-speed of x264 itself. It will not help if you are bottlenecked by your AVS script!)

I get about 94-96% cpu usage during my 720p encodes. Does that seem to you like a bottleneck issue to you?

wcwman18
5th August 2012, 22:46
Based on the command line posted what would be a good preset example?

wcwman18
5th August 2012, 22:49
The reason I even questioned in the first place is because I have a friend on a intel i7 that gets about 50-60fps using the same command line with thread-input and I am surprised I only get 18fps

LoRd_MuldeR
5th August 2012, 22:50
I get about 94-96% cpu usage during my 720p encodes. Does that seem to you like a bottleneck issue to you?

CPU load doesn't say anything here ;)

If you are using heavy filtering in your AVS script and these filters are multi-threaded, it can easily happen that the total CPU usage reaches 100% while ~90% of the CPU time is spent in Avisynth ;)

What matters is throughput and throughput is measured as FPS.

If switching to a faster x264 preset doesn't increase the throughput, you probably are bottlenecked by Avisynth. Otherwise you probably aren't.

Based on the command line posted what would be a good preset example?

I would suggest to start with something like "x264.exe --tune film --preset slower -o <output> <input>" and check the throughput.

If that is too slow for your requirements, switch to the next faster preset. If that's still too slow, switch to the next faster preset again. And so on...

The reason I even questioned in the first place is because I have a friend on a intel i7 that gets about 50-60fps using the same command line with thread-input and I am surprised I only get 18fps

At this moment the Intel Core i7 is the fastest (consumer) CPU available while AMD is far behind, so not much of a surprise - even though you don't mention what model he has exactly ;)

Anyway, as long as your friend doesn't encode with the identical Avisynth script and from the identical source file, the numbers aren't really comparable - even if the command-line is identical.

See also:
http://www.techarp.com/showarticle.aspx?artno=669&pgno=6

wcwman18
6th August 2012, 13:36
CPU load doesn't say anything here ;)

If you are using heavy filtering in your AVS script and these filters are multi-threaded, it can easily happen that the total CPU usage reaches 100% while ~90% of the CPU time is spent in Avisynth ;)

What matters is throughput and throughput is measured as FPS.

If switching to a faster x264 preset doesn't increase the throughput, you probably are bottlenecked by Avisynth. Otherwise you probably aren't.



I would suggest to start with something like "x264.exe --tune film --preset slower -o <output> <input>" and check the throughput.

If that is too slow for your requirements, switch to the next faster preset. If that's still too slow, switch to the next faster preset again. And so on...



At this moment the Intel Core i7 is the fastest (consumer) CPU available while AMD is far behind, so not much of a surprise - even though you don't mention what model he has exactly ;)

Anyway, as long as your friend doesn't encode with the identical Avisynth script and from the identical source file, the numbers aren't really comparable - even if the command-line is identical.

See also:
http://www.techarp.com/showarticle.aspx?artno=669&pgno=6

I did what you suggested and got about the same speed. Anything that could be causing this?

A little detail on my setup. I use a HD PVR to capture my video which records to a .TS file. Then I edit that file in Videoredo and then start my encode with the scripts and command line above.

kypec
6th August 2012, 14:22
I did what you suggested and got about the same speed. Anything that could be causing this?

A little detail on my setup. I use a HD PVR to capture my video which records to a .TS file. Then I edit that file in Videoredo and then start my encode with the scripts and command line above.
Few ideas:

test how demanding your AVS script really is - use AVSMeter (http://forum.doom9.org/showthread.php?t=165528) to get an idea how fast the script can actually run on your system
replace your source filters - DirectShowSource is the least recommended one, use FFMS2 (http://forum.doom9.org/showthread.php?t=127037) or if you have NVIDIA compatible card try DGDecNV (http://neuron2.net/dgdecnv/dgdecnv.html) which offloads video decoding burden from CPU -> GPU (or better said, dedicated VP engine that's built into a graphics card)

Once you know how fast your Avisynth script is you can tell if x264 encoding can get any faster or not ;)

wcwman18
6th August 2012, 15:08
Few ideas:

test how demanding your AVS script really is - use AVSMeter (http://forum.doom9.org/showthread.php?t=165528) to get an idea how fast the script can actually run on your system
replace your source filters - DirectShowSource is the least recommended one, use FFMS2 (http://forum.doom9.org/showthread.php?t=127037) or if you have NVIDIA compatible card try DGDecNV (http://neuron2.net/dgdecnv/dgdecnv.html) which offloads video decoding burden from CPU -> GPU (or better said, dedicated VP engine that's built into a graphics card)

Once you know how fast your Avisynth script is you can tell if x264 encoding can get any faster or not ;)

I get this error
AVSMeter v1.21 by Groucho2004
AviSynth 2.58, build:Dec 22 2008 [08:46:51]
Script error: there is no function named "FFMS2Source
(fox_x264.avs, line 3)

LoRd_MuldeR
6th August 2012, 15:15
I get this error
AVSMeter v1.21 by Groucho2004
AviSynth 2.58, build:Dec 22 2008 [08:46:51]
Script error: there is no function named "FFMS2Source
(fox_x264.avs, line 3)

Well, do you have the FFMS2 (FFmpegSource2) DLL in your Avisynth Plug-in's folder ???

Also, the functions exposed by up-to-date FFMS2 are FFVideoSource() and FFAudioSource(). The FFmpegSource2() function is only a wrapper function defined in some .avsi file...

wcwman18
6th August 2012, 15:19
LoadPlugin("C:\Users\Owner\Desktop\pack\DG\DGAVCDecode.dll")
Load_STDCall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
AVCSource("ufcpost.dga")
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)

AVSMeter v1.21 by Groucho2004
AviSynth 2.58, build:Dec 22 2008 [08:46:51]

Number of frames: 94856
Length (h:m:s.ms): 00:52:45.029
Frame width: 704
Frame height: 400
Framerate: 29.970 (60000/2002)
Progressive: Yes
Colorspace: YV12

Hit ESC to exit...
Frame 875/94856, fps (min/max/avg): 12.54 | 15.68 | 13.59

wcwman18
6th August 2012, 15:20
Well, do you have the FFMS2 (FFmpegSource2) DLL in your Avisynth Plug-in's folder ???

Also, the functions exposed by up-to-date FFMS2 are FFVideoSource() and FFAudioSource(). The FFmpegSource2() function is only a wrapper function defined in some .avsi file...

So, how should I update my AVS then?

wcwman18
6th August 2012, 15:26
Well, do you have the FFMS2 (FFmpegSource2) DLL in your Avisynth Plug-in's folder ???

Yes I do have the DLL

LoRd_MuldeR
6th August 2012, 15:34
I don't know how your script looks, but a simple FFMS2 script would look like:

V = FFVideoSource("C:\Some Path\input.foo")
A = FFAudioSource("C:\Some Path\input.foo")
AudioDub(V,A)

Also note that Transport Streams (TS) are one of the formats that is not supported well by FFMS2.

I would recommend to use DGDecodeNV for accessing TS files, but you'll have to buy it (and it needs an NVidia card). DGAVCIndex is a dead project and has various problems that won't ever get fixed...

BTW: You know that you can hit "Edit" instead of writing several posts in sequence !?

wcwman18
6th August 2012, 15:42
I don't know how your script looks, but a simple FFMS2 script would look like:

V = FFVideoSource("C:\Some Path\input.foo")
A = FFAudioSource("C:\Some Path\input.foo")
AudioDub(V,A)

Also note that Transport Streams (TS) are one of the formats that is not supported well by FFMS2.

I would recommend to use DGDecodeNV for accessing TS files, but you'll have to buy it (and it needs an NVidia card). DGAVCIndex is a dead project and has various problems that won't ever get fixed...

BTW: You know that you can hit "Edit" instead of writing several posts in sequence !?

Here is my current script. I do not have a NVidia card. I have a ATI Radeon HD 6450. Based on the script that I have how might you recommend I change it?

LoadPlugin("C:\Users\Owner\Desktop\pack\DG\DGAVCDecode.dll")
Load_STDCall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
AVCSource("post.dga")
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)

LoRd_MuldeR
6th August 2012, 15:49
Throw out the AVCSource() and instead insert the code that I just posted. Of course you would give FFVideoSource() the original video file, not the DGA file.

Also throw out the LoadPlugin(). Or, if FFMS2.dll is not located directly in your Avisynth plug-in's folder, change the LoadPlugin() to load FFMS2.dll instead of DGAVCDecode.dll.

wcwman18
6th August 2012, 15:55
Throw out the AVCSource() and instead insert the code that I just posted. Of course you would give FFVideoSource() the original video file, not the DGA file.

Also throw out the LoadPlugin(). Or, if FFMS2.dll is not located directly in your Avisynth plug-in's folder, change the LoadPlugin() to load FFMS2.dll instead of DGAVCDecode.dll.

Does that look right?

Load_STDCall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
FFVideoSource("post.ts")
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)

LoRd_MuldeR
6th August 2012, 15:57
If you don't need to load FFMS2.DLL explicitely (because it is in your Avisynth "plugins" folder) and if the file "post.ts" is located in the same folder as your AVS file, then yes.

wcwman18
6th August 2012, 16:00
If you don't need to load FFMS2.DLL explicitely (because it is in your Avisynth "plugins" folder) and if the file "post.ts" is located in the same folder as your AVS file, then yes.

[error]: Script error: there is no function named "FFVideoSource"

LoRd_MuldeR
6th August 2012, 16:10
So obviously you do NOT have the required plug-in DLL in your Avisynth "plugins" folder :rolleyes:

Put the DLL in place or load it explcitely via LoadPlugin() from wherever it is located...

wcwman18
6th August 2012, 16:13
So obviously you do NOT have the required plug-in DLL in your Avisynth "plugins" folder :rolleyes:

Put the DLL in place or load it explcitely via LoadPlugin() from wherever it is located...

avs [error]: Unable to load C Plugin: C:\Program Files (x86)\AviSynth 2.5\plugin
s\yadif.dll
(post_x264.avs, line 2)
x264 [error]: could not open input file `post_x264.avs'

Line 2 : Load_STDCall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")

Groucho2004
6th August 2012, 16:28
@wcwman18
This could go on forever if you don't read or understand the replies you're getting.
Get some basic Avisynth knowledge here (http://avisynth.org/mediawiki/Main_Page#New_to_AviSynth_-_start_here).

wcwman18
6th August 2012, 16:33
@wcwman18
This could go on forever if you don't read or understand the replies you're getting.
Get some basic Avisynth knowledge here (http://avisynth.org/mediawiki/Main_Page#New_to_AviSynth_-_start_here).

It does not want to seem to load the plugin

Is ffms2-x64.dll the proper plugin?

kypec
6th August 2012, 16:55
Is ffms2-x64.dll the proper plugin?Nope, unless you're using Avisynth x64 which is highly discouraged around here for obvious reasons.
Grab the latest C-Plugin version from this post (http://forum.doom9.org/showthread.php?p=1582286#post1582286)

wcwman18
6th August 2012, 17:21
Nope, unless you're using Avisynth x64 which is highly discouraged around here for obvious reasons.
Grab the latest C-Plugin version from this post (http://forum.doom9.org/showthread.php?p=1582286#post1582286)

error: LoadPlugin: unable to load "C:\Program Files(x86)\AviSynth 2.5\plugins\ffms2.dll", error=0x7e
(C:\Users\Owner\Desktop\AVSMeter1.21\AVSMeter1.21\post_x264.avs, line 1)

LoadPlugin("C:\Program Files(x86)\AviSynth 2.5\plugins\ffms2.dll")
Load_STDCall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
FFVideoSource("post.ts")
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)


PROCESS EXITED WITH ERROR CODE: 1

sneaker_ger
6th August 2012, 17:24
You have to use LoadCPlugin()/Load_STDCall_Plugin() for C-Plugins.

wcwman18
6th August 2012, 17:35
You have to use LoadCPlugin()/Load_STDCall_Plugin() for C-Plugins.

Is this correct?

LoadCPlugin(C:\Program Files(x86)\AviSynth 2.5\plugins\ffms2.dll)/Load_STDCall_Plugin(C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll)
FFVideoSource("post.ts")
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)

I get an error could not open line 1 column 14

sneaker_ger
6th August 2012, 18:03
The slash ( "/" ) was meant as "either or", not an actual slash.
http://avisynth.org/mediawiki/Plugins

wcwman18
6th August 2012, 18:14
The slash ( "/" ) was meant as "either or", not an actual slash.
http://avisynth.org/mediawiki/Plugins

I think I fixed it however now I get this error avs [error]: I don't know what "ffms2" means

Load_STDCall_Plugin(ffms2.dll)
Load_STDCall_Plugin(yadif.dll)
FFVideoSource("post.ts")
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)

sneaker_ger
6th August 2012, 18:27
Yes, like that. (Though usually ffms2 is not really recommended for TS and whether will see any significant speed-up is also questionable.)

wcwman18
6th August 2012, 18:30
Yes, like that. (Though usually ffms2 is not really recommended for TS and whether will see any significant speed-up is also questionable.)

I get this error avs [error]: I don't know what "ffms2" means

What is recommended for TS

sneaker_ger
6th August 2012, 18:37
You have to use quotes for all kind of strings (including filenames and paths).

wcwman18
6th August 2012, 18:41
You have to use quotes for all kind of strings (including filenames and paths).

avs [error]: Unable to load C Plugin: ffms2.dll
(post_x264.avs, line 1)
x264 [error]: could not open input file 'post_x264.avs'

Load_STDCall_Plugin("ffms2.dll")
Load_STDCall_Plugin(yadif.dll)
FFVideoSource("post.ts")
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)

sneaker_ger
6th August 2012, 18:48
Try the complete path, not just the filename.

wcwman18
6th August 2012, 18:58
Try the complete path, not just the filename.

Did not work

avs [error]: Unable to load C Plugin: C:\Program Files (x86)\AviSynth 2.5\plugin
s\ffms2.dll
(ufcfoxpost_x264.avs, line 1)
x264 [error]: could not open input file `post_x264.avs'

Load_STDCall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
Load_STDCall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
FFVideoSource("post.ts")
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)

LoRd_MuldeR
6th August 2012, 19:31
Either the path to the DLL is wrong or it's not actually a C plug-in (but a regular C++ plug-in). Or your are trying to load a 64-Bit plug-in from 32-Bit Avisynth (or vice versa).

wcwman18
6th August 2012, 19:52
Either the path to the DLL is wrong or it's not actually a C plug-in (but a regular C++ plug-in). Or your are trying to load a 64-Bit plug-in from 32-Bit Avisynth (or vice versa).

Since I am trying to use your software can you make sense of this?

Simple x264 Launcher (Build #346), built 2012-07-22

Job started at 2012-08-06, 14:49:13.

Source file: C:/Users/Owner/Desktop/AVSMeter1.21/AVSMeter1.21/post_x264.avs
Output file: C:/Users/Owner/Desktop/AVSMeter1.21/AVSMeter1.21/post_x264.mkv

--- SETTINGS ---

RC Mode: ABR
Preset: Medium
Tuning: Film
Profile: Auto
Custom: (None)

--- CHECK VERSION ---

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

x264 0.125.2208 d9d2288
(libswscale 2.1.100)
(libavformat 54.17.100)
(ffmpegsource 2.17.2.1)
built by Komisar on Jul 19 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)/MuldeR/Simple x264 Launcher v2/toolset/avs2yuv_x86.exe"

Avs2YUV 0.24bm2

x264 revision: 2208 (core #125)
Avs2YUV version: 0.24.2

--- AVS INFO ---

Creating process:
"C:/Program Files (x86)/MuldeR/Simple x264 Launcher v2/toolset/avs2yuv_x86.exe" -frames 1 C:\Users\Owner\Desktop\AVSMeter1.21\AVSMeter1.21\post_x264.avs NUL

C:\Users\Owner\Desktop\AVSMeter1.21\AVSMeter1.21\post_x264.avs: 704x400, 60001/1001 fps, 189712 frames

Resolution: 704x400
Frame Rate: 60001/1001
No. Frames: 189712

--- ENCODING ---

Creating Avisynth process:
"C:/Program Files (x86)/MuldeR/Simple x264 Launcher v2/toolset/avs2yuv_x86.exe" C:\Users\Owner\Desktop\AVSMeter1.21\AVSMeter1.21\post_x264.avs -

Creating x264 process:
"C:/Program Files (x86)/MuldeR/Simple x264 Launcher v2/toolset/x264_8bit_x64.exe" --bitrate 1500 --preset medium --tune film --output C:\Users\Owner\Desktop\AVSMeter1.21\AVSMeter1.21\ufcfoxpost_x264.mkv --frames 189712 --demuxer y4m --stdin y4m -

y4m [info]: 704x400p 0:0 @ 60001/1001 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
x264 [info]: profile High, level 3.1
x264 [info]: frame I:1 Avg QP:27.09 size: 785
x264 [info]: mb I I16..4: 24.9% 75.1% 0.0%
x264 [info]: final ratefactor: 27.29
x264 [info]: 8x8 transform intra:75.1%
x264 [info]: coded y,uvDC,uvAC intra: 3.2% 6.1% 0.0%
x264 [info]: i16 v,h,dc,p: 53% 34% 7% 6%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 38% 33% 0% 0% 0% 0% 0% 0%
x264 [info]: i8c dc,h,v,p: 91% 5% 4% 0%
x264 [info]: kb/s:376.43
encoded 1 frames, 0.04 fps, 729.36 kb/s

WARNING: Avisynth process exited with error code: -1073741819
Final file size is 1,730 bytes.

--- DONE ---

Job finished at 2012-08-06, 14:49:48. Process took 0 minutes, 35 seconds.

wcwman18
6th August 2012, 20:07
Am I getting closer?
LoadCPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
Load_STDCall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
FFIndex(C:\Users\Owner\Desktop\AVSMeter1.21\AVSMeter1.21\ffmsindex.exe)
AudioDub(FFVideoSource(post.ts), FFAudioSource(post.ts))
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)

detmek
6th August 2012, 20:27
Can you try this way?
Remove your FFMS2 plugin and unpack this one into your Avisynth plugin folder, both files http://megui.org/auto/ffms2-r683.7z
Use this script:
Load_Stdcall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
a = FFAudioSource("post.ts")
v = FFVideoSource("post.ts")
AudioDub(v,a)
ConvertToYV12()
Yadif(0,1)
Lanczos4Resize(704,400,6,6,-6,-6)

P.S. You may need Haali Media Splitter (http://haali.su/mkv/) to properly open TS file.

wcwman18
6th August 2012, 20:54
Can you try this way?
Remove your FFMS2 plugin and unpack this one into your Avisynth plugin folder, both files http://megui.org/auto/ffms2-r683.7z
Use this script:

Simple x264 Launcher (Build #346), built 2012-07-22

Job started at 2012-08-06, 15:33:56.

Source file: C:/Users/Owner/Desktop/AVSMeter1.21/AVSMeter1.21/post_x264.avs
Output file: C:/Users/Owner/Desktop/AVSMeter1.21/AVSMeter1.21/post_x264.mkv

--- SETTINGS ---

RC Mode: ABR
Preset: Medium
Tuning: Film
Profile: Auto
Custom: (None)

--- CHECK VERSION ---

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

x264 0.125.2208 d9d2288
(libswscale 2.1.100)
(libavformat 54.17.100)
(ffmpegsource 2.17.2.1)
built by Komisar on Jul 19 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)/MuldeR/Simple x264 Launcher v2/toolset/avs2yuv_x86.exe"

Avs2YUV 0.24bm2

x264 revision: 2208 (core #125)
Avs2YUV version: 0.24.2

--- AVS INFO ---

Creating process:
"C:/Program Files (x86)/MuldeR/Simple x264 Launcher v2/toolset/avs2yuv_x86.exe" -frames 1 C:\Users\Owner\Desktop\AVSMeter1.21\AVSMeter1.21\post_x264.avs NUL

error: Evaluate: Unrecognized exception!
(C:\Users\Owner\Desktop\AVSMeter1.21\AVSMeter1.21\post_x264.avs, line 2)

PROCESS EXITED WITH ERROR CODE: 1

With a CMD Prompt

avs [error]: Evaluate: System exception - Access Violation
(post_x264.avs, line 2)
x264 [error]: could not open input file `post_x264.avs'

Just installed avisynth 2.5.8 same issue

LoRd_MuldeR
6th August 2012, 21:56
Looks like Avisynth (or more likely one of the plug-ins involved) has crashed.

Do you use the "stable" Avisynth 2.5? If not, I would suggest trying with that one first:
http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/AviSynth%202.5.8/

Furthermore you should clean up your Avisynth plug-ins directory. I encountered strange crashes with "buggy" plug-in DLL's, even when that plug-in wasn't even used in the script.

Also you may want to kick out Yadif for now (you can re-add it later). Last but not least you may want to try the last official FFMS2 release from here (http://code.google.com/p/ffmpegsource/downloads/detail?name=ffms-2.17.7z&can=2&q=).

wcwman18
6th August 2012, 23:11
Looks like Avisynth (or more likely one of the plug-ins involved) has crashed.

Do you use the "stable" Avisynth 2.5? If not, I would suggest trying with that one first:
http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/AviSynth%202.5.8/

Furthermore you should clean up your Avisynth plug-ins directory. I encountered strange crashes with "buggy" plug-in DLL's, even when that plug-in wasn't even used in the script.

Also you may want to kick out Yadif for now (you can re-add it later). Last but not least you may want to try the last official FFMS2 release from here (http://code.google.com/p/ffmpegsource/downloads/detail?name=ffms-2.17.7z&can=2&q=).

Thank you. That did the trick. Sadly that even with the presets I still only get 16-18fps while encoding video

LoRd_MuldeR
6th August 2012, 23:45
Using the Preset system does not speed-up things per se!

The x264 presets simply provide a very convenient and foolproof way to tweak the "speed -vs- quality" trade-off. If your goal is to squish out more speed, you have to switch from your current preset to a faster one.

If switching, e.g., from "slower" to "faster" preset doesn't give a significant speed-up, you are very likely bottlenecked by slow input. As mentioned earlier, you can benchmark your AVS script with AVSMeter (http://forum.doom9.org/showthread.php?t=165528)...

(You certainly won't be able to encode any faster than what AVSMeter reports for your input script, even with the "ultrafast" preset)