Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th August 2012, 21:35   #1  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
Good x264 encode command line for AMD Phenom II X6 1045T 2.70 GHZ

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

Code:
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
Code:
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

Code:
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

Code:
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)

Last edited by Guest; 5th August 2012 at 22:15. Reason: formatting for readability
wcwman18 is offline   Reply With Quote
Old 5th August 2012, 21:55   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,275
wcwman18, please fix the title of your thread according to rule #12:
http://forum.doom9.org/forum-rules.htm
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 5th August 2012, 22:12   #3  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
Quote:
Originally Posted by LoRd_MuldeR View Post
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 is offline   Reply With Quote
Old 5th August 2012, 21:57   #4  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 643
Just use presets.
vivan is offline   Reply With Quote
Old 5th August 2012, 22:14   #5  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
Quote:
Originally Posted by vivan View Post
Just use presets.
What preset would you recommend for what I have written?
wcwman18 is offline   Reply With Quote
Old 5th August 2012, 22:27   #6  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,275
Quote:
Originally Posted by wcwman18 View Post
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)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 5th August 2012, 22:30   #7  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
Quote:
Originally Posted by LoRd_MuldeR View Post
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?
wcwman18 is offline   Reply With Quote
Old 5th August 2012, 22:35   #8  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,275
Quote:
Originally Posted by wcwman18 View Post
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!)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 5th August 2012 at 22:39.
LoRd_MuldeR is offline   Reply With Quote
Old 5th August 2012, 22:18   #9  |  Link
detmek
Registered User
 
Join Date: Aug 2009
Posts: 463
Why do you use --vbv-maxrate and --vbv-bufsize? Are you streaming video over internet?
detmek is offline   Reply With Quote
Old 5th August 2012, 22:46   #10  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
Based on the command line posted what would be a good preset example?
wcwman18 is offline   Reply With Quote
Old 5th August 2012, 22:49   #11  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
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
wcwman18 is offline   Reply With Quote
Old 6th August 2012, 15:19   #12  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
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, buildec 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 is offline   Reply With Quote
Old 6th August 2012, 15:34   #13  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,275
I don't know how your script looks, but a simple FFMS2 script would look like:

Code:
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 !?
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 6th August 2012, 15:42   #14  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
Quote:
Originally Posted by LoRd_MuldeR View Post
I don't know how your script looks, but a simple FFMS2 script would look like:

Code:
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?

Code:
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)
wcwman18 is offline   Reply With Quote
Old 6th August 2012, 15:49   #15  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,275
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.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 6th August 2012, 15:55   #16  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
Quote:
Originally Posted by LoRd_MuldeR View Post
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)
wcwman18 is offline   Reply With Quote
Old 6th August 2012, 15:57   #17  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,275
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.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 6th August 2012, 16:00   #18  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
Quote:
Originally Posted by LoRd_MuldeR View Post
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"
wcwman18 is offline   Reply With Quote
Old 6th August 2012, 16:10   #19  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,275
So obviously you do NOT have the required plug-in DLL in your Avisynth "plugins" folder

Put the DLL in place or load it explcitely via LoadPlugin() from wherever it is located...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 6th August 2012, 16:13   #20  |  Link
wcwman18
Registered User
 
Join Date: Jul 2002
Posts: 107
Quote:
Originally Posted by LoRd_MuldeR View Post
So obviously you do NOT have the required plug-in DLL in your Avisynth "plugins" folder

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")

Last edited by wcwman18; 6th August 2012 at 16:21.
wcwman18 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:38.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.