Personal View site logo
Make sure to join PV on Telegram or Facebook! Perfect to keep up with community on your smartphone.
Handbrake presets and other x264 settings
  • My dog and I thought it was a good idea to have a common space where to share knowledge, experience, some open air dump and x264 (don't be afraid not toxic) presets

    • After Squeeze much I tried, quite nice multicompressor, but I've been unable to export any thing I like. Indu voice, very expensive also

    • After AME crappy using x264 display same panels as QT but doesn't allow any nitrate change in audio AAC

    • After IFFmpeg can't make it work with fmy fmpeg library :-( , using in avi <--> mov round·trip

    • After ffmpegx free, interface is tiny and they stopped developing it but what's important is to have libraries updated. that said it has limited acces to x264 options. it has also some nice (last minute) features like demux and multiplex, really useful

    • After Quicktime which is at least as obedient as my dog: direct x.264 export, wider range of x264's settings (panels) options and can store 2 presets which is useful too

    • After Mpegstreamclip free but has 2 annoying things: audio is limited to 256Kbits (not sooo dramatically disastrous) and only uses 1 core, so it's much slower… maybe I miss configured... other than that is a nice sorted out mothercompresar

    • After whatnot

    I decided to settle with my trusty old handbrake.
    I have not created any presets myself, just slightly tweaked/mix one or two, my knowledge is very close to my dog's =0. Also I am not interested or going to show any comparisons whatsoever, allrigch?!!

    A1 - retrospective

    ref=10:weightp=1:subq=10:rc-lookahead=10:trellis=2:bframes=16:b-adapt=2:direct=auto:me=umh:merange=64:analyse=all:deblock=-2,-2:psy-rd=1.0,0.25:aq-strength=0.5:no-dct-decimate=1:deadzone-inter=6:deadzone-intra=6:ipratio=1.1:pbratio=1.1:qcomp=0.8

    Really great settings for grainy footage I was able to found in this forum, thanks @retrospective

    A2 - doggy&me

    ref=10:weightp=1:subq=10:rc-lookahead=10:trellis=2:bframes=16:b-adapt=2:direct=auto:me=umh:merange=64:analyse=all:deblock=-2,-2:psy-rd=1.0,0.25:aq-strength=0.5:no-dct-decimate=1:deadzone-inter=6:deadzone-intra=6:ipratio=1.1:pbratio=1.1:qcomp=0.8:vbv-maxrate=15000:vbv-bufsize=15000

    Pretty much retrospective's preset but instead of "constant quality" a maxrate is set to 15000, instead of "variable framerate" now is constant and instead of 1 pass now there are 2, being the first turbo-kit. This one works out nicely with grain, which was my main concern

    A3 - slowganja

    ref=1:weightp=1:subq=10:rc-lookahead=10:trellis=2:8x8dct=0:b-pyramid=strict:no-dct-decimate=1:b-adapt=2:analyse=all:psy-rd=1.0,0.20:me=tesa

    This one from my drug dealer and it's real nice slow stuff, oh yeah with love

    Well, that's it, care for a street picture?

  • 17 Replies sorted by
  • For long time now, I was unable to make AME (Adobe Media Encoder) work with the x264 Quicktime library.
    Today I finally solved the mystery; quite idiotic actually, I just placed a copy of the x264 component in the System/Quicktime folder and that's all. Here running OS 10.9

    The reasons to use AME instead of Handbrake is basically lazyness, as I just skip one (export) step, it is integrated with AE and Premiere and also it's easier to define crop marks. To be able to apply LUTs directly, import captions and directly burn a watermark, timecode or file name/info onto the video are truly useful tools too.

    Though I hadn't profusely tested yet, it even "feels" faster - here my friends, I mean that took between 7 to 9 times the video length to encode, so... don't go crazy combing your hair, je je. Thhhhheeeee ssssllllloooooowwwweeeeeessssssttttts the better. Side by side with handbrake version, I couldn't find any difference. But remember, handbrake it's superb and a free powerful little fucker =)

    The Film and Grain presets that come along with x264 library are pretty good already, of the current settings I'm testing this is what's stored in my Preset 01 - pretty much from here realworldvideocompression, still tweaking, my aim is to preserve IQ and grain, right now 720 output. More than open to learn from yours ;-)



    I'll leave here the easy way, direct download of QT x264 Encoder from MyComet (Dec 2011)
    You still have the newer version option, there's a link in previous post (you'll have to build the libraries).

    If you think the massacre that Vimeo or Youtube will take your images into afterwards... from the original 1.06GB to 5 MB it's just funny. Anyways I feed them the best I can and hope they choke This video is a direct export (anamorphic crop works very well with handbrake also), here you cannot appreciate, but at Vimeo you'll see it has no black bars, just black cat - - - changed that

     
    If this was helpful and you haven't done it yet, click HERE
     
    gashô

  • I'm going to resize 1080p using mpeg streamclip first then compress with handbrake to see how it goes. My problem is smoky footage with banding

  • I spent the last week looking at various codec options. The best options for OSX is use homebrew to build the latest version of ffmpeg with all options. Then use cineform codec for finishing - the latest version of ffmpeg offers support for cineform - and there is a catch. It does not recognize color correction changes applied with Cineform studio. So render out your final image, and burn in the look - then compress with ffmpeg. Outstanding quality..

    ffmpeg -i -c:v libx264 -preset veryslow -vf scale=1280:-1 -crf 18 -pix_fmt yuv420p -strict -2 output.mp4

    I use "scale" as I will upload a full length feature film and 720P is the sweet spot for me, in terms of upload times. You can delete this if you want.

  • @zscream, whatupis man =)
    At certain point I did test and compare cineform, not for mastering but as an intermediate and truth is couldn't find any reason to use it over others. Also since the start of this thread I've become more relaxed with content which goal is to live in the webos, it all gets so squeekly squeeeezzzed, for most part grain texture and flow just vanishes, so...
    I reckon it depends on the kind of images one's dealing with, where would they end being watched and on deadlines.
    For personal stuff I enjoy feeding vimeo 10 bit x265 poisoned mandarins.
    One can use handbrake (a dif version), Hybrid or ffmpeg it all goes to end in the same burkapark.
    Hybrid's UI allows to easily change almost everything, including scale math, for downscale spline probably's best to avoid halos.
    Good luck with the film =D

     
    image
    Photo by Tamás Szarka

  • Wait. Vimeo accepts x265 files ? I didnt know this.

  • ffmpeg -i FILENAME -c:v libx264 -preset veryslow -vf "scale=1280:-1:flags=spline" -crf 18 -pix_fmt yuv420p -strict -2 output.mp4

    Thx for the pointer regarding Bicubic Spline - thats why I used to use MPEG Streamclip..

  • @maxr Any idea what is causing these artifacts ? I am trying to compress a film to upload to vimeo. Using CRF 19. Its only 2 secs in a 1hour 41min film. Frustrating..

    vlcsnap-2017-03-08-21h19m01s852.jpg
    1920 x 1090 - 604K
  • @zcream

    Any idea what is causing these artifacts ?

    No, but I'm no expert. I've hastly tried a shorter video and CRF 19 (HB 1.0.3) and all was good. Try HB's forums, probably a log of somekind will help people understand and point out what might be causing the artifacts and not guess too much. That's something neat, devs that allow easy log accesssssss.

    Yeah that's always quite frustating, not eating for a week helps shifting the pain :P
    Quite the opossite from hybrid (which in fairness is far more complex) other than badly calculating the compression ratio I don't remember having issues with the fruit cocktail.

    Anyway, being handbrake, hybrid, AME or anything else I personally don't ever use CRF, pure superstition, I like to be average. Sorry cannot give you but a charade of words, take care Zman =)

  • Turns out there is a corrupt frame during encoding. Very strange...

    In your preset - are you using a bitrate option for upload ? I see you did not select CRF. If so, do you go with the 10mbps option for HD ?

  • Your corrupt you!! I wish you were here, je je je

    Main 2 reasons that I have to compress a video are:
    • send a client, colaborator or spy, I tend to use a fast and light x264 ffmpeg, wrapped in a mp4
    • upload to YT/Vimeo. Normally x265 to vimeo (sometimes 10bit, just for fun) and x264 to YT. My vimeo account is free so it has many diseases and the 500MB weekly limit, if slow enough I managed to get away with very high ratios. Constant frame rate, film or grain tune presset (depending on content) and mantra slower's better... with x265 is a tradeoff, too slow and they'll have to undig you from the grave when is finished. 2 passs encoding, turbo first and the rest profile, level and so on I don't normally touch anymore, leprosy soup. With hybrid's a bit different, more tweaking, many options. Audio is ACC 48KHz, 320 Kbps. There was a time I used AC3 at higher bitrates but then hybrid got jealous and always raised xenomorbid questions... blink blibink

    unˆcomˆpression
    image

  • That pic made me smile. Its a classic :-)

  • u avoid gamma shift during export using ffmpeg for vimeo? I tried pix_fmt and I still get washed out colors.

  • I use ffmpeg ONLY for trimming (through mpv's exerpt plug) clips, reencoding a LQ watch copy file OR wrapping MTS to movs for mister Fiber Cunt, je je. As I clumsily said above, I mostly use handbrake for vimeo... dunno if it helps but I also let homebrew compile and manage x264, x265, ffmpeg and all those binarises. Zee you

     
     
    More on compression
    image

  • A2 - doggy&me preset Do you specify the Average Bitrate with a max bitrate ? I assume this is not crf. I was looking for this type of a preset with ABR with a high VBV.

  • If I recall correctly retrospective's presset was CRF; A2 was a variant I used, cannot remeber if it was VFR or constant framerate but almost for certain was within average bitrate's option.
    The -vbv-maxrate and the bufsize are related to streaming bandwith and decoder's buffer, at the time remember reading about it... today I don't really care so much, relax max. Unless you've got an option that allows download of the original everything is recompressed and furthermore (post above) I find a slow cook of the built-in pressets is good enough. If I want to increase the comrpession/quality ratio in detriment of speed I can go x265 and for fun 10 bit. For work there's already a good deal of time spent solving source's problems and everything has to be practical and fast; also find urgent to invest in my poor human to human skills (at the sheep level right now, meeee j e je). For myself... I preffer to focus on more joyful parts, like making editing process more intuive, looking at the emptiness, surround by sound, use tools like language, drinking with friends (too seldom), sitting on a rock, improove suicidal methods, help little girl cross the street, etc. =)

  • I could not find anything that indicates that vimeo accepts h265. Is this a recent development ?

  • like socrates I dunno know, where's the milk shake for free? One day went and uploaded a x265 and it worked, then tried a x265 10 bit, worked too +)

     
    PS
    If you're using OSX, this is the modded handbrake 10bit that I use, cannot recall where I got it from =(
    It works in 10.10 and 10.11, sierra I don't know. For win maybe have a look here https://forum.handbrake.fr/viewtopic.php?f=11&t=34165 Again, hybrid has all those exotic flavous and options too.

    OSX handbrake 10bit DL (12MB)

     
    PS 2
    This video was uploaded as a 10bit x265, then if you download it you can see vimeo converted it to an 8bit x264
    cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=34 / lookahead_threads=5 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / stitchable=1 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=infinite / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=4500 / ratetol=1.0 / qcomp=0.60 / qpmin=5 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=4950 / vbv_bufsize=13500 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00

     

     
    Same story with this one