PDA

View Full Version : [SOLVED] Avisynth or Mencoder for a noisy film [SOLVED]


Guilllo
2nd January 2007, 17:18
Hi all.

I'm under Linux and want to encode files in x264.

My fisrt goal is quality, no matter the time it will take to encode.

I've got a noisy dvd (Seven) making blocks.

mencoder dvd://12 -vf crop=704:432:8:72 -nosound -ovc x264 -x264encopts bitrate=873:pass=3:turbo=2:keyint=250:keyint_min=25:scenecut=40:frameref=5:bframes=16:b_pyramid:nodeblock:cabac:qp_min=10:qp_max=51:qp_step=4:weight_b:partitions=all:me=umh:me_range=30:subq=7:threads=2:chroma_me:mixed_refs -o /data1/seven.avi

Here is a sample image :

http://img454.imageshack.us/img454/6803/shot0005bmt2.th.png (http://img454.imageshack.us/my.php?image=shot0005bmt2.png)


http://img166.imageshack.us/img166/3197/shot0003sk3.th.png (http://img166.imageshack.us/my.php?image=shot0003sk3.png)



Note that in some oether scenes, quality is like this, in some others scenes, quality is perfect.



Id' like to know if i should encode with mencoder( if yes how to improve command line) or use avisynth with filters to reduce blocking.

Guilllo
4th January 2007, 12:00
How can I improve my settings ? Should I reduce resolution ?

Here is what mencoder says : seems to have errors with scaling and colorspaces....


==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
SwScaler: using unscaled yuv420p -> yuv420p special converter
x264 [info]: using SAR=91/64
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2
New_Face failed. Maybe the font path is wrong.n 0mb A-V:0.000 [0:0]
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.



Thanks

nm
4th January 2007, 13:38
You switched deblocking off, so do you expect to get something else than blocking? ;)

How can I improve my settings ? Should I reduce resolution ?
Yes, for that bitrate, if you want to have blocking-free high motion without turning deblocking on. However, instead of reducing resolution right away, I would definitely turn deblocking on and see if that fixes the problem.

As for other settings, the default value of 16 for me_range is usually better than 30. For ultimate quality, also set nofast_pskip, trellis=2, b_pyramid, brdo, bime and direct_pred=auto. Two passes is more than enough, no need to do more on whole movies when ratecontrol has no problems reaching the target size.

If the source is really noisy/grainy, you could try denoising it with -vf hqdn3d (better denoisers are available in AviSynth). Tune the filter strength to suit your source. You can use MPlayer to play the source video with the same filter to see what it looks like.

Here is what mencoder says : seems to have errors with scaling and colorspaces....It just tries to use MPEG-PES passthrough first and then realizes that it is not possible with the output you use. This is normal and does not affect output quality.

Guilllo
5th January 2007, 11:58
Thanks a lot !!!

I've turned off deblocking :rolleyes: Next time, i won't copy a commabd line from a tutorial without understanding what it does...

I'm going to try the new settings.

Thanks again

Guilllo
5th January 2007, 18:35
Works so great now !

Thanks a lot