-
Notifications
You must be signed in to change notification settings - Fork 11
/
README.txt
215 lines (124 loc) · 7.74 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
MFNode Project
//----------------------------------------------------------------------------------------------------------------------
-> For this project, you need :
- Microsoft Windows Vista or later
- Visual Studio 2017 community
- Microsoft Kinect SDK (optionnal)
- Nvidia Cuda SDK (optionnal)
//----------------------------------------------------------------------------------------------------------------------
-> Project diretory
- Common : some files used by differents projects.
- LibA52Audio : a decoder for ac3 audio format.
- LibMpeg2 : http://sourceforge.net/projects/libmpeg2/ (version libmpeg2-0.5.1). It's the original
project, no modification have been made.
- LibMpegAudio : a decoder for mp1/mp2 audio format.
- MFNodePlayer : a player to handle wave mixer, JpegHttpStreamer, ScreenCapture, Flv file and video renderer.
- MFSkDxva2Renderer : a video sink renderer Dxva2 (handle nv12 format from cuda decoder).
- MFSkImageWriter: a MediaFoundation sink to save image as bmp file.
- MFSkJpegHttpStreamer : a MediaFoundation sink to stream http jpeg.
- MFSkVideoRenderer : a video sink renderer with shader and DirectX9 (handle yuv format from mpeg2 decoder).
- MFSrA52Decoder : a MediaFoundation source for ac3 format (alpha version).
- MFSrFlvSplitter : a MediaFoundation source for flv format (h264, vp6, aac, mp3).
- MFSrKinectCapture : a MediaFoundation source for Kinect.
- MFSrMpeg12Decoder : a MediaFoundation source to decode mp1/mp2 audio format.
- MFSrMpeg2Splitter : a basic MediaFoundation source to split mpeg1/2 video format.
- MFSrScreenCapture : a MediaFoundation source for screenshot.
- MFTA52Decoder : a MediaFoundation transform to decode ac3 audio (alpha version).
- MFTCudaDecoder : a MediaFoundation transform to decode mpeg1/2 video format using cuda (progressive frame only).
- MFTDxva2Decoder : a MediaFoundation transform to decode mpeg1/2 video format using dxva2.
- MFTJpegEncoder : a MediaFoundation transform to encode rgb data to jpeg data.
- MFTMpeg12Decoder : a MediaFoundation transform to decode mp1/mp2 audio format.
- MFTMpeg2Decoder : a MediaFoundation transform to decode mpeg1/mpeg2 video.
- MFTVp6Decoder : a MediaFoundation transform to decode VP 6.2 video.
- MFTWaveMixer : a MediaFoundation transform to mix two audio file (need same format for both).
it can't be use with topoedit, because of a bug in topoedit. You can use MFNodePlayer.
- Mp3Decoding : a console program to decode mp3 to wave.
//----------------------------------------------------------------------------------------------------------------------
-> general purpose
With Visual Studio i use those parameters (Tools->Options->Editor Text->C/C++) :
- Tab size = 4
- Withdrawals size = 4
- All project are only use in debug mode. I don't use release mode, because for now, MFNode Project is in Beta version.
//----------------------------------------------------------------------------------------------------------------------
-> Compilation for MFTMpeg2Decoder
- First you need to compile Mpeg2Lib. It's create a static library use by MFTMpeg2Decoder.
- Second you compile MFTMpeg2Decoder. It's create MFTMpeg2Decoder.dll. You need to register it with Regsrv32.
//----------------------------------------------------------------------------------------------------------------------
-> Compilation for MFSrMpeg12Decoder
- First you need to compile LibMpegAudio.lib It's create a static library use by MFSrMpeg12Decoder.
- Second you compile MFSrMpeg12Decoder. It's create MFSrMpeg12Decoder.dll. You need to register it with Regsrv32.
//----------------------------------------------------------------------------------------------------------------------
-> Compilation for MFSrKinectCapture
- you need Kinect SDK V1.7. if you have a different version, change the Directory in the project.
- Compile MFSrKinectCapture. It's create MFSrKinectCapture.dll. You need to register it with Regsrv32.
//----------------------------------------------------------------------------------------------------------------------
-> Compilation for MFSkJpegHttpStreamer, MFSrScreenCapture, MFTWaveMixer, MFTJpegEncoder and MFTMpeg12Decoder
- Just compile and register with Regsrv32.
//----------------------------------------------------------------------------------------------------------------------
-> Compilation for MFNodePlayer
- Compile MFTWaveMixer and register with Regsrv32.
- Compile MFNodePlayer.
//----------------------------------------------------------------------------------------------------------------------
-> Use : Mpeg2 Transform
To use the decoder, you need a Source Node that demux video frame. You can use the MediaFoundation sample mpeg1source :
(C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\mediafoundation\mpeg1source\). This Source Node
only demux Mpeg1 video frame, not mpeg2 video frame (a mpeg2source is currently under developpement). Register the
mpeg1source.dll with Regsvr32.
Now you can also use MFSrMpeg2Splitter.
For testing you need :
- a video mpeg1 format.
- both MFTMpeg2Decoder.dll, mpeg1source.dll (Regsvr32)
- TopoEdit : (C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\topoedit.exe).
- Launch TopoEdit.
- Topology->Add Source (choose the mpeg1 video).
- Topology->Add Transform (Video Decoder -> MFNode Mpeg2 Decoder -> Add)
- Topology->Add EVR.
- Manually join the Node between them in this order : source->decoder->evr
- Topology->Resolve Topology.
- Button Play.
//----------------------------------------------------------------------------------------------------------------------
-> Use : Kinect source
- compile MFPlayer2 sample :
(C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\mediafoundation\MFPlayer2\).
- Launch MFPlayer.exe.
- File->Open URL.
- tape : "kinect:"
(for audio, a good idea is to use headphone, because the sound will repeat indefinitely).
//----------------------------------------------------------------------------------------------------------------------
-> Use : MFSrScreenCapture
- Use MFNodePlayer or :
- compile MFPlayer2 sample :
(C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\mediafoundation\MFPlayer2\).
- Launch MFPlayer.exe.
- File->Open URL.
- tape : "screen:"
//----------------------------------------------------------------------------------------------------------------------
-> Use : MFTWaveMixer
- You can to use it with MFNodePlayer.
//----------------------------------------------------------------------------------------------------------------------
-> Use : MFSrMpeg12Decoder
- You can use TopoEdit.
- Audio file extension is .mp1 or .mp2
//----------------------------------------------------------------------------------------------------------------------
-> Use : MFTMpeg12Decoder
- You can use TopoEdit or MFNodePlayer.
//----------------------------------------------------------------------------------------------------------------------
-> Use : MFTJpegEncoder
- You can to use it with MFNodePlayer.
//----------------------------------------------------------------------------------------------------------------------
-> Use : MFSkJpegHttpStreamer
- You can to use it with MFNodePlayer.
- Run HttpStreamer session.
- Use a tool like VLC and open a network stream : http://127.0.0.1:13754.
//----------------------------------------------------------------------------------------------------------------------
-> Todo : explanation for :
* MFSrMpeg2Splitter
* MFSkImageWriter
* MFTCudaDecoder
* MFTDxva2Decoder
* MFSrFlvSplitter
* MFTVp6Decoder
* MFSrA52Decoder
* MFTA52Decoder
* MFSkVideoRenderer
* MFSkDxva2Renderer