Settings for LECTURES and still pictures?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
CoR
Posts: 3
Joined: Thu Jun 03, 2010 8:23 pm

Settings for LECTURES and still pictures?

Post by CoR » Thu Jun 03, 2010 10:24 pm

I have some video lectures. Aprox 800mb xvid each. That's way too much.

All I want is to preserve written text on white/black board and embedded pps slides. Shadows, hue, small color changes are so irrelevant and unnecessary. Any motion is not important also.
Voice is excellent on 48kbps. Will test it on 32kbps.

So goals should be something like this:

File size: smallest possible
Quality: best for readability and character recognition
Compression Time: irrelevant


These are my settings so far:
Picture:
size:480x352
keep aspect ratio, crop as much as you can
anamorphic: NONE

VideoFilters: off

Video:
(x264), Avr: 80-100kbps 2pass, turbo

Audio:
AAC, Stereo/mono, 48KHz, 48kbps

Advanced:
ref=16:bframes=16:subq=9:mixed-refs=0:8x8dct=1:trellis=0:b-adapt=2:direct=auto:me=umh:merange=64:no-fast-pskip=1:analyse=all:b-pyramid=1
Questions:
1. Why stereo/mono doesn't effect file size?
2. Any ideas on picture size?
3. Suggestions for advanced? I just put everything on best.
4. Is there any way to make vid more like cartoon and even go with lower bitrate?
5. Any suggestions from you.

mkelley
Bright Spark User
Posts: 389
Joined: Fri Dec 25, 2009 2:00 am

Re: Settings for LECTURES and still pictures?

Post by mkelley » Fri Jun 04, 2010 1:03 am

Um, RF 50?

mduell
Veteran User
Posts: 6681
Joined: Sat Apr 21, 2007 8:54 pm

Re: Settings for LECTURES and still pictures?

Post by mduell » Fri Jun 04, 2010 4:21 am

Yea I'd say a mid 30s rate factor and dump the crazy options like merange 64.

jamiemlaw
Veteran User
Posts: 536
Joined: Thu Sep 17, 2009 4:52 pm

Re: Settings for LECTURES and still pictures?

Post by jamiemlaw » Fri Jun 04, 2010 11:05 am

A few points:
  • Update to the latest nightly build: it'll have the most refinements in it to help squeeze out the best compression efficiency
  • Keep the image size the same as the original: I've found that given two videos of the same file size, one 1024x576 and the other 480x360, it's easier to pick out details in the larger, despite its lower quality.
  • If you want everything on best, you can up motion estimation method to "Transformed Exhaustive", the subpixel motion estimation to 10, and trellis to 2.
  • 16 reference frames can mean that some players can't play the video back: you get scrambled macroblocks in places. Do a 10 second preview to check it works on your player of choice. VLC can handle 16 reference frames.
  • If motion isn't an issue, just drop the frame rate. You can cut the bitrate down by two thirds if you set the frame rate to 5fps. Even 12 fps will probably drop it by one third.
  • If it's taking too long to encode, drop the motion estimation range. Depending on the speed of your processor, 24 or 32 are the absolute maxima you should need to use, unless you really don't care how long it takes to encode.

User avatar
Rodeo
HandBrake Team
Posts: 12209
Joined: Tue Mar 03, 2009 8:55 pm

Re: Settings for LECTURES and still pictures?

Post by Rodeo » Fri Jun 04, 2010 1:38 pm

From x264 --fullhelp :

Code: Select all

                                  - stillimage (psy tuning):
                                    --aq-strength 1.2 --deblock -3:-3
                                    --psy-rd 2.0:0.7
IIRC this tune is meant to help compress individual images (because apparently x264 can beat some JPEG encoders in compression efficiency, even for stills).

However, it may still be applicable to slideshows with images changing only every few seconds - though it might not work well for transitions.

creamyhorror
Regular User
Posts: 134
Joined: Mon Jan 04, 2010 2:00 pm

Re: Settings for LECTURES and still pictures?

Post by creamyhorror » Fri Jun 04, 2010 5:16 pm

A psy-rd of 2.0 and aq-strength of 1.2 are going to increase the bitrate requirements rather than decrease them (but provide better texture and grain retention). For the OP's purposes, psy-rd should probably be somewhat lowered from the default of 1.0, and aq-strength possibly lowered as well.

User avatar
Rodeo
HandBrake Team
Posts: 12209
Joined: Tue Mar 03, 2009 8:55 pm

Re: Settings for LECTURES and still pictures?

Post by Rodeo » Fri Jun 04, 2010 6:03 pm

creamyhorror wrote:A psy-rd of 2.0 and aq-strength of 1.2 are going to increase the bitrate requirements rather than decrease them (but provide better texture and grain retention). For the OP's purposes, psy-rd should probably be somewhat lowered from the default of 1.0, and aq-strength possibly lowered as well.
Well, it will increase bitrate at a given RF for sure - that doesn't mean it will reduce quality at a given bitrate.

You'd have to ask a real expert and/or test, but given that this tune is meant for still image compression, I don't see how doing the reverse of what it does is necessarily what the OP needs, considering that his source appears to be a sequence of images with very little motion.

CoR
Posts: 3
Joined: Thu Jun 03, 2010 8:23 pm

Re: Settings for LECTURES and still pictures?

Post by CoR » Fri Jun 04, 2010 6:24 pm

WoW, thanks for the usefull tips!
I was just experimenting with resizing and no resizing is the best for handwriting recognition! Original is 1280x720. But it's readable at as low as 50kbps! At 100kbps still pictures are as original :)
One hour of lecture is reduces to 90mb. That's great!

Mono is working now. It's ok at 32kbps, but sounds distant and muffled. 40kb and 48kb are quite ok.
Portable KMP is playing everything. No troubles so far.

Will continue to experiment with low FPS and other tips.

Side note:
From everything I have done today, my eye only noticed difference between raising and lowering bitrate. All advanced settings had very little to no visible effect on video. But some of them made huge difference on calculating time.

User avatar
Rodeo
HandBrake Team
Posts: 12209
Joined: Tue Mar 03, 2009 8:55 pm

Re: Settings for LECTURES and still pictures?

Post by Rodeo » Fri Jun 04, 2010 6:42 pm

Indeed, just did a test with a clip I lowered to 0.4 fps (so basically, one frame every 2.5 seconds - in order to approach the characteristics of a slideshow).

At 100 Kbps (2-pass w/turbo firstpass), 1080p0.4 is almost transparent…

As for settings, I do notice a difference with tunings - stillimage is perhaps a bit strong but no tuning looks better than animation-like settings (psy-rd=0.4:aq-strength=0.6:deblock=1,1) which remove some detail.

Haven't bothered testing non-psy options since even at 100 Kbps we're quite reasonably close to transparency.

If you lower the framerate, you may want to increase the keyint (e.g. keyint=250) - HandBrake sets it to 10 * framerate but if there's little motion a higher keyint will increase compression efficiency.

CoR
Posts: 3
Joined: Thu Jun 03, 2010 8:23 pm

Re: Settings for LECTURES and still pictures?

Post by CoR » Sun Jun 06, 2010 12:07 pm

My settings for Lectures:
Picture:
NO resize!!! (even if extra large1280x720), keep aspect ratio
anamorphic: NONE!
crop as much as you can

Video:
(x264), 12FPS, AvrBitrate: 100kbps, 2pass, turbo

Audio:
AAC, Mono, Auto, 48kbps

Advanced:
ref=6:mixed-refs=1:bframes=6:b-adapt=1:direct=auto:b-pyramid=1
:me=hex:subq=9:no-fast-pskip=1
:analyse=all:8x8dct=1:trellis=0
:deblock=-3,-3
And here's my why's.
Audio: 32kbps will make little distorted sound. At 40 I didn't notice difference. To be on safe side I used next value = 48kbps. For one hour video 8kbps creates about 4mb difference in file size .

Video:
NO resize, no anamorphic, ever! Crop as much as you can! All of these are really important!
FPS 5 makes noticeable twitching when professor is writing. 10 is kind of ok. I used 12.
Bitrate from 50 to 90 produces better and better still pictures. 90vs100 almost no difference. I took 100.
Much of advanced settings make little or no difference. Yet again, I was focusing on hand writing and slide quality.

For my purposes no resize, bitrate and subq=9, b-adapt=1, were most important!

Compression rate is excellent! 800mb => 90mb Final quality is more than satisfying. Thanks for all suggestions :)

Post Reply