x264 Settings... Help Needed

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

x264 Settings... Help Needed

Postby 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
Kira_Douji
 
Joined: 20 Feb 2005

Re: x264 Settings... Help Needed

Postby 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
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: x264 Settings... Help Needed

Postby 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
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Re: x264 Settings... Help Needed

Postby 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
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: x264 Settings... Help Needed

Postby 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: 20 Feb 2005

Re: x264 Settings... Help Needed

Postby 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
Kira_Douji
 
Joined: 20 Feb 2005

Re: x264 Settings... Help Needed

Postby 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
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Re: x264 Settings... Help Needed

Postby 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: 20 Feb 2005

Re: x264 Settings... Help Needed

Postby 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
Kira_Douji
 
Joined: 20 Feb 2005

Re: x264 Settings... Help Needed

Postby 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
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: x264 Settings... Help Needed

Postby Kira_Douji » Thu Jul 21, 2011 7:23 pm

MPEGStreamClip was using the x264 Quicktime codec... And I just played it back in QT

The x264 commandline I'm trying to use is download from http://wipple.m25.coreserver.jp/?cat=6
I put it in a folder, sat in that folder and made a call to it... and got the results above. (IE: "x264", "open x264", "sudo x264"... pretty much every tip/trick I found as to why it might not be getting noticed aaaand nothing.)

Just tried directly copy-pasting your suggestion as well in case I was typing it wrong and nada.
ImageImage
User avatar
Kira_Douji
 
Joined: 20 Feb 2005

Re: x264 Settings... Help Needed

Postby Kira_Douji » Thu Jul 21, 2011 8:02 pm

Okay, playback in that artifacts in QT does NOT artifact in VLC... OR Movist.

Okay sonofab!tch.

The Question:
----------- do I want to bother with making the encodes play nice with QT?
ImageImage
User avatar
Kira_Douji
 
Joined: 20 Feb 2005

Re: x264 Settings... Help Needed

Postby TheRyuu » Thu Jul 21, 2011 10:34 pm

Kira_Douji wrote:The Question:
----------- do I want to bother with making the encodes play nice with QT?

No because quicktime sucks.

Have you tried
Code: Select all
./x264 *rest of command line here*

while in the directory of the binary.
TheRyuu
 
Joined: 19 May 2010

Re: x264 Settings... Help Needed

Postby Kira_Douji » Thu Jul 21, 2011 10:42 pm

TheRyuu wrote:
Kira_Douji wrote:The Question:
----------- do I want to bother with making the encodes play nice with QT?

No because quicktime sucks.

Have you tried
Code: Select all
./x264 *rest of command line here*

while in the directory of the binary.


1. PRAISE PRAISE (why didn't anyone else ever suggest this on the tens of forums I plundered?!)
2. Re: QT - Mainly concerned with playback by other people. You don't think it's prevalent enough to warrant worry? (Of course I don't mind making a 'hi def' version that's just FCPX's h264 export which, though larger than 100MB does play everywhere)
ImageImage
User avatar
Kira_Douji
 
Joined: 20 Feb 2005

Re: x264 Settings... Help Needed

Postby Kira_Douji » Thu Jul 21, 2011 11:14 pm

More Fun~!

TRY 1
Code: Select all
Kaiba-Corp:MP4 Seto$ ./x264 --preset veryslow --tune animation --deblock -1:-2 --aq-strength 0.8 --psy-rd 0.7:0.2 --output "test.mkv" "TEST UNCOMPRESSED.mov"
ffms [info]: 1280x720p 0:1 @ 24000/1001 fps (vfr)
audio [info]: opened libavcodec's ac3 encoder (192.0kbps, 32bits, 2ch, 48000hz)
resize [warning]: converting from yuv422p16le to yuv420p16le
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High 4:4:4 Predictive, level 5.0, 4:4:4 8-bit
Segmentation fault

TRY 2
Code: Select all
Kaiba-Corp:MP4 Seto$ ./x264 --crf 20 --preset veryslow --tune animation --output "Test.mp4" "TEST UNCOMPRESSED.mov"
ffms [info]: 1280x720p 0:1 @ 24000/1001 fps (vfr)
audio [info]: opened libavcodec's aac encoder (192.0kbps, 16bits, 2ch, 48000hz)
resize [warning]: converting from yuv422p16le to yuv420p16le
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High 4:4:4 Predictive, level 5.0, 4:4:4 8-bit
Segmentation fault

I feel like I'm missing something dreadfully obvious~
ImageImage
User avatar
Kira_Douji
 
Joined: 20 Feb 2005

Next

Return to Footage Help

Who is online

Users browsing this forum: No registered users and 2 guests