[Live-devel] Run openrtsp from another program
Nicolas Julien
nicolas.julien at cdvi.com
Mon Oct 19 04:41:54 PDT 2020
Hi Ross,
When I run manually openRTSP from a windows console, all is fine.
Now, I'm trying to launch it from a C++ Windows program, but it does not work.
No error, but video file is not generated.
The command line is :
openrtsp.exe -b 400000 -u admin admin1234 -v -d 40 -U 20201015T162020Z "rtsp://192.168.1.174:554/Streaming/Tracks/101" > e:\tmp\video.tmp
The C code is :
STARTUPINFOA si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof si;
ZeroMemory(&pi, sizeof(pi));
GetStartupInfoA(&si);
strcpy(szCdeLine, "-b 400000 ");
strcat(szCdeLine, "-u admin admin1234 ");
strcat(szCdeLine, "-v ");
strcat(szCdeLine, "-d 40 ");
strcat(szCdeLine, "-U 20201015T162020Z ");
strcat(szCdeLine, "\"rtsp://192.168.1.174:554/Streaming/Tracks/101\" ");
strcat(szCdeLine, "> e:\\tmp\\video.tmp");
if (!CreateProcessA("openRTSP.exe", szCdeLine, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi))
{
err = GetLastError();
throw Exception("openrtsp error";
}
WaitForSingleObject(pi.hProcess, 40000);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
The C program and openrtsp.exe are in the same directory.
Do you have any idea why it does not work ?
Thanks in advance,
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20201019/5db23f9a/attachment.htm>
More information about the live-devel
mailing list