Trying to launch ffmpeg using CreateProcess.
Issues:
1) Can't use dshow in the commandline.
2) RTMP streaming with the STDIN piped don't show the stream.
Questions:
1) What are the ceveats in the commandline pertaining to CreateProcess api?
2) What's is the way round ? How can the issue be fixed?
This code works:
BOOL bSuccess = CreateProcess(NULL,
L"ffmpeg.exe -y -loop 1 -i kites.jpg out.mp4",
NULL,
NULL,
TRUE,
CREATE_NEW_CONSOLE,
NULL,
NULL,
&siStartInfo,
&piProcInfo);
CreateProcess fails when dshow is used. However it works as command line in console.
BOOL bSuccess = CreateProcess(NULL,
L"ffmpeg.exe -y -loop 1 -i kites.jpg -f dshow -i audio=\"Stereo Mix(Realtek High Definition Audio)\" out.mp4",
NULL,
NULL,
TRUE,
CREATE_NEW_CONSOLE,
NULL,
NULL,
&siStartInfo,
&piProcInfo);
Edited: ( with absolute path, still no luck)
std::wstring cmdArgslistSetChannel = L"ffmpeg.exe -y -loop 1 -i c:\test\kites.jpg -f dshow -i audio=\"Stereo Mix(Realtek High Definition Audio)\" out.mp4";
bSuccess = CreateProcess(NULL,
&cmdArgslistSetChannel[0],
NULL,
NULL,
TRUE,
CREATE_NEW_CONSOLE,
NULL,
NULL,
&siStartInfo,
&piProcInfo);