Video compression has gone a long way, and their main purpose still strive to have the smallest file size possible while maintaining a good video and sound quality. MPEG4, H.264 and MJPEG CODECs are three DVR is designed to compress the videos to transfer purposes. Each of these formats have their own strengths and weaknesses.
First came the MPEG-1, followed by MPEG-2 and now MPEG-4 comes into play. MPEG-4 is a massive upgrade to MPEG-2 format that focuses more on compression. It is a standard that can effectively compress both audio and visual data for streaming purposes, or to care for long-term data on optical media. Because it covers current technologies, MPEG-1 and MPEG-2, MPEG-4 is also good for video calls and TV broadcasts. It can creep even the largest video files into small pieces for faster transfers over the Internet or via a cellular network. Other data may be incorporated into MPEG-4, and like pictures or video. MPEG-4 also sports some interactive elements, so long as they have supported the player to allow some layers of the video to be manipulated.
H.264 otherwise known as MPEG-4 Part 10 or AVC (Advanced Video Coding) is MPEG-4 format to another level and has an advantage over the older formats, because it contains inter-picture prediction functions allows up to 32 image references. It focuses on lossless methods and goals of flexibility in a variety of systems. Their lossless methods can also reduce their file sizes even more than MPEG-4 formats, making them ideal for HD video. A growing number of mobile devices use the more popular MPEG-4 format.
MJPEG is another format that can not be known by all. MJPEG basically come from the JPEG format which is very standard for compressing images. The MJPEG follow the same process and add other things in streaming each image or frame together. The end result leads to lower CPU usages compared to other formats, but higher file sizes, resulting in increased bandwidth necessary for streaming.
Your choice of DVR compression depends on the specifications of your system and your intended use of the distribution. Therefore, there is currently no format that rules over all. If you plan to distribute video clips to slow computers, MJPEG be choice. For better compatibility with mobile devices and standard computers to the MPEG-4 is a safe choice. If the quality must be maintained while keeping file size small (preferably in high-definition video), H.264 is the best choice. You can even try to compress video in all three formats, compare them all and see what looks best for you.