Okay, I did some more testing of the problem.<div><br></div><div>Step one: I set the max_key_interval in the encoder to 25 (one per second and current fps). Xvid sends a Bitstream header with each keyframe, so the streamer shouldn't have to wait for more than a second max for that information.</div>
<div><br></div><div>Step two: I wrote a tiny program that does nothing but open the pipe and read data from it, using fopen and fread. That program was able to connect and pull data from the pipe, so I know the pipe is working.</div>
<div><br></div><div>At this point I switch back to the streamer program and tried again. Still no video in VLC.</div><div><br></div><div>Step three: I built openRTSP and tried to connect to the stream. I got what seems to be a good conversation between it and the streamer, which ends with "Started playing session" and "Receiving streamed data..." But the video-MP4V-ES-1 file that it creates is only 58 bytes long. As openRTSP was connecting to the streamer, I watched it in Process Explorer, and I saw that upon openRTSP connecting it was opening the pipe. But once openRTSP said "Started playing session", it closes the pipe. (I'll attach the output from openRTSP below)</div>
<div><br></div><div>What can be going on in the stream that will cause the live555 library to close the file (which to what I can see only happens in the ~ByteStreamFileSource()) as it starts to stream, without error messages?</div>
<div><br></div><div>Chris Van Brederode</div><div><br></div><div>Software Engineer</div><div>International Logistics Systems, Inc.</div><div><a href="http://www.intlogys.com">http://www.intlogys.com</a></div><div><br></div>
<div><a href="mailto:cvanbrederode@intlogsys.com">cvanbrederode@intlogsys.com</a></div><div><br></div><div>--------------------------------------------------</div><div>Output from openRTSP</div><div>--------------------------------------------------</div>
<div><br></div><div><div>Opening connection to 172.16.3.53, port 8554...</div><div>...remote connection opened</div><div>Sending request: OPTIONS rtsp://<a href="http://172.16.3.53:8554/test">172.16.3.53:8554/test</a> RTSP/1.0</div>
<div><br></div><div>CSeq: 2</div><div><br></div><div>User-Agent: openRTSP.exe (LIVE555 Streaming Media v2013.01.15)</div><div><br></div><div><br></div><div><br></div><div><br></div><div>Received 152 new bytes of response data.</div>
<div>Received a complete OPTIONS response:</div><div>RTSP/1.0 200 OK</div><div><br></div><div>CSeq: 2</div><div><br></div><div>Date: Fri, Mar 01 2013 20:37:57 GMT</div><div><br></div><div>Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER</div>
<div><br></div><div><br></div><div><br></div><div><br></div><div>Sending request: DESCRIBE rtsp://<a href="http://172.16.3.53:8554/test">172.16.3.53:8554/test</a> RTSP/1.0</div><div><br></div><div>CSeq: 3</div><div><br></div>
<div>User-Agent: openRTSP.exe (LIVE555 Streaming Media v2013.01.15)</div><div><br></div><div>Accept: application/sdp</div><div><br></div><div><br></div><div><br></div><div><br></div><div>Received 659 new bytes of response data.</div>
<div>Received a complete DESCRIBE response:</div><div>RTSP/1.0 200 OK</div><div><br></div><div>CSeq: 3</div><div><br></div><div>Date: Fri, Mar 01 2013 20:38:04 GMT</div><div><br></div><div>Content-Base: rtsp://<a href="http://172.16.3.53:8554/test/">172.16.3.53:8554/test/</a></div>
<div><br></div><div>Content-Type: application/sdp</div><div><br></div><div>Content-Length: 497</div><div><br></div><div><br></div><div><br></div><div>v=0</div><div><br></div><div>o=- 1362170268711363 1 IN IP4 172.16.3.53</div>
<div><br></div><div>s=ECP ETA Streaming server</div><div><br></div><div>i=test</div><div><br></div><div>t=0 0</div><div><br></div><div>a=tool:LIVE555 Streaming Media v2013.01.15</div><div><br></div><div>a=type:broadcast</div>
<div><br></div><div>a=control:*</div><div><br></div><div>a=range:npt=0-</div><div><br></div><div>a=x-qt-text-nam:ECP ETA Streaming server</div><div><br></div><div>a=x-qt-text-inf:test</div><div><br></div><div>m=video 0 RTP/AVP 96</div>
<div><br></div><div>c=IN IP4 0.0.0.0</div><div><br></div><div>b=AS:500</div><div><br></div><div>a=rtpmap:96 MP4V-ES/90000</div><div><br></div><div>a=fmtp:96 profile-level-id=244;config=000001B0F4000001B509000001000000012008CA0D8800CE18A021E0A1C1000001B2446976583530336231333933000001B25876694430303634</div>
<div><br></div><div>a=control:track1</div><div><br></div><div><br></div><div>Opened URL "rtsp://<a href="http://172.16.3.53:8554/test">172.16.3.53:8554/test</a>", returning a SDP description:</div><div>v=0</div>
<div><br></div><div>o=- 1362170268711363 1 IN IP4 172.16.3.53</div><div><br></div><div>s=ECP ETA Streaming server</div><div><br></div><div>i=test</div><div><br></div><div>t=0 0</div><div><br></div><div>a=tool:LIVE555 Streaming Media v2013.01.15</div>
<div><br></div><div>a=type:broadcast</div><div><br></div><div>a=control:*</div><div><br></div><div>a=range:npt=0-</div><div><br></div><div>a=x-qt-text-nam:ECP ETA Streaming server</div><div><br></div><div>a=x-qt-text-inf:test</div>
<div><br></div><div>m=video 0 RTP/AVP 96</div><div><br></div><div>c=IN IP4 0.0.0.0</div><div><br></div><div>b=AS:500</div><div><br></div><div>a=rtpmap:96 MP4V-ES/90000</div><div><br></div><div>a=fmtp:96 profile-level-id=244;config=000001B0F4000001B509000001000000012008CA0D8800CE18A021E0A1C1000001B2446976583530336231333933000001B25876694430303634</div>
<div><br></div><div>a=control:track1</div><div><br></div><div><br></div><div>Created receiver for "video/MP4V-ES" subsession (client ports 50586-50587)</div><div>Sending request: SETUP rtsp://<a href="http://172.16.3.53:8554/test/track1">172.16.3.53:8554/test/track1</a> RTSP/1.0</div>
<div><br></div><div>CSeq: 4</div><div><br></div><div>User-Agent: openRTSP.exe (LIVE555 Streaming Media v2013.01.15)</div><div><br></div><div>Transport: RTP/AVP;unicast;client_port=50586-50587</div><div><br></div><div><br>
</div><div><br></div><div><br></div><div>Received 201 new bytes of response data.</div><div>Received a complete SETUP response:</div><div>RTSP/1.0 200 OK</div><div><br></div><div>CSeq: 4</div><div><br></div><div>Date: Fri, Mar 01 2013 20:38:04 GMT</div>
<div><br></div><div>Transport: RTP/AVP;unicast;destination=172.16.3.53;source=172.16.3.53;client_port=50586-50587;server_port=6970-6971</div><div><br></div><div>Session: 5FBE8E99</div><div><br></div><div><br></div><div><br>
</div><div><br></div><div>Setup "video/MP4V-ES" subsession (client ports 50586-50587)</div><div>Created output file: "video-MP4V-ES-1"</div><div>Sending request: PLAY rtsp://<a href="http://172.16.3.53:8554/test/">172.16.3.53:8554/test/</a> RTSP/1.0</div>
<div><br></div><div>CSeq: 5</div><div><br></div><div>User-Agent: openRTSP.exe (LIVE555 Streaming Media v2013.01.15)</div><div><br></div><div>Session: 5FBE8E99</div><div><br></div><div>Range: npt=0.000-</div><div><br></div>
<div><br></div><div><br></div><div><br></div><div>Received 183 new bytes of response data.</div><div>Received a complete PLAY response:</div><div>RTSP/1.0 200 OK</div><div><br></div><div>CSeq: 5</div><div><br></div><div>
Date: Fri, Mar 01 2013 20:38:04 GMT</div>
<div><br></div><div>Range: npt=0.000-</div><div><br></div><div>Session: 5FBE8E99</div><div><br></div><div>RTP-Info: url=rtsp://<a href="http://172.16.3.53:8554/test/track1;seq=16594;rtptime=2519251020">172.16.3.53:8554/test/track1;seq=16594;rtptime=2519251020</a></div>
<div><br></div><div><br></div><div><br></div><div><br></div><div>Started playing session</div><div>Receiving streamed data...</div><div>^C</div></div><div>----------------------------------------------------------</div><div>
End of output</div><div>----------------------------------------------------------</div><div><div><br></div><div><br><br><div class="gmail_quote">On Fri, Mar 1, 2013 at 7:46 AM, <a href="mailto:temp2010@forren.org">temp2010@forren.org</a> <span dir="ltr"><<a href="mailto:temp2010@forren.org" target="_blank">temp2010@forren.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Chris,<div><br></div><div>I've gotten a very similar pipe thing working. Ross was invaluable in helping. Here are two points you may need to recall, to finally get it working properly. </div>
<div><br></div><div>This advice relates to using H.264. It may only partially relate to your application.</div>
<div><br></div><div>1) You must make sure that you're sending both an SPS and a PPS NAL to Live555 *after* VLC tries to connect. My initial code wasn't doing this. My stream origination used an H.264 encoder that sends these two NAL records out first, and it was always running. So when VLC came along, those two NAL records had long since passed. I had to use tricks to send them again *in response* to the VLC connecting. Aside from Ross knowing it off the top, before hearing his advice I located this issue by tracing through the Live555 code and discovering it's refusal to continue without having seen those two NAL records.</div>
<div><br></div><div>2) With the above, I got video, but it was very choppy. Again, Ross was correct in suggesting it had to do with providing a steady stream of input. But how to do so was less obvious. The culprit was partially a lack of horsepower on one machine to do the full job with the debug-compiled code. The other culprit was needing to provide a large enough amount of memory to the pipe on creation.</div>
<div><br></div><div>Good luck!<br><br><div class="gmail_quote"><div><div class="h5">On Thu, Feb 28, 2013 at 9:14 PM, Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com" target="_blank">finlayson@live555.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div>As far as Windows developers who use gmail...I can understand the anti-windows sentiment, but I don't know what you have against gmail...</div>
</blockquote><div><br></div></div>This is explained clearly in the FAQ (that everyone was asked to read before posting to the mailing list :-)</div><div><br></div><div><div><br><blockquote type="cite"><div>And I code in Windows because I'm paid too...and I know *exactly* how to do asynchronous, non-blocking file IO in windows. Be careful with the word "impossible." ;-)</div>
</blockquote><div><br></div></div>The issue with doing asynchronous file reading in Windows is that - in Windows - extra work needs to be done to handle the 'data is available on the open file' event. In other OSs, open files are sockets that can be passed to "select()", as we do in the the implementation of "BasicTaskScheduler" (the "TaskScheduler" subclass that we provide with the supplied code). In (at least some versions of) Windows, however, open files are not "select()"able sockets. Therefore, to do asynchronous file reads in Windows, you would need to write your own subclass of "TaskScheduler" (that reimplements the "setBackgroundHandling()" virtual function).</div>
<div><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">Ross Finlayson<br>
Live Networks, Inc.<br><a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a></span></span>
</div>
<br></div></div><br></div></div><div class="im">_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com" target="_blank">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></div></blockquote></div><br></div>
<br>_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></blockquote></div><br></div></div>