Log in

View Full Version : How to encode with these specifics settings?


LucasSimba
26th December 2019, 03:49
Hi,

I am trying to make my own "light" encodes for 1080p files, while keeping a decent quality. There’s a person who does several encodes and I really like his settings, although he doesn’t have every movie that I am looking for. I was wondering if some of you could tell me how to encode movies with his specifics settings (which are always the same)?

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 2h 7mn
Bit rate : 2 500 Kbps
Width : 1 920 pixels
Height : 808 pixels
Display aspect ratio : 2.40:1
Frame rate mode : Constant
Frame rate : 23.976 (23976/1000) fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.067
Stream size : 2.23 GiB (76%)
Writing library : x264 core 152 r2851M ba24899
Encoding settings : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=32 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=2500 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=31250 / vbv_bufsize=31250 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=3:1.00

I emphasized what I consider important. Thank you!

Taurus
26th December 2019, 12:23
mmmh, scratching my head...
Why dont you just use the settings you showed to us?
It's all in the encoding settings, even the bitrate.
I noticed that these encodes are made with an old version of x264.
x264 core 152 -> we are now on core 159 (latest, I think).
Or, do you have some struggles to import these settings to a x264 command line?
Read the x264 help file, mostly you have to substitute the / with a -- and your fine,
and sure you have to define the pathes to your encoder and your input and output files.
Many GUIs let you do an import of encoding settings in the advanced tab.
Dont know what your after...
The settings you posted are mainstream, no magic.

microchip8
26th December 2019, 12:28
For "decent" quality, he surely uses very little bitrate for 1080p. This looks like a bitrate-starved encode to call it decent, even with the settings used (which are not the strongest compression either)

Sharc
26th December 2019, 12:48
@LucasSimba
Why make life unnecessary complicated? Use x264 with a preset and do a 1-pass CRF encode (--preset slow --crf 18). You can't go wrong with this.

Atak_Snajpera
26th December 2019, 16:07
Well the trick is not in some special settings in x264 but in DENOISING! (pre-processing) MDegrain can reduce average bitrate in movie by factor of ~1.8x!
https://i.postimg.cc/KznfB0td/2.png

https://i.postimg.cc/NFB44R4L/1.png

Sharc
26th December 2019, 17:06
True.
Just for the sake of completeness: if the OP does not want to use a high quality external noise filter he could also play with x264's internal noise reduction filter by setting --nr xxx instead of --nr 0 as in his example.

microchip8
26th December 2019, 17:08
.... yes, and introduce the wondeful artifacts of denoising

LucasSimba
26th December 2019, 17:41
Thanks for your answers!

mmmh, scratching my head...
Why dont you just use the settings you showed to us?
It's all in the encoding settings, even the bitrate.
I noticed that these encodes are made with an old version of x264.
x264 core 152 -> we are now on core 159 (latest, I think).
Or, do you have some struggles to import these settings to a x264 command line?
Read the x264 help file, mostly you have to substitute the / with a -- and your fine,
and sure you have to define the pathes to your encoder and your input and output files.
Many GUIs let you do an import of encoding settings in the advanced tab.
Dont know what your after...
The settings you posted are mainstream, no magic.

That's the thing, I don't know how to use these specifics settings with command line or a GUI for FFMPEG/x264 (or anything else). Hence the help needed. :)

Tadanobu
26th December 2019, 17:54
Well the trick is not in some special settings in x264 but in DENOISING! (pre-processing) MDegrain can reduce average bitrate in movie by factor of ~1.8x!
https://i.postimg.cc/KznfB0td/2.png

https://i.postimg.cc/NFB44R4L/1.png

Where can I learn more about pre-processing ? I can't find a good tuto/guidelines.

Selur
28th December 2019, 07:56
, I don't know how to use these specifics settings with command line or a GUI for FFMPEG/x264 (or anything else). Hence the help needed
Unless I missed something,...
MediaInfo - Encoding setting:
cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=32 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=2500 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=31250 / vbv_bufsize=31250 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=3:1.00
should convert to x264 cli
--cabac --ref 4 --deblock -1:-1 --partitions i4x4,i8x8,p8x8,b8x8 --me umh --subme 9 --psy-rd 1.00:0.15 --merange 24 --trellis 2 --8x8dct --cqm flat --deadzone-inter 21 --deadzone-intra 11 --chroma-qp-offset -3 --threads 32 --lookahead-threads 4 --bframes 3 --b-pyramid normal --b-adapt 2 --b-bias 0 --direct auto --weightp 2 --keyint 250 --min-keyint 25 --scenecut 40 --rc-lookahead 50 --bitrate 2500 --ratetol 1.0 --qcomp 0.60 --qpmin 0 --qpmax 69 --qpstep 4 --cplxblur 20.0 --qblur 0.5 --vbv-maxrate 31250 --vbv-bufsize 31250 --nal-hrd none --ipratio 1.40 --aq-mode 3 --aq-strength 1.00
+ usage of 2pass encoding with a target bitrate of 2500
(as a side note: I used mis2x264,...)

Cu Selur

Taurus
28th December 2019, 20:32
...as a side note..
mis2x264 is a nifty little tool Selur wrote a decade ago.:D;)
Just search for it via google or on videohelp.com