What is the difference between mjpeg and h264?
first know that The H.264 & MPEG-4 AVC & MPEG-4 part 10 are the same. check this
now
With moving cameras or images of high activity areas, MPEG4 and H.264 provide little bandwidth savings relative to MJPEG.
Proper network design requires factoring in worse case scenarios so you will need to dedicate the same amount of bandwidth whether or not you use MJPEG, MPEG4 or H.264.
MJPEG provides higher quality because of no intra-frame compression.
Unlike MJPEG, with MPEG-4 vendors deviate from standards, increasing potential integration costs.
While H.264 generally reduces bandwidth consumption significantly, it depends on multiple factors (including complexity, streaming mode, frame rate and i frame rate). VBR vs CBR selection is especially important, having a especially large impact on use and performance. Finally, while H.264 can deliver the same visible image quality as MJPEG, depending on the settings you use (especially streaming mode), you can easily generate worse quality.