Reliable Mpeg2 Codec for use in a CCTV recording application

Posted on 2009-02-09
Last Modified: 2013-12-14
Hi All.  I have a C++ MFC app that accepts MJEPG streams from multiple IP Cameras and records the streams to their own individual AVI files.  The codec I've been using is the mpg4c32.dll from Microsoft.  I was having some sharing issue with this codec and recently found out that it has multi-threading issue.  I need another codec.  (only need video)

I know there are practically thousands of codecs out there.  What I'm looking for is suggestions for robust, reliable codecs that are used in safety critical applications.

I'm no expert on codec quality but for example Xvid may be great for compression and using in a dvd playing application, but may not be the greatest for a multi-threaded video recording application.

If you suggest a codec I would ask that you please back up your suggestion with some good factual evidence of its reliability (forum discussion etc).  I'm not looking to start a discussion, this is a very real problem for me and my clients are without recording until I fix this issue.  

Thank you so much for your help.
Question by:alexatsearidge

    Author Comment

    I would like the other question to be deleted.
    LVL 22

    Accepted Solution

    Notice that your Title of your question requests and MPEG-2 codec, but the codec you are using suggests that it is an MPEG codec that Microsoft used, which was Version 3 of the old MPEG-4 part 2 codec -- now virtually obsolete.
    My suggestion is an SDK that will enable you to build your project using the newest version of MPEG-4, which is H.264 (aka MPEG-4 part 10) . H.264 using X264 gives multithreading capability.
    Note that H.264 uses aproximately half the transmission and storage speed of MPEG-2. Also a special plugin is needed for your audience to playback MPEG-2 on most  WMP players.
    You might also look at putting MIcrosoft's VC-1 codec into a wmv wrapper, which would give universal playback to any WMP player.
    I noticed on your other thread that you said that you didn't want your clients to have any special software to play the video files -- but all audience members (regardless of embedding) need to have the player of the particular format on their machines -- eg. WMP for wmv, avi etc. Quicktime or VLC or MPC for MPEG-4 AVC and Flash for Flash media.

    Author Closing Comment

    That was the most complete, encompassing answer I could have asked for.  Thank you very much.  Originally we were using MP4 then found it was obsolete, a colleague suggested using MP2.  I had looked for an up to date version of MP4 which you are saying is part 10, but couldn't find anything easily.  Again, thank you.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
    Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now