Size / Compression of MJPEG vs MPEG-4

16,438

Solution 1

M-JPEG is not really bad, it is awesome instead. The encoding is widely supported, each individual frame can be decoded without references to other stream data. Yes, the compression rates are not as efficient as those of achievable with MPEG-4.

There is often an option to set MPEG-4 streams to match desired bitrate (CBR encodings) which is a good way to control bandwidth and actual bitrates. It is a rare option with JPEG encoding.

Check this out: MJPEG vs. H.264 with video surveillance cameras (which itself refers to another interesting reading Why we like MJPEG compression).

Solution 2

I don't believe there's such a thing as a "better" or "worse" format, and being a newer compression methods doesn't add value.

One should as why the movie is needed for: I was looking for a car DVR camera, and was considering the different compresseion formats. Well, you should think what is the most important function needed? it's recording the MOMENT of an accident! Then, beside this, you may enjoy casual recording of the trips.

So, MJPEG will preserve EACH single frame, while MPEG will only encode the difference between frames, and it may loose some details, like car plate number, or a small details at the impact moment!!

I think that MJPEG is vital for such use.

But, if I'm using it for surveillance, then I may tolerate dropping a whole frame or two, and favor disk space saving to quality

Correct me if I'm wrong; I've not selected a camera yet!

Share:
16,438
Toby
Author by

Toby

Updated on August 22, 2022

Comments

  • Toby
    Toby over 1 year

    how big is the difference between a MJPEG and a MPEG-4 encoded stream ? I have an IP Camera which is capable of saving data to a 32 MB Buffer, in MJPEG Format or in MPEG-4. Resolution is 800x600 at 30 FPS Now when I streamed with MJPEG I could save like a 40-50 seconds. When streamed with MPEG-4 I could save 8 minutes ( if there was almost no motion ) and like 3 minutes if there was a lot of motion.

    I know that the size of the MPEG-4 depends on how much motion / changes there were but what I am wondering about is the fact that even with full motion the MPEG-4 can save so much more video than MJPEG ? Is the compression of MJPEG really "that bad" ?

  • Toby
    Toby over 12 years
    Well, I see, when I have much motion in my stream I should rather use MJPEG, since the difference in the filesize shouldn't be so much. But still, it makes for my application ahuge difference if I can save 50 secs of stream or 3 minutes.
  • Roman R.
    Roman R. over 12 years
    So use MPEG-4/H.264 then. It's a bandwidth/storage saver.
  • Toby
    Toby over 12 years
    Okay , so just to sum it up - this "huge" difference between the two codecs is real and quite normal? I am not doin something crucial wrong? ^^
  • Roman R.
    Roman R. over 12 years
    No, it's fine. As compared to JPEG, MPEG-4 codecs are more recent and more complicated, they do temporal compression, they basically use more advanced technology. Hence, the higher compression rates are what they are here for.
  • Toby
    Toby over 12 years
    Allright then! Thank you for your help!