tags:

views:

38

answers:

1

I have to write code for a CCTV(video surveillance system) to store an elementary stream on hard drive in a container format.

But there are too many choices, I don't know which format should I use.

What format will cost less CPU cycles and permit replay by popular media players?

+1  A: 

It's generally not the container that matters so much as the codec you use to compress the data. Container formats such as MP4 and ASF permit many types of encoded data to be added to them.

Stu Mackellar
I don't need to write codec to compress data. That's the job of hardware. I just need to save compressed data to hard disk. I know MP4 and ASF are OK, but which one should I use?
ablmf
Again, it depends which codec you're using. For example, if it's H264 then an MP4 container would be supported by many media players, whereas you're unlikely to find many that would accept H264 in ASF, even if it is a valid combination. It's basically all about convention. Also, if you're not concerned about the encode or decode overhead then simply writing to and parsing the container will take negligible CPU time - I'd be more worried about disk throughput.
Stu Mackellar