PDA

View Full Version : need some help on getting better quality


Shinn Asuka
6th August 2006, 18:28
im trying to c if i can get better quality on this cs:source clip. I'm using megui with HQ-Insane video profile and 3000 bitrate but it doesn't seem like the best i can do. I tried 5000 bitrate and it is about the same quality. Here's the clip.

http://rapidshare.de/files/28415205/x264.mp4.html

So i want to know what can i do to get perfect or better quality. Thx in advance ^_^

Bumsfalara
6th August 2006, 23:05
What about the original uncompressed Video file?

BlackSharkfr
7th August 2006, 01:23
Let's see what the file says...
core 49 svn-551M - H.264/MPEG-4 AVC codec - Copyleft 2005 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:-2:-2 analyse=0x3:0x133 me=umh subme=7 brdo=1 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 chroma_qp_offset=0 slices=2 nr=0 decimate=1 bframes=3 b_pyramid=1 b_adapt=1 b_bias=0 direct=3 wpredb=1 bime=1 keyint=250 keyint_min=25 scenecut=40 rc=2pass bitrate=3000 ratetol=1.0 rceq='blurCplx^(1-qComp)' qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 cplxblur=20.0 qblur=0.5 ip_ratio=1.40 pb_ratio=1.30

Try to check no-fast-pskip, i often have blocking with gaming footage if i don't use that option. i don't see anything else you could do...
You could also use a constant quality mode instead of bitrate ?

Shinn Asuka
7th August 2006, 02:24
the uncompressed looks much better and BlackSharkfr i will try that asap

Blue_MiSfit
7th August 2006, 02:53
purely CG stuff - i.e. video game digital captures are hard to encode. The edges are too sharp, as most encoders are tuned for softer film or video. Add some noise and a bit of a blur, this will help things a lot.

Definatley check no fast p skip, and maybe try adaptive quantization (available in non SVN patched builds). This can help kill blocks even when you are saturating the codec with bitrate.

Also, try XviD with a good custom matrix.

My poor little P3-700 lappy cant handle your test clip for playback, but I can see the issues you are talking about when I scrub around.

Honestly it doesnt look too bad to me. I cant really tell, like I said, but again video game footage is a real bastard to get looking good.

You chose a good resolution, I think my suggestions may improve things.

Also, if you didn't know, a nice way to compare your source and encoded result (in an avisynth script):

a=directshowsource("source.avs")
b=directshowsource("result.mp4")
return stackVertical(a,b)
#or stackHorizontal(a,b) depending on the framesizes and your display resolution


I love this for real time comparisons.

alea35
8th August 2006, 12:40
could you please elaborate on adding noise and blur?

Blue_MiSfit
11th August 2006, 09:05
Sure!

To add noise, try addgrain - a google will send you to trbarry's site which has the dll and the documentation available.

To blur, the built in avisynth blur function is a basic way to go. Documentation on using this filter can be found in the AviSynth documentation.

I would imagine that adding grain after blurring would be preferable.

There may be other options that produce better results, but this is what I can think of off the top of my head :)

~MiSfit

foxyshadis
11th August 2006, 10:25
Blur is ugly. :p

Capture, if possible, with the highest FSAA you can, that'll lessen the need to pound it with the blur() sledgehammer. Then try removegrain (mode 1 to 4, or 17) and/or DeGrainMedian, or one of the other denoisers on hard settings. That way you'll filter out most of the hard-to-see extra detail, and round the edges off so they aren't so hard on the codec. Visual quality should go way up. (You can also use the --nr setting in x264 to encode with, which works in a similar way.)

If you can't use FSAAx8, you'll need to use much stronger denoising to make up for it.

Blue_MiSfit
11th August 2006, 21:59
Great ideas. Running HL2 at 8xFSAA might not be practical, unless its a pre-recorded demo that can be re-rendered on demand.

How silly of me to not suggest RemoveGrain or DeGrainMedian. FFT3dgpu might be cool too, though that may be like killing a bug with a 500kt nuclear warhead... :D

~MiSfit