CodecPage
 video encoding&cleaning


Filtering and (lossless?) recompression

When encoding high quality MPEG in 2 or more passes, it may be better to save filtered results to a file rather than frameserving to the MPEG encoder. But which format is best ?

Shortcut to the results

We start with this fast moving scene (double edges are from interlacing)

This is a Hi8 tape played back on a D8 camcorder.

The sky is a bit noisy, and as usual, contrast too high, shadows souped up.

A little filtering with VirtualDub beefs things up :

Levels adjusts gamma (shadows), temporal smoother kills noise,
HSV add some colour to compensate for the effects of the levels filter,
and Xsharpen adds a little crispness.The threshold of 65 avoids amplifying noise.
Colour shifting did not occur (the camcorder seems to correct it).

We now have the filtered image that we use for comparisons.

We compare PICmjpeg, Huffyuv, and DV (MainConcept codec)

The marked area above is used for an exact difference frame that we show enlarged and contrast enhanced to visualise differences pixel by pixel.

View the results here

View CCE encoding test here

Conclusion: PICmjpeg is already better than DV at a quality setting of luma 5,chroma 5 (between 19 and 20 in the simple mode), where it produces comparable file size (compression factor about 8); At settings of 2,2 or 1,1 it is impeccable.

The difference frames show things that are invisible to the naked eye (the original size and not amplified difference from PICmjpeg looks just as perfectls grey as the HuffyivRGB example); Only the differences for the HuffyuvYUY2 example are easily visible, as they also are in the direct Picture comparison.

Huffyuv can only reduce file size by 2:1 when lossless; The YUY2 option saves a little more space but is really bad.

What to use?

Either PICmjpeg at the tested or a higher quality setting if file size is a concern (perfect for any real world task), or Huffyuv with RGB.

PIC decodes much faster than Huffyuv, so I usually prefer it. Huffyuv however, has the advantage that it is free.

Finally, some comparisons of PICmjpeg at Q=5,5, 2,2 and 0,0:
(cutout section, signal difference, size and contrast doubled !)

Q=5,5

Q=2,2

Q=0,0

Obviously, no big difference between 2,2 and 0,0.
Hence, 2,2 is already the optimum. FIles are about 20GB/hour, approx. 1.5x larger than DV.

In order to really figure out how tiny these differences are, here is the difference frame for 5,5, original size and without contrast doubling:

Indeed almost nothing to see; right: the image section taken, for comparison

So the final recommendation is PICmjpeg with these settings:

 

 

 


 



Copyright (C) 1998-2011; all rights reserved. All materials in these pages are presented for scientific evaluation of video technologies only. They may not be copied from here and used for entertainment or commercial activities of any kind.
We do not have any relation to and do not take any responsibility for any software and links mentioned on this site. This website does not contain any illegal software for download. If we, at all, take up any 3rd party software here, it's with the explicit permission of the author(s) and regarding all possible licensing and copyright issues, as to our best knowledge. All external download links go to the legal providers of the software concerned, as to our best knowledge.
Any trademarks mentioned here are the property of their owners. To our knowledge no trademark or patent infringement exists in these documents; any such infringement would be purely unintentional.
If you have any questions or objections about materials posted here, please
e-mail us immediately.
You may use the information presented herein at your own risk and responsibility only. We do also not guarantee the correctness of any information on this site or others and do not encourage or recommend any use of it.
One further remark: These pages are covering only some aspects of PC video and are not intended to be a complete overview or an introduction for beginners.