Log in

View Full Version : Need help to encode difficult video to compress


mr.muscade
17th June 2018, 17:19
Hello, I encode with x264 since many years, I know well its parameters. Recently, I get some videos difficult to encode, because there are many artifacts, crispy image, and when I try to encode these videos, these artifacts are still present and the result is ugly. Bellow a sample uncompressed with the artifacts at the top of the image.

Please, could you help me to set the x264 parameters in order to smooth these area of artifacts? I wish result in almost HD@1Mbps. Thanks in advance!

Original video : LINK (https://www.dropbox.com/s/492x2wru46l42b5/original.uncompressed.mp4)
Compressed video : LINK (https://www.dropbox.com/s/3wkpar5wrruh0xw/sample.compressed.mkv)
The sample @1Mbps is encoded with the following x264 parameters:

cabac=1 / ref=9 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1,00:0,00 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / 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=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=1000 / ratetol=1,0 / qcomp=0,60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20,0 / qblur=0,5 / vbv_maxrate=62500 / vbv_bufsize=78125 / nal_hrd=none / filler=0 / ip_ratio=1,40 / aq=1:1,00

videoh
17th June 2018, 17:22
If the artifacts are in the source, how can you expect to remove them with encoder settings?

mr.muscade
17th June 2018, 17:26
If the artifacts are in the source, how can you expect to remove them with encoder settings?
Yes, the artifacts are in the source at the top of the image (crispy area). In order to remove them, I though play with x264 settings to smooth this area, but I failed.

videoh
17th June 2018, 17:39
I see. Better to do it in an Avisynth/Vapoursynth script, I think.

Sharc
17th June 2018, 19:00
..... I wish result in almost HD@1Mbps.....


Well, that's a challenge. You have to throw bombs at your video....

ChaosKing
17th June 2018, 19:23
Here's a filtered version https://www89.zippyshare.com/v/Ju3xwPph/file.html

clip = haf.SMDegrain(clip, tr=3, pel=2, contrasharp=False, thSAD = 500, thSADC = 400, prefilter=1).rgvs.RemoveGrain(mode=1)

x264 --preset veryslow --crf 33


x265 has also good quality @ low bitrates, maybe you could switch to hevc?

mr.muscade
18th June 2018, 06:59
Here's a filtered version https://www89.zippyshare.com/v/Ju3xwPph/file.html

clip = haf.SMDegrain(clip, tr=3, pel=2, contrasharp=False, thSAD = 500, thSADC = 400, prefilter=1).rgvs.RemoveGrain(mode=1)

x264 --preset veryslow --crf 33


x265 has also good quality @ low bitrates, maybe you could switch to hevc?

Good job! I will study this. I can't use x265 because our equipment doesn't read HEVC.