📄 install.dshow.html
字号:
2008):
<ul>
<li class="tight"><a href="http://ffdshow-tryout.sourceforge.net/">ffdshow-tryouts</a> (Free one-stop shopping meta codec)</li>
<li class="tight"><a href="http://www.xvid.org/">XviD</a> (Free MPEG4, H.264)</li>
<li class="tight"><a href="http://www.videolan.org/developers/x264.html">x264</a> (Free H.264)</li>
<li class="tight"><a href="http://www.divx.com/">DivX</a> (commercial MPEG4)</li>
<li class="tight"><a href="http://www.3ivx.com/">3ivx</a> (commercial MPEG4)</li>
</ul>
<p>Note that ffdshow-tryout actually supplies a very large set of codecs
(including Windows Media 9, MPEG4, H264, and others)
with intelligent encoding defaults. This is especially useful on
64-bit platforms since there are few other 64-bit codecs available
(as of February 2008).
</td>
</tr>
</table>
</form>
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<a name="env"></a>
<h2>Environment Variables</h2>
<div class="quick">Quick: carefully follow all of these instructions.</div>
<p>If you do not know what environment variables are or how to permanently
change them in Windows, see <a href="FAQ.txt">FAQ.txt</a>.
<div cond="os=='all'" id="vis">
<p>In the instructions below,
<ul>
<li class="tight">For 32-bit Windows (XP, Server 2003, or Vista):
<ul><li class="tight">omit "<tt> (x86)</tt>" from any paths below</li></ul>
</li>
<li class="tight">For Windows XP and Windows Server 2003:
<ul><li class="tight">skip any individual paths below that mention "Microsoft SDKs"</li></ul>
</li>
<li class="tight">For Windows Vista:
<ul><li class="tight">skip any individual paths below that mention "Microsoft Platform SDK"</li></ul>
</li>
</ul>
<p>Alternatively, return to the <a href="#prereq">prerequisites</a> section
of this document and select the configuration options you'll be using. If
you use an HTML4-compatible browser with JavaScript enabled, this document
will self-customize to your configuration.
</div>
<p>In these instructions, some directories will need to be added to various
environment variables. Many of these folders will not exist until later in the
instructions; however, we will modify all of the environment variables now.
This makes the installation process faster and less complex.
<h4>INCLUDE</h4>
<p>Create the "<tt>INCLUDE</tt>" system environment variable (if it does not
already exist) and add the following paths to it.
<blockquote>
<div cond="mightBeXp()" id="vis"><tt><nobr>C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses</nobr></tt></div>
<div cond="mightBeXp()" id="vis"><tt><nobr>C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include</nobr></tt></div>
<div cond="mightBeVista()" id="vis"><tt><nobr>C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses</nobr></tt></div>
<div cond="mightBeVista()" id="vis"><tt><nobr>C:\Program Files\Microsoft SDKs\Windows\v6.0\Include</nobr></tt></div>
<div><tt><nobr>%DXSDK_DIR%\Include</nobr></tt></div>
</blockquote>
<p>When using path-like environment variables on Windows, place a semicolon
between each string. For example, if the current <tt>INCLUDE</tt> variable
is "<tt>C:\foo</tt>" and you wish to add "<tt>C:\bar\baz</tt>", the new
<tt>INCLUDE</tt> variable will be "<tt>C:\foo;C:\bar\baz</tt>" (without quotes).
It is important to have no extra spaces before or after the semicolons.
We have placed each path on a separate line in this document for readability
purposes.
<div cond="mightBeXp()" id="vis">
Note: On Windows XP, install the Platform SDK, even though the name might
seem to suggest it requires Server 2003. The listed Platform SDK is the
correct one for Windows 2000, Windows Server 2003, Windows XP 64-bit, Windows
XP Pro, and Windows XP SP1.</div>
<p>Note: <tt>DXSDK_DIR</tt> is an environment variable which will be created
when the DirectX SDK is installed.
<p>It's important that the include directories be in the order given above (i.e.
the <tt>BaseClasses</tt> directory must appear before the base SDK's
<tt>Include</tt>, and that before the DirectX's <tt>Include</tt>). Microsoft
likes to create stub headers (<tt>.h</tt> files) with the same names as the
real ones and if the stubs are found first, they break the compilation.
<div cond="mightBeMat32()" id="vis">
<h4>LIB32</h4>
<p>Add the following strings to the "<tt>LIB32</tt>" system environment
variable<span cond="mightBeMat64()" id="vis"> (you may skip this if you are
using 64-bit Matlab only)</span>:
<blockquote>
<div cond="mightBeXp()" id="vis"><tt><nobr>C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses\WIN2000_RETAIL</nobr></tt></div>
<div cond="mightBeXp()" id="vis"><tt><nobr>C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib</nobr></tt></div>
<div cond="mightBeVista()" id="vis"><tt><nobr>C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses\Release</nobr></tt></div>
<div cond="mightBeVista()" id="vis"><tt><nobr>C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib\x86</nobr></tt></div>
<div cond="mightBeVista()" id="vis"><tt><nobr>C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib</nobr></tt></div>
</blockquote>
<p>Order is important here too.</p>
</div>
<div cond="mightBeMat64()" id="vis">
<h4>LIB64</h4>
<p>Add the following strings to the "<tt>LIB64</tt>" system environment
variable<span cond="mightBeMat32()" id="vis"> (you may skip this if you are using 32-bit Windows)</span>:
<blockquote>
<div cond="mightBeXp()" id="vis"><tt><nobr>C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses\WIN2000_RETAIL</nobr></tt></div>
<div cond="mightBeXp()" id="vis"><tt><nobr>C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib</nobr></tt></div>
<div cond="mightBeVista()" id="vis"><tt><nobr>C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses\x64\Release</nobr></tt></div>
<div cond="mightBeVista()" id="vis"><tt><nobr>C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib\x64</nobr></tt></div>
<div cond="mightBeVista()" id="vis"><tt><nobr>C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib</nobr></tt></div>
</blockquote>
<p>Order is important here too.
</div>
<p>Add <span cond="vs=='all'" id="vis">the appropriate <em>one</em> of</span> the
following string<span cond="vs=='all'" id="vis">s</span> to the "<tt>PATH</tt>" system environment
variable<span cond="os=='all'" id="vis"> (remember to omit "<tt> (x86)</tt>" if you are using 32-bit Windows)</span>.
<blockquote>
<div cond="mightBeVs2003()" id="vis"><tt><nobr>C:\Program Files<span cond="mightBeWin64()" id="vis"> (x86)</span>\Microsoft Visual Studio 7\VC\bin</nobr></tt></div>
<div cond="mightBeVs2005()" id="vis"><tt><nobr>C:\Program Files<span cond="mightBeWin64()" id="vis"> (x86)</span>\Microsoft Visual Studio 8\VC\bin</nobr></tt></div>
<div cond="mightBeVs2008()" id="vis"><tt><nobr>C:\Program Files<span cond="mightBeWin64()" id="vis"> (x86)</span>\Microsoft Visual Studio 9\VC\bin</nobr></tt></div>
</blockquote>
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<div cond="mightBeVista()" id="vis">
<h2>Operating System Updates</h2>
<div class="quick">Quick: Windows Vista users must manually install an OS patch.</div>
Windows Vista unfortunately shipped with a buggy version of a critical function
used to create new AVI files. If you are using Vista and wish to create videos,
you must manually download and install Microsoft's
<a href="http://support.microsoft.com/?kbid=939130">KB939130</a> patch.
<p>As of Oct. 2007, this patch must be manually downloaded and installed. It is
not pushed through Windows Update. When service pack 1 is released, this (or
an equivalent patch) is expected to be included.
<div cond="mightBeXp()" id="vis">
<p>As far as the authors know, all versions of XP work with this software,
though we naturally recommend that users regularly update their system using
<a href="http://update.microsoft.com">Windows Update</a> to avoid security
risks.
</div>
</div>
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<a name="vs"/>
<h2>Visual Studio</h2>
<div class="quick">Quick: Carefully follow all these instructions, even
if you have already installed Visual Studio.</div>
If you want to rebuild the mex binaries, you need a compiler. The Windows-specific
portions of this library were written primarily using Visual Studio 2005. Since
we do not make extensive use of templates and other advanced C++ features in this
library, it should work on older versions of Visual Studio, perhaps as far back
as version 6. We have not attempted to use Visual Studio Express.
<p>First, install Visual Studio:
<ol>
<li>Purchase Visual Studio</li>
<li>Use user an account with administrative privileges</li>
<li>Start the installer;
<span cond="mightBeMat64()" id="vis">
if you want to compile 64-bit versions,
</span>
when choosing the custom installation options, check
<blockquote>
Microsoft Visual Studio 2005 Professional →
Language Tools →
Visual C++ →
X64 Compilers and Tools
</blockquote>
You may uncheck all .NET and all non C++ options if you want to save
space and installation time.
<span cond="mightBeVista()" id="vis">If you get an Vista incompatibility
warning, ignore it and tell Vista to run the program anyway.</span>
</li>
</ol>
<span cond="mightBeVs2005()" id="vis">
If using Visual Studio 2005, download and install Visual Studio 2005 Service
Pack 1 if you have not already done so via
<a href="http://update.microsoft.com">Windows Update</a> or
via <a href="http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx">direct download</a>.
Installation may take <em>many hours</em>. Even though you may be tempted to
skip the service pack installation, install it anyway, especially if you're
using a single-core, single-processor machine. Without the service pack,
Visual Studio has a tendancy to hang for literally <em>minutes</em> at a time.
</span>
<p>Now, we get to configure Visual Studio so it can find the SDKs we'll
be installing. As was the case with the <a href="#env">environment variables</a>,
it's easier to do it all at the same time, so we'll do it now.
In Visual Studio, go to
<blockquote>
Tools → Options... → Projects and Solutions → VC++ Directories
</blockquote>
then
<ol>
<span cond="mightBeMat32()" id="vis">
<li>Select "Win32" in the Platform pulldown
<ol type="a">
<li>In "Include files", add the following, without quotes: "<tt>$(INCLUDE)</tt>"</li>
<li>In "Library files", add the following, without quotes: "<tt>$(LIB32)</tt>"</li>
</ol>
</li>
</span>
<span cond="mightBeMat64()" id="vis">
<li>Select "x64" in the Platform pulldown
<span cond="mightBeMat32()" id="vis">
(you may skip this step if you are using 32-bit Windows or are only using 32-bit Matlab)
</span>
<ol type="a">
<li>In "Include files", add the following, without quotes: "<tt>$(INCLUDE)</tt>"</li>
<li>In "Library files", add the following, without quotes: "<tt>$(LIB64)</tt>"</li>
</ol>
</li>
</span>
</ol>
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<a name="windowssdk"/>
<div cond="mightBeVista()" id="vis">
<h2>Windows SDK</h2>
<div cond="mightBeXp()" id="vis" class="quick">Quick: If you are using Windows XP or Windows Server 2003, skip this step.</div>
<div class="expl">
"The Windows SDK includes documentation, samples, and tools designed to help
you develop Windows applications and libraries using both Win32(R) and .NET
Framework ... technologies targeting Windows Vista," (<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en">Microsoft</a>).
</div>
<ol>
<li>
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en">Download</a>
the SDK. As of Aug. 2007, version 6.0 was the current version. Future
versions may require changing these instructions.
</li>
<li>
Do a custom installation and check any options that have "x86" or "x64" in
them, unless you know you will not want to compile the library in
32-bit or 64-bit mode, respectively. You can uncheck any .NET options if
you don't intend to use .NET (this library doesn't).
</li>
<li>Launch Visual Studio and load
<blockquote>
<pre>C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses\baseclasses.sln</pre>
</blockquote>
Then using the menus,
<ol type="a">
<span cond="mightBeMat64()" id="vis">
<li>Build → Configuration Manager... →
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -