- Feb 17, 2002
- 4,723
- 80
- 91
I need to be able to store video data. This can be done as a video (preferred) or as a series of images. Either is fine.
The format must be lossless. Compression is not required, but would be nice.
The format must also have a readily available, easy to use library for manipulating the video/image files in C, C++, or Objective-C. C is strongly preferred.
Here's where it gets weird. The video information is your typical 8 bit rgb image, plus one more 16 bit field from a separate sensor. So this could be stored as a 5 channel image, where the 4th and 5th channels are just the upper and lower bits of the 16 bit field. Or, alternatively (preferred), the format could support a 4th channel that's 16 bits wide.
So far, what I have in mind is a custom variant of PPM/PGM image files, stored as a sequence (each file is a video frame). It's a large file format and terribly naive, but hard drive space or even "user friendliness" isn't really a concern. The problem with this approach, however, is that we'd now be performing 30 fopen's and fclose's per second, which I have a feeling will cause problems when the operating system's scheduler decides to stop being nice to my software.
Any thoughts, insight, etc. are greatly appreciated
The format must be lossless. Compression is not required, but would be nice.
The format must also have a readily available, easy to use library for manipulating the video/image files in C, C++, or Objective-C. C is strongly preferred.
Here's where it gets weird. The video information is your typical 8 bit rgb image, plus one more 16 bit field from a separate sensor. So this could be stored as a 5 channel image, where the 4th and 5th channels are just the upper and lower bits of the 16 bit field. Or, alternatively (preferred), the format could support a 4th channel that's 16 bits wide.
So far, what I have in mind is a custom variant of PPM/PGM image files, stored as a sequence (each file is a video frame). It's a large file format and terribly naive, but hard drive space or even "user friendliness" isn't really a concern. The problem with this approach, however, is that we'd now be performing 30 fopen's and fclose's per second, which I have a feeling will cause problems when the operating system's scheduler decides to stop being nice to my software.
Any thoughts, insight, etc. are greatly appreciated