Re: H264 compression quality manipulation
- From: Industrial One <industrial_one@xxxxxxxxxxx>
- Date: Wed, 26 Sep 2007 11:35:02 -0700
On Sep 25, 2:37 pm, vl_ <vlyamt...@xxxxxxxxx> wrote:
Hello,
I am looking for the methods to reduce size of H264 encoded files ( at
the expense of quality ) for video streaming over wi-fi networks.
Would it be possible to manipulate compression quality either for
encoding, or for video stream ( h264 uses lossy compression,
correct ?)? What other methods can be used to that effect?
Thanks,
First off, you better have a decent CPU 'cuz on the most aggressive
settings, the time for H264 to complete encoding is in the DAYS range,
so have at least 1.5 GHz and encoding should take 3-6x longer than the
length of the video, depending on the content, ones with more visual
motion take forever and don't compress as well.
Before you do anything, consider resizing the video resolution to
512x384 or 576x432 if you can. A really high resolution will greatly
increase encoding time and really not worth the "quality" because on
interpolated full-screen it comes to the same thing. If you're gonna
resize with VirtualDub, set the filter to "bicubic," it looks the
best.
Now, decide if you wanna do a singlepass or a multipass, I do
singlepass cuz multipass simply takes too motherfuckin' long and the
5-20% gain was not worth it. So do a single-pass quantizer and select
the 1-51 quality range to 26 and 20-22 for videos with natural
graphics.
On the B-frames menu, increase the max amount of consecutive B-frames
and check "use as references" and "adaptive." Next, set the max key
frame interval to 500 (set it to more if your video content has few
scene changes/motion) increase scene-cut threshold, and min keyframe
interval to 10 (you don't want scene changes to be treated as B-frames
cuz then playback may lag.)
On the Analysis tab, check ALL the boxes, the "*frame search," "?x? ?-
frame" etc. including the 8x8 DCT, this slows encoding but preserves
quality while maintaining economic compression ratio. Set partition
decision to High quality, and use Hexagonal search (you can use
exhaustive search but it takes twice as longer with only a slight
gain.)
At least these are the settings that I use, but I mostly encode
cartoon graphics with these to which compress well and retain high
quality, but may not be suitable for all types of video content if
you're a quality whore, but this should be optimal.
Also, may I recommend lowering the audio bitrate to 96 kbps stereo
instead of 256/192/160/128 and the frequency to 22.5 KHz, this is
optimal for audio content consisting of mostly speech and linear
samples that we hear everyday, e.g. traffic sounds, walking etc. but
if you got more complex audio such as music then you should keep at a
minimum of 128 at 44.1 KHz. (Make sure it's variable bit rate instead
of constant -- you can't do this with VirtualDub but you can with
NanDub.)
-I/O
.
- Follow-Ups:
- References:
- H264 compression quality manipulation
- From: vl_
- H264 compression quality manipulation
- Prev by Date: Re: Any zip tools to create zip64 files?
- Next by Date: Re: H264 compression quality manipulation
- Previous by thread: Re: H264 compression quality manipulation
- Next by thread: Re: H264 compression quality manipulation
- Index(es):