Ross,<br>
<br>
Thank you for the quick response.<br><br>My encoder produces 1 encoded frame every 1/15 of a second, RTSPServer is reading faster and OS blocks when there is no data available. How the increase of pipe buffer will help if encoder does not produce more data?<br>
<br>Will implementing my own "FramedSource" subclass resolve the issue as well?<br><br>Thanks in advance.<br><br><div class="gmail_quote">On Sun, Mar 6, 2011 at 4:52 PM, Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com">finlayson@live555.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div class="im">
<blockquote type="cite">I am trying to make Live555 work with
live video source. My H263 encoder writes encoded frames
to Unix named pipe (FIFO) with a rate of 15 fps<i>.</i> I created
a RTSPServer instance, ServerMediaSession and added
a H263plusVideoFileServerMediaSubsession (reuseFirstSource=True),
passing the FIFO file name as the subsession parameter.</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite">VLC and/or QuickTime player start playing
the stream, then repeatedly freeze for several seconds, then play
again. However, everything works fine if I stream pre-recoded H.263
encoded elementary stream from file (without using named pipe). Is
this happening when RTSPServer is getting EOF while trying to read the
data from the pipe?</blockquote>
<div><br></div>
</div><div>No, it's most likely because the server is trying to read more
data from the pipe than is currently available, so the operating
system is blocking the reading server until the other end (the
encoder) makes enough data available.</div>
<div><br></div>
<div>One way to fix this is to - if you can - increase the internal
(i.e., OS) buffering in your named pipe. Our server tries to
read up to 150000 bytes at a time (the constant BANK_SIZE in
"StreamParser.cpp"), so you should try to make the pipe's
buffer at least this large.</div>
<div><br></div>
<div>Alternatively - if you can't increase the amount of buffering in
your pipe - you could try reducing the value of the constant BANK_SIZE
in "StreamParser.cpp". You should not make this too
small, though; it needs to be at least as large as the largest
possible H.263 frame that you expect to see.</div>
<div>I don't recommend doing this except as a last resort, though,
because it requires modifying the supplied source code.</div>
<pre>--
</pre><font color="#888888">
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
<a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a></div>
</font></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>