Best video codec to store the own collection

codeccompressionvideo

I think this question has already been asked but with different flavours.

My problem resised in the fact that my camera (Canon G9) creates video with almost raw codec (I think it's plain old MPEG) so a 10 minutes video is almost 900mb.

I would like to convert them in a format that has a good trade-off between space and quality, but I would prefer having the quality as good as the original (of course this is not possible because of lossy compression) just saving as much space is possible with a minimal lose of quality.

Which codec should I look for? H264? It seems to be the champion of the moment.. otherwise which other ones could I try? XviD?

Which parameters should I use? I mean how many kbits/s is a fair good bitrate to keep high quality? And what about audio codec?

video specs are 640×480 at 30fps or 1024×768 at 15fps..

thanks in advance!

Best Answer

My gut says that your camera's using MJPEG with some kind of PCM audio. To say it's inefficient as a storage codec is being charitable. I'll bet it was relatively easy for Canon to implement in firmware though.

As far as "something else" to compress to, MPEG-4 AVC (h.264) is the current king of popular codecs. For the moment. It's also hard to go wrong with MPEG-2, the codec used on DVDs. It requires a higher bitrate, but gives you files that you can very easily drop onto DVDs without further re-compression. MPEG-4 SP/ASP (XviD, DivX, etc.) fall in an odd space between the other two. Most software/devices that can play back XviD can also play back h.264 which has a higher quality at a given bitrate, but it lacks the future that h.264 does and the widespread availability and implementations of MPEG-2. There's also the new WebM format from Google, which is On2's VP8 codec with Vorbis audio in a Matroska (subset?) container.

For audio, it's best decided upon once you pick your container and codec. If you're creating a DVD-ready format, you'll want to stick with something like AC3, MPEG-1 Layer 2, or even PCM. If you aim at a more future ready Matroska file with h.264, you can use MP3 or AAC easily. WebM specifies Vorbis.

As far as parameters go, you'll have to tinker a bit until you hit on a balance that you like yourself. A good encoder frontend like Handbrake will probably give you acceptable results with default (or close to default) settings.

Related Question