I'm trying to test and experiment with quality settings in some x264 front end tools. There seems to be some debate about CRF vs. 2-pass encoding and which is better. I understand if you have a file-size target than 2-pass is better whereas the CRF will give you better quality control for an unknown filesize.
RipBot's lowest CRF value is 18 but can I manually input 15 and get even better quality or will it just default back to 18 when the encode happens?
Filesize isn't an issue and most of my blu-rays won't have video compression but my DVD collection is a little different. I've got several DVD's that were advertized as widescreen but were infact 2.4:1 AR movies letterboxed in a 4:3 frame. So playback on HDTV's leaves you zooming in as the only way to get a good view of the actual film while keeping people's faces looking normal. Some cropping/encoding will be necessary.
+ Reply to Thread
Results 1 to 27 of 27
-
-
Yes you can manually enter values; you're not limited to the drop down presets. CRF15 will give better quality (and larger filesize) than CRF18
-
-
I'm not counting on an actual increase in visual quality, I just don't want to be staring at a rectangle inside a black square which is itself in a black rectangle again. Simplifies things to crop so that I don't have to zoom. Furthermore I find that the DVD's that have this problem are typically not the most stellar PQ anyway, and the x264 gives almost zero noticeable quality loss after encoding.
-
-
On a side-note, will a 2-pass encode give a variable or constant bitrate?
And if you KNEW the output filesize would the 2-pass mode be a better choice for quality/GB?
Ethelred -
If you're going to reencode with x264 anyway you might as well crop, yes.
With bitrate based encoding you know the file size but you don't know the quality. With quality based encoding you know the quality but not the file size. If you perform a CRF encode and the file turns out a certain size, then go back and do a 2-pass VBR encode for the same size (without changing other settings) the quality of the two files will be very similar.
By the way, you can set CRF as low as zero -- lossless encoding. But the file size will be enormous.Last edited by jagabo; 8th Oct 2010 at 06:03.
-
-
It won't really work. There are several issues:
1) NTSC DV uses YUV 4:1:1 chroma subsampling. x264 doesn't support that. You would have to convert to interlaced YV12. There will be some losses from that conversion.
2) Few playback devices support lossless h.264.
3) The resulting video will usually have a higher bitrate than the source DV. About 2x, in my experience. -
Okay, forget that idea (DV to H.264 losslessly). Can you recommend any particular settings when going from DV to H.264 (with MP4 wrapper) that would result in H.264 video without a visible difference? Perhaps using an x264 encoder, though not necessarily. The objective would be files that will playback on something like a WD TV Media Player.
Encoding time would not be an issue. I can even render the DV as uncompressed, 10-bit, 4:2:2 video (in Final Cut Pro X), and compress that to H.264, if you think there would be any point. -
Sorry, I didn't notice this is a blu-ray ripping forum. I should post my last post elsewhere.
-
Encoding at CRF 10 will get you files that are nearly indistinguishable from the original even when looking at enlarged still frames. Be sure to specify --bff (interlaced, bottom field first for DV AVI) and the correct aspect ratio*:
x264 --crf 10 --bff --sar 10:11 --output filename.mp4 filename.avi
The resulting files should be playable on most media players that can play h.264 mp4. And they will usually be smaller than the source.
That's just the video of course. You'll have to encode and mux in the audio separately. Or use one of the x264 front ends that handles audio along with the video.
* DV pixel aspect ratios (called sample aspect ratios in x264) :
NTSC 4:3: --sar 10:11
NTSC 16:9: --sar 40:33
PAL 4:3: --sar 12:11
PAL 16:9: --sar 16:11 -
I'd rather deinterlace, if feasible, rather than depend on a player to handle it.
The PAR (aka sar) is confusing. 10:11 will horizontally scale 720 x 480 to production aperture of 654 x 480. The video also needs to be cropped on the left and right to clean aperture of 640 x 480. Where does that take place? Does the H.264 recognize both apertures, and the player is supposed to know what to do? Or should the DV video be both horizontally scaled and cropped when compressing to H.264, and the resulting H.264 consist of only the pixels representing the clean aperture? -
Then deinterlace with your favorite deinterlacer and encode progressive. I'd use QTGMC() in AviSynth and encode at 60 fps.
DV follows the ITU 601 D1 spec. The 4:3 image in a DV frame is in the central 704x480 subsection of the frame. 704 * 10 / 11 = 640. The entire 720x480 DV frame is slightly wider than 4:3.
When you set --sar in h.264 you are setting the sample aspect ratio (aka pixel aspect ratio). It becomes the player's responsibility to resize the image for display. If you want to resize to square pixel, crop the DV frame down to 704x480 and resize to 640x480 or some other 4:3 frame size. -
So you are saying, h.264 supports the ITU 601 D1 spec, and the video can still be non-square 720 x 480 pixels, and the player supposedly understands what to do? Is the player supposed to actually "read" the sar?
I think I would prefer to crop and scale the video to square pixels beforehand, to account for players that won't know what to do. -
-
-
-
I use 640x480 , recently rather 720x540 resize , not feeling good about to leave 720x480 and to set 4:3 NTSC aspect ratio by MeGui , I use DVXA SD HQ settings, CQ18.
from Vegas timeline:
AviSource("D:\server.avi")
ConvertToYV12(interlaced=true,matrix="pc.601")
QTGMC( Preset="Slow" )
Lanczos4Resize(640,480) #or 720x540
very good result, the only problem is possible pixelation in very dark areas, shades, dark gradients, is there a way to consolidate it within MeGui ? CQ ussualy sets bit rate very well, but in this case it is the only problem that doesn't look like original after close look -
-
-
Hi Ethelred,
Can you tell me what size is your Current Monitor size!?!?
Ethelred -
I have been using the default of .6.
Perhaps this setting would help him more directly. It was created for just this purpose. I read about the predecessor settings on Doom 9 in Dark Shakiri's comments on the issue of blocking. The blocking in flat and dark areas was a major annoyance for me I used Xvid much longer than I otherwise would have.
From
http://mewiki.project357.com/wiki/X264_Settings#qcomp
aq-mode
Adaptive Quantization Mode
Default: 1
Without AQ, x264 tends to underallocate bits to less-detailed sections. AQ is used to better distribute the available bits between all macroblocks in the video. This setting changes what scope AQ re-arranges bits in:
0: Do not use AQ at all.
1: Allow AQ to redistribute bits across the whole video and within frames.
2: Auto-variance AQ (experimental) which attempts to adapt strength per-frame.
See also: --aq-strength
aq-strength
Adaptive Quantization Strength
Default: 1.0
Sets the strength of AQ bias towards low detail ('flat') macroblocks. Negative values are not allowed. Values outside the range 0.0 - 2.0 are probably a bad idea.
See also: --aq-mode
It has the same defaults in the latest version
Code:--aq-mode <integer> AQ method [1] - 0: Disabled - 1: Variance AQ (complexity mask) - 2: Auto-variance AQ (experimental) --aq-strength <float> Reduces blocking and blurring in flat and textured areas. [1.0]
-
Using aq-mode and aq-strength I think he'll have to set the strength to about 2.0. But I'm not using the latest release of AviSynth. Maybe things have changed.
Last edited by jagabo; 13th Feb 2012 at 20:14.
-
The defaults were good enough to stop the blocking for me.
I suppose AviSynth could be a source of blocking but it has nothing to do aq-mode as that is a x264 setting. Unless I am missing something.
I have looking over some threads on doom10.org, Dark Shikari's 'I am pissed at Doom9' site and a number of the problems some have had is that they disabled the aq-mode and then wondered why they got poor results.
Ethelred
Similar Threads
-
Hi8 -> DV -> Final Cut Pro = Low, low audio levels in captured video
By xmiller in forum Capturing and VCRReplies: 12Last Post: 14th Dec 2010, 16:59 -
Low CPU Real time Video Encoding
By striker9 in forum Video ConversionReplies: 4Last Post: 27th May 2010, 10:54 -
How to reduce blocky artifacts in low res, low bitrate video
By The111 in forum Newbie / General discussionsReplies: 48Last Post: 20th Mar 2009, 18:29 -
3GP_Converter (For Apple Devices) Updated: Quad Core Support + CRF Encoding
By GMaq in forum Portable VideoReplies: 1Last Post: 20th Sep 2008, 08:52 -
x264 CRF best for iPod encoding? Coder Options Quandary.
By radellaf in forum DVD RippingReplies: 0Last Post: 28th Mar 2008, 09:14