CongUan
asked on
Record avi with sound
Hi Experts,
I have record a video file(avi) and audio file(wav) as separate files, now I want to combine these into a avi file that can play with video and audio.
Please help me with this.
Thank in advance!
I have record a video file(avi) and audio file(wav) as separate files, now I want to combine these into a avi file that can play with video and audio.
Please help me with this.
Thank in advance!
ASKER
I had not used DirectShow, Please help me for some link or example code about this.
Thanks agian!
Thanks agian!
Here sample how to join AVI with WAVE (add strmiids.lib to link list):
You can also start Graph Editor & connect to created graph:
File->Connect to Remote Graph...
// TEST_EE_AVIwSound.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include <dshow.h>
#include <comdef.h>
#include <initguid.h>
_COM_SMARTPTR_TYPEDEF(IGra phBuilder, IID_IGraphBuilder);
_COM_SMARTPTR_TYPEDEF(ICap tureGraphB uilder2, IID_ICaptureGraphBuilder2) ;
_COM_SMARTPTR_TYPEDEF(IMed iaControl, IID_IMediaControl);
_COM_SMARTPTR_TYPEDEF(IMed iaEvent, IID_IMediaEvent);
_COM_SMARTPTR_TYPEDEF(IBas eFilter, IID_IBaseFilter);
_COM_SMARTPTR_TYPEDEF(IFil eSinkFilte r2, IID_IFileSinkFilter2);
DEFINE_GUID(CLSID_WAVEPars er,
0xD51BD5A1, 0x7548, 0x11CF, 0xA5, 0x20, 0x00, 0x80, 0xC7, 0x7E, 0xF5, 0x8A);
HRESULT AddToRot(IUnknownPtr pUnkGraph, DWORD *pdwRegister)
{
IMonikerPtr pMoniker;
IRunningObjectTablePtr pROT;
if(FAILED(GetRunningObject Table(0, &pROT))) return E_FAIL;
WCHAR wsz[256];
wsprintfW(wsz, L"FilterGraph %08x pid %08x", (DWORD_PTR)pUnkGraph, GetCurrentProcessId());
HRESULT hRes = CreateItemMoniker(L"!", wsz, &pMoniker);
if(SUCCEEDED(hRes)) {
hRes = pROT->Register(ROTFLAGS_RE GISTRATION KEEPSALIVE , pUnkGraph, pMoniker, pdwRegister);
}
return hRes;
}
void RemoveFromRot(DWORD pdwRegister)
{
IRunningObjectTablePtr pROT;
if(SUCCEEDED(GetRunningObj ectTable(0 , &pROT))) {
pROT->Revoke(pdwRegister);
};
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HRESULT hRes;
hRes = CoInitialize(NULL);
if(SUCCEEDED(hRes)) {
IGraphBuilderPtr pGraph;
hRes = pGraph.CreateInstance(CLSI D_FilterGr aph, NULL, CLSCTX_INPROC_SERVER);
if(SUCCEEDED(hRes)) {
DWORD dwRegister;
ICaptureGraphBuilder2Ptr pICaptureGraphBuilder2;
hRes = AddToRot(pGraph, &dwRegister);
hRes = pICaptureGraphBuilder2.Cre ateInstanc e(CLSID_Ca ptureGraph Builder2, NULL, CLSCTX_INPROC_SERVER);
if(SUCCEEDED(hRes)) {
IMediaControlPtr pControl;
IMediaEventPtr pEvent;
IBaseFilterPtr pAVISource, pWAVESource, pAVISplitter, pWAVEParser, pAVIMux, pFileWriter;
IFileSinkFilter2Ptr pIFileSinkFilter2;
pICaptureGraphBuilder2->Se tFiltergra ph(pGraph) ;
hRes = pGraph.QueryInterface(IID_ IMediaCont rol, &pControl);
hRes = pGraph.QueryInterface(IID_ IMediaEven t, &pEvent);
hRes = pGraph->AddSourceFilter(L" C:\\DXSDK9 \\Samples\ \Media\\hi ghway.avi" , L"AVI File", &pAVISource);
hRes = pGraph->AddSourceFilter(L" C:\\DXSDK9 \\Samples\ \Media\\au diopath3.w av", L"WAVE File", &pWAVESource);
hRes = pAVISplitter.CreateInstanc e(CLSID_Av iSplitter, NULL, CLSCTX_INPROC_SERVER);
hRes = pGraph->AddFilter(pAVISpli tter, L"AVI Splitter");
hRes = pICaptureGraphBuilder2->Re nderStream (NULL, NULL, pAVISource, NULL, pAVISplitter);
hRes = pWAVEParser.CreateInstance (CLSID_WAV EParser, NULL, CLSCTX_INPROC_SERVER);
hRes = pGraph->AddFilter(pWAVEPar ser, L"WAVE Parser");
hRes = pICaptureGraphBuilder2->Re nderStream (NULL, NULL, pWAVESource, NULL, pWAVEParser);
hRes = pAVIMux.CreateInstance(CLS ID_AviDest , NULL, CLSCTX_INPROC_SERVER);
hRes = pGraph->AddFilter(pAVIMux, L"AVI Mux");
hRes = pICaptureGraphBuilder2->Re nderStream (NULL, NULL, pAVISplitter, NULL, pAVIMux);
hRes = pICaptureGraphBuilder2->Re nderStream (NULL, NULL, pWAVEParser, NULL, pAVIMux);
hRes = pFileWriter.CreateInstance (CLSID_Fil eWriter, NULL, CLSCTX_INPROC_SERVER);
hRes = pGraph->AddFilter(pFileWri ter, L"File Writer");
hRes = pFileWriter.QueryInterface (IID_IFile SinkFilter 2, &pIFileSinkFilter2);
hRes = pIFileSinkFilter2->SetFile Name(L"c:\ \result.av i", NULL);
hRes = pICaptureGraphBuilder2->Re nderStream (NULL, NULL, pAVIMux, NULL, pFileWriter);
hRes = MessageBox(NULL, TEXT("Test"), TEXT("Check #1"), MB_OK);
hRes = pControl->Run();
long evCode = 0;
pEvent->WaitForCompletion( INFINITE, &evCode);
};
RemoveFromRot(dwRegister);
};
CoUninitialize();
};
return 0;
}
You can also start Graph Editor & connect to created graph:
File->Connect to Remote Graph...
// TEST_EE_AVIwSound.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include <dshow.h>
#include <comdef.h>
#include <initguid.h>
_COM_SMARTPTR_TYPEDEF(IGra
_COM_SMARTPTR_TYPEDEF(ICap
_COM_SMARTPTR_TYPEDEF(IMed
_COM_SMARTPTR_TYPEDEF(IMed
_COM_SMARTPTR_TYPEDEF(IBas
_COM_SMARTPTR_TYPEDEF(IFil
DEFINE_GUID(CLSID_WAVEPars
0xD51BD5A1, 0x7548, 0x11CF, 0xA5, 0x20, 0x00, 0x80, 0xC7, 0x7E, 0xF5, 0x8A);
HRESULT AddToRot(IUnknownPtr pUnkGraph, DWORD *pdwRegister)
{
IMonikerPtr pMoniker;
IRunningObjectTablePtr pROT;
if(FAILED(GetRunningObject
WCHAR wsz[256];
wsprintfW(wsz, L"FilterGraph %08x pid %08x", (DWORD_PTR)pUnkGraph, GetCurrentProcessId());
HRESULT hRes = CreateItemMoniker(L"!", wsz, &pMoniker);
if(SUCCEEDED(hRes)) {
hRes = pROT->Register(ROTFLAGS_RE
}
return hRes;
}
void RemoveFromRot(DWORD pdwRegister)
{
IRunningObjectTablePtr pROT;
if(SUCCEEDED(GetRunningObj
pROT->Revoke(pdwRegister);
};
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HRESULT hRes;
hRes = CoInitialize(NULL);
if(SUCCEEDED(hRes)) {
IGraphBuilderPtr pGraph;
hRes = pGraph.CreateInstance(CLSI
if(SUCCEEDED(hRes)) {
DWORD dwRegister;
ICaptureGraphBuilder2Ptr pICaptureGraphBuilder2;
hRes = AddToRot(pGraph, &dwRegister);
hRes = pICaptureGraphBuilder2.Cre
if(SUCCEEDED(hRes)) {
IMediaControlPtr pControl;
IMediaEventPtr pEvent;
IBaseFilterPtr pAVISource, pWAVESource, pAVISplitter, pWAVEParser, pAVIMux, pFileWriter;
IFileSinkFilter2Ptr pIFileSinkFilter2;
pICaptureGraphBuilder2->Se
hRes = pGraph.QueryInterface(IID_
hRes = pGraph.QueryInterface(IID_
hRes = pGraph->AddSourceFilter(L"
hRes = pGraph->AddSourceFilter(L"
hRes = pAVISplitter.CreateInstanc
hRes = pGraph->AddFilter(pAVISpli
hRes = pICaptureGraphBuilder2->Re
hRes = pWAVEParser.CreateInstance
hRes = pGraph->AddFilter(pWAVEPar
hRes = pICaptureGraphBuilder2->Re
hRes = pAVIMux.CreateInstance(CLS
hRes = pGraph->AddFilter(pAVIMux,
hRes = pICaptureGraphBuilder2->Re
hRes = pICaptureGraphBuilder2->Re
hRes = pFileWriter.CreateInstance
hRes = pGraph->AddFilter(pFileWri
hRes = pFileWriter.QueryInterface
hRes = pIFileSinkFilter2->SetFile
hRes = pICaptureGraphBuilder2->Re
hRes = MessageBox(NULL, TEXT("Test"), TEXT("Check #1"), MB_OK);
hRes = pControl->Run();
long evCode = 0;
pEvent->WaitForCompletion(
};
RemoveFromRot(dwRegister);
};
CoUninitialize();
};
return 0;
}
ASKER
I tested this, it work but the sound some time interrupted (not the same original sound)
Do you have any suggestion for this?
For more question, if the lenght of wav file is not the same the length of AVIs file (for example: wav: 24s AVis: 25s)then what happent with final avi file?
Many thank again!
Do you have any suggestion for this?
For more question, if the lenght of wav file is not the same the length of AVIs file (for example: wav: 24s AVis: 25s)then what happent with final avi file?
Many thank again!
ASKER
Hi mrblue,
How can I set the param with my source file with the follow comment
Instead of harding-code as L"C:\\DXSDK9\\Samples\\Med ia\\highwa y.avi" I want to send my param source file to this,
so, How can I do this, I used WCHAR* but it is not work.
I want to write a function as AddWavToAVI(const WCHAR* wavFile, const WCHAR* aviFile, const WCHAR* rsAVIFile)
But when I used
hRes = pGraph->AddSourceFilter(av iFile, L"AVI File", &pAVISource);
hRes = pGraph->AddSourceFilter(wa vFile, L"WAVE File", &pWAVESource);
and
hRes = pIFileSinkFilter2->SetFile Name(rsAVI File, NULL);
I don't see any result for this, it seem to can not write.
Please give me more suggestion
Tx,
How can I set the param with my source file with the follow comment
Instead of harding-code as L"C:\\DXSDK9\\Samples\\Med
so, How can I do this, I used WCHAR* but it is not work.
I want to write a function as AddWavToAVI(const WCHAR* wavFile, const WCHAR* aviFile, const WCHAR* rsAVIFile)
But when I used
hRes = pGraph->AddSourceFilter(av
hRes = pGraph->AddSourceFilter(wa
and
hRes = pIFileSinkFilter2->SetFile
I don't see any result for this, it seem to can not write.
Please give me more suggestion
Tx,
"I tested this, it work but the sound some time interrupted (not the same original sound)
Do you have any suggestion for this?"
Try this (add pointed code):
_COM_SMARTPTR_TYPEDEF(IFil eSinkFilte r2, IID_IFileSinkFilter2);
_COM_SMARTPTR_TYPEDEF(ICon figAviMux, IID_IConfigAviMux); // <---
IFileSinkFilter2Ptr pIFileSinkFilter2;
IConfigAviMuxPtr pIConfigAviMux; // <---
hRes = pAVIMux.CreateInstance(CLS ID_AviDest , NULL, CLSCTX_INPROC_SERVER);
hRes = pGraph->AddFilter(pAVIMux, L"AVI Mux");
"For more question, if the lenght of wav file is not the same the length of AVIs file (for example: wav: 24s AVis: 25s)then what happent with final avi file?"
If I remember well:
1.If video is longer the rest of movie will be without sound
2.If sound is longer the last frame will be "repeated" (actually shown longer)
hRes = pAVIMux.QueryInterface(IID _IConfigAv iMux, &pIConfigAviMux); // <---
hRes = pIConfigAviMux->SetMasterS tream(1); // <---
It simply selects master (more important) stream for synchronization.
In your case it should be:
-1 - none is master
0 - video
1 - sound
From Doc:
"It is recomended to use the audio stream as the master stream, because minor adjustment to the video playback rate are less noticable than changes to the audio playback rate"
Do you have any suggestion for this?"
Try this (add pointed code):
_COM_SMARTPTR_TYPEDEF(IFil
_COM_SMARTPTR_TYPEDEF(ICon
IFileSinkFilter2Ptr pIFileSinkFilter2;
IConfigAviMuxPtr pIConfigAviMux; // <---
hRes = pAVIMux.CreateInstance(CLS
hRes = pGraph->AddFilter(pAVIMux,
"For more question, if the lenght of wav file is not the same the length of AVIs file (for example: wav: 24s AVis: 25s)then what happent with final avi file?"
If I remember well:
1.If video is longer the rest of movie will be without sound
2.If sound is longer the last frame will be "repeated" (actually shown longer)
hRes = pAVIMux.QueryInterface(IID
hRes = pIConfigAviMux->SetMasterS
It simply selects master (more important) stream for synchronization.
In your case it should be:
-1 - none is master
0 - video
1 - sound
From Doc:
"It is recomended to use the audio stream as the master stream, because minor adjustment to the video playback rate are less noticable than changes to the audio playback rate"
I have used literally the following code and it works:
============
#include "stdafx.h"
#include <dshow.h>
#include <comdef.h>
#include <initguid.h>
_COM_SMARTPTR_TYPEDEF(IGra phBuilder, IID_IGraphBuilder);
_COM_SMARTPTR_TYPEDEF(ICap tureGraphB uilder2, IID_ICaptureGraphBuilder2) ;
_COM_SMARTPTR_TYPEDEF(IMed iaControl, IID_IMediaControl);
_COM_SMARTPTR_TYPEDEF(IMed iaEvent, IID_IMediaEvent);
_COM_SMARTPTR_TYPEDEF(IBas eFilter, IID_IBaseFilter);
_COM_SMARTPTR_TYPEDEF(IFil eSinkFilte r2, IID_IFileSinkFilter2);
_COM_SMARTPTR_TYPEDEF(ICon figAviMux, IID_IConfigAviMux);
DEFINE_GUID(CLSID_WAVEPars er,
0xD51BD5A1, 0x7548, 0x11CF, 0xA5, 0x20, 0x00, 0x80, 0xC7, 0x7E, 0xF5, 0x8A);
HRESULT AddToRot(IUnknownPtr pUnkGraph, DWORD *pdwRegister)
{
IMonikerPtr pMoniker;
IRunningObjectTablePtr pROT;
if(FAILED(GetRunningObject Table(0, &pROT))) return E_FAIL;
WCHAR wsz[256];
wsprintfW(wsz, L"FilterGraph %08x pid %08x", (DWORD_PTR)pUnkGraph, GetCurrentProcessId());
HRESULT hRes = CreateItemMoniker(L"!", wsz, &pMoniker);
if(SUCCEEDED(hRes)) {
hRes = pROT->Register(ROTFLAGS_RE GISTRATION KEEPSALIVE , pUnkGraph, pMoniker, pdwRegister);
}
return hRes;
}
void RemoveFromRot(DWORD pdwRegister)
{
IRunningObjectTablePtr pROT;
if(SUCCEEDED(GetRunningObj ectTable(0 , &pROT))) {
pROT->Revoke(pdwRegister);
};
}
VOID AddWavToAVI(const WCHAR *wavFile, const WCHAR *aviFile, const WCHAR *rsAVIFile)
{
HRESULT hRes;
IGraphBuilderPtr pGraph;
hRes = pGraph.CreateInstance(CLSI D_FilterGr aph, NULL, CLSCTX_INPROC_SERVER);
if(SUCCEEDED(hRes)) {
DWORD dwRegister;
ICaptureGraphBuilder2Ptr pICaptureGraphBuilder2;
hRes = AddToRot(pGraph, &dwRegister);
hRes = pICaptureGraphBuilder2.Cre ateInstanc e(CLSID_Ca ptureGraph Builder2, NULL, CLSCTX_INPROC_SERVER);
if(SUCCEEDED(hRes)) {
IMediaControlPtr pControl;
IMediaEventPtr pEvent;
IBaseFilterPtr pAVISource, pWAVESource, pAVISplitter, pWAVEParser, pAVIMux, pFileWriter;
IFileSinkFilter2Ptr pIFileSinkFilter2;
IConfigAviMuxPtr pIConfigAviMux;
pICaptureGraphBuilder2->Se tFiltergra ph(pGraph) ;
hRes = pGraph.QueryInterface(IID_ IMediaCont rol, &pControl);
hRes = pGraph.QueryInterface(IID_ IMediaEven t, &pEvent);
hRes = pGraph->AddSourceFilter(av iFile, L"AVI File", &pAVISource);
hRes = pGraph->AddSourceFilter(wa vFile, L"WAVE File", &pWAVESource);
hRes = pAVISplitter.CreateInstanc e(CLSID_Av iSplitter, NULL, CLSCTX_INPROC_SERVER);
hRes = pGraph->AddFilter(pAVISpli tter, L"AVI Splitter");
hRes = pICaptureGraphBuilder2->Re nderStream (NULL, NULL, pAVISource, NULL, pAVISplitter);
hRes = pWAVEParser.CreateInstance (CLSID_WAV EParser, NULL, CLSCTX_INPROC_SERVER);
hRes = pGraph->AddFilter(pWAVEPar ser, L"WAVE Parser");
hRes = pICaptureGraphBuilder2->Re nderStream (NULL, NULL, pWAVESource, NULL, pWAVEParser);
hRes = pAVIMux.CreateInstance(CLS ID_AviDest , NULL, CLSCTX_INPROC_SERVER);
hRes = pGraph->AddFilter(pAVIMux, L"AVI Mux");
hRes = pAVIMux.QueryInterface(IID _IConfigAv iMux, &pIConfigAviMux);
hRes = pIConfigAviMux->SetMasterS tream(1);
hRes = pICaptureGraphBuilder2->Re nderStream (NULL, NULL, pAVISplitter, NULL, pAVIMux);
hRes = pICaptureGraphBuilder2->Re nderStream (NULL, NULL, pWAVEParser, NULL, pAVIMux);
hRes = pFileWriter.CreateInstance (CLSID_Fil eWriter, NULL, CLSCTX_INPROC_SERVER);
hRes = pGraph->AddFilter(pFileWri ter, L"File Writer");
hRes = pFileWriter.QueryInterface (IID_IFile SinkFilter 2, &pIFileSinkFilter2);
hRes = pIFileSinkFilter2->SetFile Name(rsAVI File, NULL);
hRes = pICaptureGraphBuilder2->Re nderStream (NULL, NULL, pAVIMux, NULL, pFileWriter);
hRes = MessageBox(NULL, TEXT("Test"), TEXT("Check #1"), MB_OK);
hRes = pControl->Run();
long evCode = 0;
pEvent->WaitForCompletion( INFINITE, &evCode);
};
RemoveFromRot(dwRegister);
};
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HRESULT hRes;
hRes = CoInitialize(NULL);
if(SUCCEEDED(hRes)) {
AddWavToAVI(L"C:\\DXSDK9\\ Samples\\M edia\\audi opath3.wav ", L"C:\\DXSDK9\\Samples\\Med ia\\highwa y.avi", L"c:\\result.avi");
CoUninitialize();
};
return 0;
}
============
#include "stdafx.h"
#include <dshow.h>
#include <comdef.h>
#include <initguid.h>
_COM_SMARTPTR_TYPEDEF(IGra
_COM_SMARTPTR_TYPEDEF(ICap
_COM_SMARTPTR_TYPEDEF(IMed
_COM_SMARTPTR_TYPEDEF(IMed
_COM_SMARTPTR_TYPEDEF(IBas
_COM_SMARTPTR_TYPEDEF(IFil
_COM_SMARTPTR_TYPEDEF(ICon
DEFINE_GUID(CLSID_WAVEPars
0xD51BD5A1, 0x7548, 0x11CF, 0xA5, 0x20, 0x00, 0x80, 0xC7, 0x7E, 0xF5, 0x8A);
HRESULT AddToRot(IUnknownPtr pUnkGraph, DWORD *pdwRegister)
{
IMonikerPtr pMoniker;
IRunningObjectTablePtr pROT;
if(FAILED(GetRunningObject
WCHAR wsz[256];
wsprintfW(wsz, L"FilterGraph %08x pid %08x", (DWORD_PTR)pUnkGraph, GetCurrentProcessId());
HRESULT hRes = CreateItemMoniker(L"!", wsz, &pMoniker);
if(SUCCEEDED(hRes)) {
hRes = pROT->Register(ROTFLAGS_RE
}
return hRes;
}
void RemoveFromRot(DWORD pdwRegister)
{
IRunningObjectTablePtr pROT;
if(SUCCEEDED(GetRunningObj
pROT->Revoke(pdwRegister);
};
}
VOID AddWavToAVI(const WCHAR *wavFile, const WCHAR *aviFile, const WCHAR *rsAVIFile)
{
HRESULT hRes;
IGraphBuilderPtr pGraph;
hRes = pGraph.CreateInstance(CLSI
if(SUCCEEDED(hRes)) {
DWORD dwRegister;
ICaptureGraphBuilder2Ptr pICaptureGraphBuilder2;
hRes = AddToRot(pGraph, &dwRegister);
hRes = pICaptureGraphBuilder2.Cre
if(SUCCEEDED(hRes)) {
IMediaControlPtr pControl;
IMediaEventPtr pEvent;
IBaseFilterPtr pAVISource, pWAVESource, pAVISplitter, pWAVEParser, pAVIMux, pFileWriter;
IFileSinkFilter2Ptr pIFileSinkFilter2;
IConfigAviMuxPtr pIConfigAviMux;
pICaptureGraphBuilder2->Se
hRes = pGraph.QueryInterface(IID_
hRes = pGraph.QueryInterface(IID_
hRes = pGraph->AddSourceFilter(av
hRes = pGraph->AddSourceFilter(wa
hRes = pAVISplitter.CreateInstanc
hRes = pGraph->AddFilter(pAVISpli
hRes = pICaptureGraphBuilder2->Re
hRes = pWAVEParser.CreateInstance
hRes = pGraph->AddFilter(pWAVEPar
hRes = pICaptureGraphBuilder2->Re
hRes = pAVIMux.CreateInstance(CLS
hRes = pGraph->AddFilter(pAVIMux,
hRes = pAVIMux.QueryInterface(IID
hRes = pIConfigAviMux->SetMasterS
hRes = pICaptureGraphBuilder2->Re
hRes = pICaptureGraphBuilder2->Re
hRes = pFileWriter.CreateInstance
hRes = pGraph->AddFilter(pFileWri
hRes = pFileWriter.QueryInterface
hRes = pIFileSinkFilter2->SetFile
hRes = pICaptureGraphBuilder2->Re
hRes = MessageBox(NULL, TEXT("Test"), TEXT("Check #1"), MB_OK);
hRes = pControl->Run();
long evCode = 0;
pEvent->WaitForCompletion(
};
RemoveFromRot(dwRegister);
};
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HRESULT hRes;
hRes = CoInitialize(NULL);
if(SUCCEEDED(hRes)) {
AddWavToAVI(L"C:\\DXSDK9\\
CoUninitialize();
};
return 0;
}
ASKER
Thank you very much for your help.
I resolved my problem.
AddWavToAVI(L"C:\\DXSDK9\\ Samples\\M edia\\audi opath3.wav ", L"C:\\DXSDK9\\Samples\\Med ia\\highwa y.avi", L"c:\\result.avi");
This is still a hard-code, I try to write a function to convert a char* to WCHAR*
It work now.
Thank you again.
I resolved my problem.
AddWavToAVI(L"C:\\DXSDK9\\
This is still a hard-code, I try to write a function to convert a char* to WCHAR*
It work now.
Thank you again.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yah, Many thank again, I used this with im my code before!
Or you could build own, more sophisticated application based od DirectShow.
Or maybe locate some shareware in Internet.