INSTALL.dshow.txt 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. This file describes how to compile the MEX plugins for videoIO on a 32-bit
  2. Windows platform. Specifically, videoReader_DirectShow.mexw32 and
  3. videoWriter_DirectShow.mexw32 will be created. See README.txt for a more
  4. general description of this library and tips on using it.
  5. Users of 32-bit Windows XP or Windows Vista may try skipping to the
  6. "Matlab Path" section of this document since precompiled binary mex files are
  7. provided with this distribution. If there are any errors in running the test
  8. script or if you are using 64-bit Matlab, read this whole document.
  9. Prerequisites:
  10. --------------
  11. This procedure has only been tested with the following software:
  12. * Windows XP Pro 32-bit
  13. It should work with Win2k+, maybe even Win95. To try it out, you'll need
  14. to modify WINVER in a few source files. It should also work fine on
  15. 32-bit Windows Vista. 64-bit XP Pro and 64-bit Vista running 32-bit
  16. Matlab should have no problems. Running 64-bit Matlab is likely to work,
  17. but as of July 2007, there are very few 64-bit codecs available. If you
  18. get it to work on one of these platforms, please let us know. You will
  19. probably need administrative privileges to install the 3rd party
  20. libraries.
  21. * Matlab R2006a
  22. It should work on 6.5 or later, but we have only tested it on R2006a.
  23. * Microsoft Visual Studio 2005
  24. It should work with older versions, perhaps ones as old as Visual
  25. Studio 6. Let us know if you get it to work with an older version.
  26. * Microsoft Windows Server 2003 SP1 Platform SDK (R2)
  27. * Microsoft DirectX SDK (April 2006)
  28. Only the DirectShow option is necessary for the Platform SDK. Download
  29. these from http://msdn.microsoft.com (try searching for "Platform SDK"
  30. and "DirectX SDK" at their site if you get stuck--they keep moving these
  31. downloads around so we do not include a more specific link here). If you
  32. use other versions of the DirectX SDK, it will probably work. Older
  33. versions of the Platform SDK require fixing some compiler
  34. incompatibilities in Microsoft's source code (they're straightforward).
  35. If you need to use an older version, use the instructions below and
  36. adjust the INCLUDE and LIB environment variables whenever the compilation
  37. fails.
  38. * Windows Media 9 codec
  39. Use Windows Update (http://update.microsoft.com) to obtain the most
  40. recent version of Windows Media Player. This codec is needed for some
  41. tests.
  42. * An MPEG4 codec such as DivX, XviD, 3ivx
  43. * An H264-compatible codec such as x264
  44. These codecs are not strictly necessary, but some tests will softly fail
  45. if they are not installed. Here are some places to go for fully legal
  46. and free codecs (as of June 2007):
  47. http://www.3ivx.com/
  48. http://www.xvid.org/
  49. http://sourceforge.net/projects/ffdshow-tryout/
  50. http://developers.videolan.org/x264.html
  51. * Knowledge
  52. We assume you have at least a passing familiarity with compiling
  53. C/C++ programs and that you know what environment variables are (or
  54. can follow directions exactly).
  55. Installation Instructions:
  56. --------------------------
  57. 1) Add the following paths to your INCLUDE environment variable
  58. (Start -> right click on "My Computer" -> "Properties" menu item ->
  59. "Advanced" tab -> "Environment Variables" button; edit the INCLUDE
  60. variable and add each item to the end, separating each item with a
  61. semicolon, if it is not already there).
  62. C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
  63. C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses
  64. %DXSDK_DIR%\Include
  65. If the DXSDK_DIR variable does not exist, then you'll need to create it.
  66. The file ddraw.h should be found in %DXSDK_DIR%\Include.
  67. 2) Add the following to the LIB environment variable
  68. C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
  69. C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses\WIN2000_RETAIL
  70. 3) Add the following to the PATH environment variable
  71. C:\Program Files\Microsoft Visual Studio 8\VC\bin
  72. 4) Accept the environment variable modifications (click "OK" on the dialog
  73. box so that only the "System Properties" dialog is still up, or no
  74. dialogs).
  75. 5) Run the following commands from the command prompt (Start -> Run...
  76. -> type in "cmd.exe" without quotes):
  77. cd "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses"
  78. "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
  79. nmake NODEBUG=1 _CRT_SECURE_NO_DEPRECATE=1
  80. 6) Start a *new* Matlab session. You must relaunch Matlab so that it can see
  81. the new values of the environment variables you have created and/or
  82. modified. Any time you modify environment variables used by Matlab (or
  83. programs it calls), you must completely exit Matlab and restart it.
  84. 7) In Matlab, run the following if you have not already done so:
  85. mex -setup
  86. then edit the file
  87. C:\Documents and Settings\[your username]\Application Data\MathWorks\MATLAB\R2006a\mexopts.bat
  88. replacing [your username] with... your username. On the COMPFLAGS line,
  89. add the following:
  90. -D_CRT_SECURE_NO_DEPRECATE
  91. 8) In Matlab, run
  92. buildVideoIO
  93. Matlab Path
  94. -----------
  95. In Matlab add the base installation directory (but not all subdirectories) to
  96. the path. In the GUI this can be done by
  97. File -> Set Path... -> Add Folder...
  98. From the Matlab command line this can be done using the "addpath" and
  99. "savepath" functions.
  100. Testing
  101. -------
  102. In Matlab, go to the tests/ subdirectory and run
  103. testAll
  104. Usage:
  105. ------
  106. See README.txt for a simple usage example. Type
  107. help buildVideoIO
  108. help videoReader
  109. help videoWriter
  110. help videoread
  111. at the Matlab prompt for user-level documentation.