Motion JPEG vs Photo JPEG

And the winner is…Motion JPEG!

I’ve always heard them discussed more or less interchangeably, but I’m now just a little bit wiser thanks to a posting on vjforums of a posting by Josh Goldberg of a posting from the Eyecandy Yahoo Group oh now this is just getting silly. Let’s just say IT CAME FROM THE INTERNETS.

So here’s the skinny:

JPEG is a lossy format, and there are 2 main sources of loss when a JPEG codec is used – firstly there’s chroma downsampling and secondly there’s quantisation. There are also some small rounding errors which result from the overall process but they are negligible.

The most significant piece of information to know is that at 100% quality, all 3 codecs do not downsample chroma (they work at 4:4:4) andthey do not quantise the resulting data (they use a quantisation table of 1s). At 100% quality the only losses come from rounding errors andthese are negligible.

In other words, at 100% quality Photo JPEG, MJPEGA & MJPEGB are all practically lossless.

There are some important differences between the codecs, however.

Both the MJPEG codecs allow fields and a field order to be specified, and if used the fields are compressed separately and then combined. Thisprevents artifacts from mushing fields together, and at lower qualitysettings this can make a significant difference. For this reason alone,anyone working with interlaced video should use the MJPEG codecs and not the Photo JPEG codec.

At quality levels below 100%, chroma is downsampled respective to thequality level selected, but Photo JPEG samples at 4:2:0 (ie. verticalsamples) while the MJPEG codecs sample at 4:2:2 (ie. horizontal samples).

In terms of video footage, this relates to a fields issue and is another reason why you should use MJPEG codecs for interlaced footage instead of Photo JPEG. If your video footage is frames (eg. footage shot on filmand telecined 1:1) then it’s less of an issue.

As has been pointed out before, there is no quality difference between MJPEGA and MJPEGB, they are simply optimized for different hardware decoders.

In summary- at 100% quality all 3 codecs are practically lossless. Below 100%, the fact that the MJPEG codecs compress fields separately and downsample chroma horizontally means they will deliver better quality results from interlaced footage. Photo JPEG does not compress fields separately and downsamples chroma vertically, which can lead to field mush when used with interlaced footage.

Thanks to everyone who has passed this along!

Related Posts:

VJDV Video Feed  Ah! The first free cc-licensed VJ content feed appears. It...
Proposition for VJ Tagging System So I read Jean Poole's Open Call to Video Bloggers...
Live Video in Motion 2.0 Pete Warden has released an unofficial plugin for Apple's Motion...
Motion Dive Hardware Interface  Create Digital Music has a great article on Motion Dive...


About this entry