DirectShow 生产音频 视频如何压缩
本帖最后由 hzy694358 于 2013-03-28 10:25:06 编辑 DirectShow生产的avi音频文件很大,一分钟将近10M
但是找了下好像也没看到有现成的压缩filter
只有视频有看到IAMVideoCompression
网上资料说的视频压缩VCM 音频ACM有是指的什么 都要自己实现filter?
还有,为何我生产avi文件可以生产asf就不可以呢?
hr = m_pCaptureGB->SetOutputFileName(&MEDIASUBTYPE_Avi, L"C:\\shrhr.wav", &pWriter, NULL);
/* 对pWriter(AviWriter)进行设置 */
IConfigAviMux *pConfig = 0;
hr = pWriter->QueryInterface(IID_IConfigAviMux, (void**)&pConfig);
if(SUCCEEDED(hr))
{
pConfig->Release();
}
hr = m_pCaptureGB->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Audio, mAudioFilter->mFilter, NULL, pWriter);
hr = m_pCaptureGB->SetOutputFileName(&MEDIASUBTYPE_Asf, L"C:\\shrhr.asf", &pWriter, NULL);
/* 对pWriter(AsfWriter)进行设置 */
IConfigAsfWriter *pConfig = 0;
hr = pWriter->QueryInterface(IID_IConfigAsfWriter, (void**)&pConfig);
if(SUCCEEDED(hr))
{
pConfig->Release();
}
hr = m_pCaptureGB->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Audio, mAudioFilter->mFilter, NULL, pWriter);