<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Hi Ross,</div>
<div><br>
</div>
<div>When I run manually openRTSP from a windows console, all is fine.</div>
<div>Now, I'm trying to launch it from a C++ Windows program, but it does not work.</div>
<div>No error, but video file is not generated.</div>
<div><br>
</div>
<div>The command line is :</div>
<div>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</div>
<div><br>
</div>
<div>The C code is :</div>
<div><br>
</div>
<div>STARTUPINFOA si;<br>
PROCESS_INFORMATION pi;<br>
ZeroMemory(&si, sizeof(si));<br>
si.cb = sizeof si;<br>
ZeroMemory(&pi, sizeof(pi));<br>
</div>
<div><br>
</div>
<div>GetStartupInfoA(&si);</div>
<div><br>
</div>
<div>strcpy(szCdeLine, "-b 400000 ");</div>
<div>strcat(szCdeLine, "-u admin admin1234 ");</div>
<div>strcat(szCdeLine, "-v ");</div>
<div>strcat(szCdeLine, "-d 40 ");</div>
<div>strcat(szCdeLine, "-U 20201015T162020Z ");</div>
<div>strcat(szCdeLine, "\"rtsp://192.168.1.174:554/Streaming/Tracks/101\" ");</div>
<div>strcat(szCdeLine, "> e:\\tmp\\video.tmp");</div>
<div><br>
</div>
<div>if (!CreateProcessA("openRTSP.exe", szCdeLine, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi))</div>
<div>{</div>
<div>err = GetLastError();</div>
<div>throw Exception("openrtsp error";</div>
<div>}</div>
<div><br>
</div>
<div>WaitForSingleObject(pi.hProcess, 40000);</div>
<div>CloseHandle(pi.hProcess);</div>
<div>CloseHandle(pi.hThread);</div>
<div><br>
</div>
<div><br>
</div>
<div>The C program and openrtsp.exe are in the same directory.</div>
<div><br>
</div>
<div>Do you have any idea why it does not work ?</div>
<div><br>
</div>
<div>Thanks in advance,</div>
Nicolas</div>
</body>
</html>