Drade
Drade

Reputation: 167

Codec for lossless 8-bit grayscale

I have a camera that outputs 160 fps of 1024x1280 pixels in 8-bit grayscale (256 colors).

I need to encode this live without any loss. What's the best codec for this?

I can code this in either python or c++, and have lots of cores, so parallelization is an option.

Thank you

Upvotes: 2

Views: 1463

Answers (1)

Markus Schumann
Markus Schumann

Reputation: 8244

Motion JPEG-2000 supports lossless and gray scale.

ffv1 https://github.com/FFmpeg/FFV1/blob/master/ffv1.md is another common option for lossless.

Your uncompressed data rate is 160 fps * 1024 * 1280 = 210 Mbytes/s. I am guessing 50% compressing so you end up with about 100 MBytes/s compressed video.

This should be a doable I/O rate for a SSD.

Concerning the CPU - I suggest a naïve parallelization where you run one video compressor per core. So you have to do some sort of scheduling, pipelining and resorting of the output frames.

So if you have a 16 (32) core CPU each core needs to do 10 (5) fps which sounds pretty reasonable.

Upvotes: 2

Related Questions