x264 Settings... Help Needed

If you have questions about compression/encoding/converting look here.
Locked
User avatar
Kira_Douji
Joined: Sun Feb 20, 2005 1:38 pm
Org Profile

x264 Settings... Help Needed

Post by Kira_Douji » Thu Jul 21, 2011 12:13 am

(Otherwise Known As: What Happens When You Can't Use ZarxGUI Anymore)

:awesome:

So I, in all I have learned about audio and video throughout the years (mainly from this site) completely fail to understand x264 and all of it's complexity. However, when I was on a PC this didn't matter because I had Zarx's lovely little app that did all the hard work and was just... brilliant. <3 <3 <3 <3

Unfortunately, there is no ZarxGUI or equivalent on the Mac end of things and so I am lost in a swamp of options.

You see, I can fiddle around with MPEGStreamClip well enough to produce good videos but they're no were near the sizes I used to get from throwing something into ZarxGUI and letting it fly. TBH, I just tell it to aim for 99MB and leave it at that. I know it's partially a value of using larger/higher quality footage, but it's also just that I have no bloody clue what I'm doing. :uhoh:

So I have two requests:

Are there some sort of presets I can load into MPEGStreamClip (I see a button but have none to apply) that would achieve the essential functionality of the ZarxGUI presets?

OR

Can someone make sense of these settings?

Image
Image
Image
Image

Thanks For Any Help!
ImageImage

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: x264 Settings... Help Needed

Post by mirkosp » Thu Jul 21, 2011 4:11 am

Ok so...
Flags:
check crf, uncheck fast pskip, uncheck dct decimate

Values:
me_method: UMH (if you are not concerned with speed at all, go TESA for probably semi-placebo improvements)
directpred: auto
trellis: 2
AQ mode: if by variance it means auto-variance aq, then that's not what you'd generally want to use. There should be another setting without it being completely off, no clue how it's called there. If there isn't or if there's an auto-variance, then this is the one to go.
refs: 16 (could do less, but high refs tend to help with animated content, especially for looped animations and flashes and so)
me_subq: 9 or 10, up to you
me_range: 16 could be fine, bumping to 24 shouldn't harm slowness too much, if you can take slower I guess around 40 is about as high as you can go with some actual benefit? Could depend on what you have but yeah... also increasing too much will sensibly slow down the encode.
qcompress: 0.60 default is fine, though bumping it a bit could be helpful, say, to 0.65-0.70. Just make sure you don't ever push it over 0.80 because that starts getting sort of dumb otherwise.
deblock alpha/beta: -1:-2 is what I personally like for anime, but animation default is 1:1 if you're so inclined.
aq-strength: try it in the 0.7-0.8 range. Animation default is 0.6, but that's more meant for flat colours (ie: Panty & Stocking or western/flash animation in general). Anime tend to have some texture and stuff so 0.6 is kinda low for it.
rc_lookahead: should be able to bump it to 60 safely.
psy-rd: now this would change from source to source. 1.0:0.0 default should be fine, though for anime my comfort zone is with values in the range of 0.6-0.8:0.1-0.3 I'd say. Keep trellis low, especially if your source isn't as clean as it can possibly be (by clean I don't mean you should nuke it with denoisers obviously).

Behavior:
Well, framerate is what you have. Generally 23.976?
Could bump Qpmin a bit (keep it below 10 tho), though x264's default is 0 nowadays, so whatever.
DO FORCE CRF. Quantizer to use I'd say about 19? See what fits your desired quality/filesize requirements the most

Tagging:
I'd like to see just what does the color space tagging allow, but for the rest you'd prolly mostly care about the PAR if you're editing anamorphic, otherwise nothing.

That... should mostly do.
Image

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Location: North Cackalacky
Contact:
Org Profile

Re: x264 Settings... Help Needed

Post by Zarxrax » Thu Jul 21, 2011 2:32 pm

It would probably be easier for you to use the commandline x264 (i guess you can use that on mac, right?). The options are all documented really well on that.

Zarx264 doesnt really change a whole lot from the defaults. Just use something like x264 with the veryslow preset, and you should be mostly fine.

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: x264 Settings... Help Needed

Post by mirkosp » Thu Jul 21, 2011 2:41 pm

In my experience, telling people to fire up a prompt sort of scares them away more than anything, no matter how easy x264 actually is to use from cli. :?
Image

User avatar
Kira_Douji
Joined: Sun Feb 20, 2005 1:38 pm
Org Profile

Re: x264 Settings... Help Needed

Post by Kira_Douji » Thu Jul 21, 2011 2:59 pm

Terminal isn't a problem, I just didn't realize you could use the same encoder cli mac-side...?

I understand why you gave me the advice you did, Mirkosp, because I generally find the same reaction to cli solutions, but my main problem is with not knowing WTH I'm doing with x264 XP I'm trying your settings in MPEGStreamClip right now...

But as for the CLI solution, I was reading through some documentation with reference to settings in order to figure out what to do with the above and generally came back with poor, pixelated/artifact-y encodes, which was why I asked for help/clarification, because I'm obviously not getting it >>;

Zarx, I think I found a list of your settings somewhere...

Code: Select all

- veryslow:
                                    --b-adapt 2 --bframes 8 --direct auto
                                    --me umh --merange 24 --partitions all
                                    --ref 16 --subme 10 --trellis 2
                                    --rc-lookahead 60
Does that look about right? I'll poke around for the CLI implementation Mac-side. I totally didn't even think of that. -_-;;;
ImageImage

User avatar
Kira_Douji
Joined: Sun Feb 20, 2005 1:38 pm
Org Profile

Re: x264 Settings... Help Needed

Post by Kira_Douji » Thu Jul 21, 2011 3:12 pm

UPDATE:

Mirkosp, I went through and adjusted to your settings and got a lot of artifacts :(
ImageImage

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Location: North Cackalacky
Contact:
Org Profile

Re: x264 Settings... Help Needed

Post by Zarxrax » Thu Jul 21, 2011 3:56 pm

Yea here is the basic comandline that zarx264gui uses at default:
x264.exe --crf 20 --preset veryslow --tune animation

Thats it.

User avatar
Kira_Douji
Joined: Sun Feb 20, 2005 1:38 pm
Org Profile

Re: x264 Settings... Help Needed

Post by Kira_Douji » Thu Jul 21, 2011 3:59 pm

Great... now if I can just figure out how to get the x264 binary to run that in OS X I'll be golden.

I've tried for about an hour so far, though -_-;

/failure
ImageImage

User avatar
Kira_Douji
Joined: Sun Feb 20, 2005 1:38 pm
Org Profile

Re: x264 Settings... Help Needed

Post by Kira_Douji » Thu Jul 21, 2011 4:30 pm

Slamming my head into the wall now...

Went here, downloaded ffmpeg, MP4Box, x264

Put them all in a folder.

Opened Terminal.

Navigate to folder.

Code: Select all

open x264
Gets me

Code: Select all

x264 [error]: No input file. Run x264 --help for a list of options.
logout
Try to type

Code: Select all

open x264 --INSERTANYCOMMANDHERE
Gets me

Code: Select all

open: unrecognized option `--INSERTANYCOMMANDHERE'
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments]
Help: Open opens files from a shell.
      By default, opens each file using the default application for that file.  
      If the file is in the form of a URL, the file will be opened as a URL.
Options: 
Just

Code: Select all

x264 --ANYTHING
or

Code: Select all

run x264
Gets me

Code: Select all

-bash: x264: command not found
I'm going to kill something :awesome:
ImageImage

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: x264 Settings... Help Needed

Post by mirkosp » Thu Jul 21, 2011 6:38 pm

Kira_Douji wrote:Mirkosp, I went through and adjusted to your settings and got a lot of artifacts :(
That's... very odd. What decoder did you use? Also, which profile did end up being picked?

Re: CLI issues: you call it like this, really:

Code: Select all

x264 --preset veryslow --tune animation --deblock -1:-2 --aq-strength 0.8 --psy-rd 0.7:0.2 --output "blargh.mkv" "input.mov"
For example. Mostly complete manual of the settings here. Just make sure you're in the same folder of x264 or x264 is in the PATH.
Image

Locked

Return to “Conversion / Encoding Help”