Menu

Adding codecs

Help
Darrel
2012-05-01
2013-02-21
  • Darrel

    Darrel - 2012-05-01

    To add a codec do I need to rebuild from source or is there a simpler way? I downloaded the r720 windows bin but it doesn't seem to have codecs for h264 in a mts container ready installed and won't open my video camera movies complaining that the required codec is not installed.

     
  • Gerald Dalley

    Gerald Dalley - 2012-05-01

    The toolkit doesn't ship with any codecs.  They need to be installed separately.  Instructions are available at: INSTALL.dshow.html (skip to the "Codecs and Other DirectShow Components" section).

     
  • Darrel

    Darrel - 2012-05-02

    I am still missing something here. If the toolkit ships without codecs how does videoReader detect the codecs installed on the computer? Do I need to add a directory path, an environmental variable, a system registry item, or something else?

    Before I installed the videoIO I downloaded and installed the K-lite codec pack which includes some h264 codecs and the Haali filters. This then enabled windows media player to play my HD videos and make thumbnails. I then installed the videoIO windows bin and added it's path to the Matlab path and I also added the K-lite directories to the path, but codecs=videoWriter(,'codecs') does not show the required codecs and vr=videoReader('myvideo.mts') still chokes. What am I missing?

    Thanks for your help on this. Much appreciated!

     
  • Gerald Dalley

    Gerald Dalley - 2012-05-02

    Microsoft has created an API called DirectShow that allows applications (like Matlab, via videoIO) to use whatever codecs and filters have been installed on the system.  One of the ways the API publishes the set of filters and codecs is indeed via the registry.

    Note that there are 32-bit and 64-bit codecs.  32-bit applications can only use 32-bit codecs and filters.  Likewise 64-bit applications can only use 64-bit codecs and filters.  If you're running 64-bit Matlab, you'll need to download and install the 64-bit version of the Haali filters and a 64-bit H.264 codec.  Some choices include x264 and ffmpeg-tryouts, as detailed in INSTALL.dshow.html.  I do not know if there are any appropriate 64-bit codec packs.

     

Log in to post a comment.