0

I have a stream of raw images that cames from a network grayscale camera that we are developing. In this case, our images are arrays of 8bits pixels (640x480). Since this camera outputs more than 200 frames per second, I need to store these images as a WebM video, as quickly as possible, in order to not lose any frame.

What is the best way of doing that, using libvpx?

Fernando
  • 1,477
  • 2
  • 14
  • 33

1 Answers1

0

The fastest and easiest thing to do would be to provide the gray scale plane directly into libvpx compression function vpx_codec_encode with VPX_IMG_FMT_I420. You'll have to input two 2x2 subsampled color planes with it though - 320x240 in your case - make all the octets of those planes have the value 128.

mark
  • 5,269
  • 2
  • 21
  • 34
  • Would you mind giving me a source code example? I need some compression that don't lose much of the original video quality. – Fernando Jun 13 '16 at 17:58