video size reduction by grayscaling it

1

1

When we convert a video into grayscale, all of its 3 colors (RGB) in a pixel are assigned the same number (instead of 3 different numbers). So theoretically we must have reduction in size almost by 66%. I know there is some metadata and sound data, but the largest data is for the pixels.

I converted a video with Handbrake with output size of 4.17 MB, then I did it with the same settings except checking the "grayscale" box, then the output file size became 3.88 MB. Why only 7% size reduction? For another video: 3.08 MB & 2.97 MB (almost 6%).

I also did the grayscaling with "monochrome" filter of "Corel Video Studio" and got a similar result (8.70 MB & 8.32 MB --> 5%). Is there any algorithm or something to get a better result?

living being

Posted 2015-01-06T08:02:31.947

Reputation: 812

Answers

2

The problem is that the underlying format you are saving as does not understand anything other than a 24bit per pixel colour. If the underlying container or format specifically catered for 8-bit grey scale (or 8-bit formats in general) then you would see the size reduction you ate expecting.

As an example you can save an image as a .BMP or PNG you usually get the option to set the bit depth for the output (you do if you are using Paint.NET at least) then converting to grey scale will see a benefit.

JPEG does not strictly support lower bit depths if I remember correctly, I would be surprised if most modern video encoders did either as 99% of their use is for colour sources.

Mokubai

Posted 2015-01-06T08:02:31.947

Reputation: 64 434

+1 for your useful info. Any reference please? I was wondering if size reduction by almost 66% doesn’t worth to manipulate the container so it understand 8-bit pixels? (Of course I know there is very few grayscale video demand). If JPEG do not accomplish this, can anyone else do this and then coin a new format (and probably a new player)? Is it a hard work? – living being – 2015-01-06T15:16:59.660

@livingbeing in short it would be a lot of work to come up with a new format. JPEG is already very high compression and from what I can find there are some technical reasons why you are not seeing the extra compression you expect. One of the reasons would be that JPEG doesn't store the RGB data but instead converts to YCbCr format to take advantage of some visual compression techniques. I was intending to edit my answer but due to work and other commitments I have not had a lot of time as it is quite in-depth. I was hoping to write more at the weekend. – Mokubai – 2015-01-08T07:12:03.550