-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
115 changed files
with
26,319 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 9.00 | ||
# Visual Studio 2005 | ||
Project("{590793A3-CB58-4FF4-9404-8B14D93E11D5}") = "MFCopy", "MFCopy.vcproj", "{D1C50AD2-CF9B-4B89-8C33-2946BF65B0A5}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Win32 = Debug|Win32 | ||
Release|Win32 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D1C50AD2-CF9B-4B89-8C33-2946BF65B0A5}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
{D1C50AD2-CF9B-4B89-8C33-2946BF65B0A5}.Debug|Win32.Build.0 = Debug|Win32 | ||
{D1C50AD2-CF9B-4B89-8C33-2946BF65B0A5}.Release|Win32.ActiveCfg = Release|Win32 | ||
{D1C50AD2-CF9B-4B89-8C33-2946BF65B0A5}.Release|Win32.Build.0 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
<?xml version="1.0" encoding="Windows-1252"?> | ||
<VisualStudioProject | ||
ProjectType="Visual C++" | ||
Version="8.00" | ||
Name="MFCopy" | ||
ProjectGUID="{D1C50AD2-CF9B-4B89-8C33-2946BF65B0A5}" | ||
RootNamespace="MFSimpleEncode" | ||
Keyword="Win32Proj" | ||
> | ||
<Platforms> | ||
<Platform | ||
Name="Win32" | ||
/> | ||
</Platforms> | ||
<ToolFiles> | ||
</ToolFiles> | ||
<Configurations> | ||
<Configuration | ||
Name="Debug|Win32" | ||
OutputDirectory="$(SolutionDir)$(ConfigurationName)" | ||
IntermediateDirectory="$(ConfigurationName)" | ||
ConfigurationType="1" | ||
CharacterSet="1" | ||
> | ||
<Tool | ||
Name="VCPreBuildEventTool" | ||
/> | ||
<Tool | ||
Name="VCCustomBuildTool" | ||
/> | ||
<Tool | ||
Name="VCXMLDataGeneratorTool" | ||
/> | ||
<Tool | ||
Name="VCWebServiceProxyGeneratorTool" | ||
/> | ||
<Tool | ||
Name="VCMIDLTool" | ||
/> | ||
<Tool | ||
Name="VCCLCompilerTool" | ||
AdditionalOptions="/hotpatch" | ||
Optimization="0" | ||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | ||
MinimalRebuild="true" | ||
BasicRuntimeChecks="3" | ||
RuntimeLibrary="3" | ||
UsePrecompiledHeader="0" | ||
WarningLevel="4" | ||
WarnAsError="true" | ||
Detect64BitPortabilityProblems="false" | ||
DebugInformationFormat="3" | ||
/> | ||
<Tool | ||
Name="VCManagedResourceCompilerTool" | ||
/> | ||
<Tool | ||
Name="VCResourceCompilerTool" | ||
/> | ||
<Tool | ||
Name="VCPreLinkEventTool" | ||
/> | ||
<Tool | ||
Name="VCLinkerTool" | ||
AdditionalOptions="/NXCOMPAT /FUNCTIONPADMIN /DYNAMICBASE /DEBUG /debugtype:cv,fixup " | ||
AdditionalDependencies="mfplat.lib mfuuid.lib mf.lib" | ||
LinkIncremental="1" | ||
GenerateDebugInformation="true" | ||
SubSystem="1" | ||
TargetMachine="1" | ||
/> | ||
<Tool | ||
Name="VCALinkTool" | ||
/> | ||
<Tool | ||
Name="VCManifestTool" | ||
/> | ||
<Tool | ||
Name="VCXDCMakeTool" | ||
/> | ||
<Tool | ||
Name="VCBscMakeTool" | ||
/> | ||
<Tool | ||
Name="VCFxCopTool" | ||
/> | ||
<Tool | ||
Name="VCAppVerifierTool" | ||
/> | ||
<Tool | ||
Name="VCWebDeploymentTool" | ||
/> | ||
<Tool | ||
Name="VCPostBuildEventTool" | ||
/> | ||
</Configuration> | ||
<Configuration | ||
Name="Release|Win32" | ||
OutputDirectory="$(SolutionDir)$(ConfigurationName)" | ||
IntermediateDirectory="$(ConfigurationName)" | ||
ConfigurationType="1" | ||
CharacterSet="1" | ||
WholeProgramOptimization="1" | ||
> | ||
<Tool | ||
Name="VCPreBuildEventTool" | ||
/> | ||
<Tool | ||
Name="VCCustomBuildTool" | ||
/> | ||
<Tool | ||
Name="VCXMLDataGeneratorTool" | ||
/> | ||
<Tool | ||
Name="VCWebServiceProxyGeneratorTool" | ||
/> | ||
<Tool | ||
Name="VCMIDLTool" | ||
/> | ||
<Tool | ||
Name="VCCLCompilerTool" | ||
AdditionalOptions="/hotpatch" | ||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | ||
RuntimeLibrary="2" | ||
UsePrecompiledHeader="0" | ||
WarningLevel="4" | ||
WarnAsError="true" | ||
Detect64BitPortabilityProblems="false" | ||
DebugInformationFormat="3" | ||
/> | ||
<Tool | ||
Name="VCManagedResourceCompilerTool" | ||
/> | ||
<Tool | ||
Name="VCResourceCompilerTool" | ||
/> | ||
<Tool | ||
Name="VCPreLinkEventTool" | ||
/> | ||
<Tool | ||
Name="VCLinkerTool" | ||
AdditionalOptions="/NXCOMPAT /FUNCTIONPADMIN /DYNAMICBASE /SAFESEH" | ||
AdditionalDependencies="mfplat.lib mfuuid.lib mf.lib" | ||
LinkIncremental="1" | ||
GenerateDebugInformation="true" | ||
SubSystem="1" | ||
OptimizeReferences="2" | ||
EnableCOMDATFolding="2" | ||
TargetMachine="1" | ||
/> | ||
<Tool | ||
Name="VCALinkTool" | ||
/> | ||
<Tool | ||
Name="VCManifestTool" | ||
/> | ||
<Tool | ||
Name="VCXDCMakeTool" | ||
/> | ||
<Tool | ||
Name="VCBscMakeTool" | ||
/> | ||
<Tool | ||
Name="VCFxCopTool" | ||
/> | ||
<Tool | ||
Name="VCAppVerifierTool" | ||
/> | ||
<Tool | ||
Name="VCWebDeploymentTool" | ||
/> | ||
<Tool | ||
Name="VCPostBuildEventTool" | ||
/> | ||
</Configuration> | ||
</Configurations> | ||
<References> | ||
</References> | ||
<Files> | ||
<Filter | ||
Name="Source Files" | ||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" | ||
UniqueIdentifier="{50C134EC-2307-4F0F-90D2-FF6661146262}" | ||
> | ||
<File | ||
RelativePath=".\main.cpp" | ||
> | ||
</File> | ||
<File | ||
RelativePath=".\MFCopy.cpp" | ||
> | ||
</File> | ||
</Filter> | ||
<Filter | ||
Name="Header Files" | ||
Filter="h;hpp;hxx;hm;inl;inc;xsd" | ||
UniqueIdentifier="{8DC0DCC5-EF05-4AF8-AD30-B8DB7FE9AD0F}" | ||
> | ||
<File | ||
RelativePath=".\MFCopy.h" | ||
> | ||
</File> | ||
<File | ||
RelativePath=".\stdafx.h" | ||
> | ||
</File> | ||
</Filter> | ||
</Files> | ||
<Globals> | ||
</Globals> | ||
</VisualStudioProject> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
////////////////////////////////////////////////////////////////////////// | ||
// | ||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF | ||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO | ||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A | ||
// PARTICULAR PURPOSE. | ||
// | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// | ||
////////////////////////////////////////////////////////////////////////// | ||
|
||
This sample copies multimedia content by remuxing and/or | ||
transcoding the individual streams to a destination file. | ||
|
||
The sample uses the Media Foundation source reader to read samples | ||
from the source file and optionally decode compressed samples. The | ||
sample then uses the Media Foundation sink writer to optionally | ||
encode the uncompressed sample data and write the multimedia data | ||
out to the destination file. | ||
|
||
Usage: | ||
------ | ||
|
||
Command line options: | ||
|
||
-? | ||
|
||
display usage information | ||
|
||
-a audio_format | ||
|
||
set the audio format (defaults to the native format) | ||
eg. AAC, WMAudioV8, WMAudioV9, WMAudio_Lossless | ||
|
||
-nc num_channels | ||
|
||
set the number of audio channels | ||
eg. 2 | ||
|
||
-sr sample_rate | ||
|
||
resample the audio to the specified rate | ||
eg. 44100, 48000 | ||
|
||
-v video_format | ||
|
||
set the video format (defaults to the native format) | ||
eg. H264, WMV2, WMV3, WVC1 | ||
|
||
-fs WxH | ||
|
||
resize the video to the specified width and height | ||
eg. 640x480 | ||
|
||
-fr N:D | ||
|
||
convert the video framerate to the rate specified | ||
in terms of the numerator and denominator | ||
eg. 30:1 | ||
|
||
-im mode | ||
|
||
set the video interlace mode (one of the MFVideoInterlace settings) | ||
eg. Progressive | ||
|
||
-br bitrate | ||
|
||
set the average bitrate for the video stream | ||
|
||
-q | ||
|
||
quiet mode | ||
|
||
-s ms | ||
|
||
specify a start position in milliseconds | ||
|
||
-d ms | ||
|
||
specify a duration in milliseconds | ||
|
||
-hw | ||
|
||
enable hardware transforms | ||
|
||
-xa | ||
|
||
exclude audio streams | ||
|
||
-xv | ||
|
||
exclude video streams | ||
|
||
-xo | ||
|
||
exclude non audio/video streams | ||
|
||
-xm | ||
|
||
exclude metadata | ||
|
||
|
||
|
||
Examples: | ||
--------- | ||
|
||
Remux 20 seconds of a WMV file: | ||
|
||
mfcopy.exe -d 20000 input.wmv output.wmv | ||
|
||
|
||
Resize the video of a WMV file while preserving the original audio stream: | ||
|
||
mfcopy.exe -fs 320x240 input.wmv output.wmv | ||
|
||
|
||
Transcode WMV to MP4 ensuring progressive video: | ||
|
||
mfcopy.exe -a AAC -v H264 -im Progressive input.wmv output.mp4 | ||
|
||
|
||
|
||
Known limitations/assumptions of this sample: | ||
--------------------------------------------- | ||
|
||
* The sample does not support encoding VBR content | ||
(except WMA Lossless which is VBR at 100% quality) | ||
|
||
* Attempting to specify a start position when any of the audio or | ||
video streams are getting remuxed may result in the undesired | ||
behavior where the start position is set back to the location | ||
of the previous video key frame. |
Oops, something went wrong.