auto maximum video quality - Feature Requests - CHDK Forum supplierdeeply

auto maximum video quality

  • 5 Replies
  • 2727 Views
*

Offline reyalp

  • ******
  • 12727
auto maximum video quality
« on: 16 / August / 2008, 17:23:30 »
Advertisements
This thread Video feature question gave me an idea.

We should be able to detect when the ! buffer warning is displayed (or what conditions trigger it), and adjust the compression or quality settings on the fly to keep it near whatever the users particular camera/card combination can handle.
Don't forget what the H stands for.

Re: auto maximum video quality
« Reply #1 on: 18 / August / 2008, 23:23:28 »
While this might be a great idea, it would require in-depth testing to determine the impact on constantly varying video quality. The viewer will accept a degraded image that stays at the same amount of degradation throughout, but I don't think the experience will be as readily accepted if the video is high quality one moment and then changes to a lower quality the next.

Numerous codecs use a variable compression scheme, but they regularly write keyframes that contain a maximum of information, and then just write the changes in succeeding frames until enough change has occurred that another keyframe is required.

This is somewhat different than what you are suggesting since, in effect you would be changing the quality of the keyframes each time as well. (metaphorically speaking)

I'm not suggesting that the concept wouldn't work, just that it may result in a form of "image pumping" similar to the audio effect caused by an AGC circuit. This might be somewhat uncomfortable to watch.  :blink:

I'd be interested in seeing the results if it is implemented.
« Last Edit: 18 / August / 2008, 23:25:23 by cybercom »
~~~~~~~~~~~~~~~~~~~~~

<")%%%><<

*

Offline reyalp

  • ******
  • 12727
Re: auto maximum video quality
« Reply #2 on: 19 / August / 2008, 01:55:26 »
You can already change the compression and quality on the fly in the juciphox build to see what the effect is like.

The camera compression doesn't do anything as smart as keyframes... It's basically just a bunch of jpegs in a row. Big jumps in quality are obvious, but reducing a few steps over a handful of frames is quite subtle.

The main point of my suggestion is automatically dropping it back a few steps if you get the buffer warning, instead of breaking your video. This means that to get the maximum practical quality you don't have to test each card or worry about whether it is freshly formatted or how compressible your subject is. Adaptively keeping it at the maximum (i.e. stepping up if the buffer has plenty of room) might be interesting, but that isn't the main idea. I could definitely see it causing annoying artifacts if it was constantly hunting back and forth.

All this is irrelevant unless we find out where the warning is generated. I've found the string "JPEGBufferFullForMovie" which  appears to be accessed via a table somehow connected to ErrMap.c. This looks promising but I haven't figured out where it would be triggered.
Don't forget what the H stands for.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: auto maximum video quality
« Reply #3 on: 19 / August / 2008, 04:09:04 »
sounds like a good idea to me. also, i havent really grasped the difference between bitrate & quality yet, in CHDK terms i mean.
quality seems to be the compression of the single jpgs (funny effects if you reduce it to 1 by the way :D), and bitrate is exactly what? and cant we combine these two somehow, using maximum quality with maximum bitrate?


*

Offline brainwash

  • **
  • 95
  • Nikon D40x & A460
Re: auto maximum video quality
« Reply #4 on: 22 / August / 2008, 10:52:45 »
From what the explanation says bitrate implies that a constant bit rate is held. Thus, each frame would tend to have the same size, irrespective of the scene complexity. Quality, like you said, applies to the 'JPEG' compression of individual frames. I'd choose quality over bitrate since this might mean that at constant bitrate black frames take up the same size as a complex frame. In my experience however I didn't get to notice differences between those two, so I use quality 75-80 for HD and 60 for LP-mode.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: auto maximum video quality
« Reply #5 on: 23 / August / 2008, 07:52:20 »
I haven't experimented with those options, but from what brainwash says, it sounds like the jpeg quality alternative shouldn't be used with this feature, since it should cause wildly varying bitrate frame-to-frame, while bitrate selection would provide a constant maximal thruput (and waste precious card space, but that's not the issue here really).

 

Related Topics