Image Sequence to Lossless -- what the size?

fifonik wrote on 7/19/2019, 10:16 PM

Got films scans as bmp image sequence:

General
Complete name                            : J:\Temp\Reel-10\0370.bmp
Format                                   : Bitmap
File size                                : 4.78 MiB
Image
Format                                   : RGB
Width                                    : 2 448 pixels
Height                                   : 2 048 pixels
Color space                              : RGB
Bit depth                                : 8 bits

4525 files, total size: 22,690,983,550 bytes, size on disk: 22,704,640,000 bytes

Each file exactly 5,014,582 bytes (uncompressed, I believe).

If I open bmp file and store it as png, the file size is about 2,919,307 bytes.

Compressed to MagicYUV RGB using FFMpeg 4.1.1 (-pred median) and got file: 28,785,977,562 bytes. Media info:

Video
ID                                       : 0
Format                                   : M8RG
Codec ID                                 : M8RG
Duration                                 : 4 min 11 s
Bit rate                                 : 916 Mb/s
Width                                    : 2 448 pixels
Height                                   : 2 048 pixels
Display aspect ratio                     : 1.195
Frame rate                               : 18.000 FPS
Bits/(Pixel*Frame)                       : 10.153
Stream size                              : 26.8 GiB (100%)

Compressed to MagicYUV RGB using VDub2 & MagicYUV 2.1.0 (median) and got file: 27,760,570,822 bytes. Media info:

Video
ID                                       : 0
Format                                   : M8RG
Codec ID                                 : M8RG
Duration                                 : 4 min 11 s
Bit rate                                 : 883 Mb/s
Width                                    : 2 448 pixels
Height                                   : 2 048 pixels
Display aspect ratio                     : 1.195
Frame rate                               : 18.000 FPS
Bits/(Pixel*Frame)                       : 9.789
Stream size                              : 25.9 GiB (100%)

So my question is:

Why the size is bigger than size of sum of the uncompressed bmp?

 

Thanks.

Last changed by fifonik

Camcorder: Panasonic X920

Desktop: MB: MSI B450M MORTAR TITANIUM, CPU: AMD Ryzen 3700X (not OC), RAM: G'Skill 16 GB DDR4@3200 (not OC), Graphics card: MSI RX580 8GB (factory OC), SSD: Samsung 970 Evo+ NVMe 500MB (OS), HDDs: Seagate & Toshiba 2TB, OS: Windows 10 Pro 1909

NLE: Vegas Pro [Edit] 11, 12, 13, 15, 17

Comments

Marco. wrote on 7/20/2019, 1:47 AM

Does your MagicYUV file include an alpha channel?

fifonik wrote on 7/20/2019, 2:10 AM

I'm using MagicYUV RGB, that can to RGB and RGBA and I'm choosing RGB that should be 24 bits.

Camcorder: Panasonic X920

Desktop: MB: MSI B450M MORTAR TITANIUM, CPU: AMD Ryzen 3700X (not OC), RAM: G'Skill 16 GB DDR4@3200 (not OC), Graphics card: MSI RX580 8GB (factory OC), SSD: Samsung 970 Evo+ NVMe 500MB (OS), HDDs: Seagate & Toshiba 2TB, OS: Windows 10 Pro 1909

NLE: Vegas Pro [Edit] 11, 12, 13, 15, 17

Marco. wrote on 7/20/2019, 2:53 AM

Could you render a short MagicYUV sample with just 1 frame and offer for download?

Marco. wrote on 7/20/2019, 4:56 AM

I just tested here on my own (rendered a BMP image sequence to MagicYUV RGB from Vegas Pro) and the resulting MagicYUV file is about 30 % smaller than the BMP source file.

Marco. wrote on 7/20/2019, 5:31 AM

I now see there's something strange with the file size of your BMP files. For 8 bit uncompressed BMP such a 2448x2048 frame is expected to result in about 14 MB file size. Maybe your scan is an RLE compressed version of BMP. The file size even seems like they scanned with a wrong bit depth (8 bit/pixel instead 8 bit per RGB channel).

Could you offer one of the scanned BMP source files for download?

fifonik wrote on 7/20/2019, 6:15 AM

Thanks for reply.

Here is archive with 5 bmp files & avi created from these files in VDub.

How all these BMP files could have exactly the same file size if they are RLE compressed?

Can it be some kind of indexed colors?

Last changed by fifonik on 7/20/2019, 6:28 AM, changed a total of 2 times.

Camcorder: Panasonic X920

Desktop: MB: MSI B450M MORTAR TITANIUM, CPU: AMD Ryzen 3700X (not OC), RAM: G'Skill 16 GB DDR4@3200 (not OC), Graphics card: MSI RX580 8GB (factory OC), SSD: Samsung 970 Evo+ NVMe 500MB (OS), HDDs: Seagate & Toshiba 2TB, OS: Windows 10 Pro 1909

NLE: Vegas Pro [Edit] 11, 12, 13, 15, 17

Marco. wrote on 7/20/2019, 6:25 AM

Yes, it's what it seemed like. The scanned BMP are uncompressed but 8 bit per pixel only, not 8 bit per RGB channel (24 bit per pixel), resulting in 256 colors instead of 16.7 million colors. If it's all black and white this should be fine (if not I'd say the scan encoding was done wrong).
And it explains the different file size result compared to the MagicYUV output.

fifonik wrote on 7/20/2019, 6:36 AM

Most films were black & white. However, some are in colour but they are also in BMP with the same file size :(

Are there any tools that can dig in this kind of image information?

Thanks.

Camcorder: Panasonic X920

Desktop: MB: MSI B450M MORTAR TITANIUM, CPU: AMD Ryzen 3700X (not OC), RAM: G'Skill 16 GB DDR4@3200 (not OC), Graphics card: MSI RX580 8GB (factory OC), SSD: Samsung 970 Evo+ NVMe 500MB (OS), HDDs: Seagate & Toshiba 2TB, OS: Windows 10 Pro 1909

NLE: Vegas Pro [Edit] 11, 12, 13, 15, 17

Marco. wrote on 7/20/2019, 6:56 AM

In this case MediaInfo isn't the best choice. It only says it's 8 bit but lacks the information if it is 8 bit per pixel or 8 bit per RGB channel.

I used IrfanView. Its information says it's 8 bit per pixel with 256 colors.

fifonik wrote on 7/20/2019, 7:17 PM

Many thanks Marco.

I used to use IrfanView long time ago, however then changed default image viewer to XnView and using it since. Looks like IrfanView is better in this aspect.

Mediainfo is also shows this info (as in my first post: Bit depth: 8). For some reason I though it is per channel. I should have compared the MediaInfo output with normal images.

I've also found that for these images I can just use windows File Properties. On Details tab it shows bit depth 8. For normal RGB24 images it shows 24.

Last changed by fifonik on 7/20/2019, 7:24 PM, changed a total of 1 times.

Camcorder: Panasonic X920

Desktop: MB: MSI B450M MORTAR TITANIUM, CPU: AMD Ryzen 3700X (not OC), RAM: G'Skill 16 GB DDR4@3200 (not OC), Graphics card: MSI RX580 8GB (factory OC), SSD: Samsung 970 Evo+ NVMe 500MB (OS), HDDs: Seagate & Toshiba 2TB, OS: Windows 10 Pro 1909

NLE: Vegas Pro [Edit] 11, 12, 13, 15, 17