<div dir="ltr">Thank you.<br><div class="gmail_quote"><div dir="ltr"><font color="#003300">One problem thought. I read 7*188 bytes from input and output 188 byte each time. but when the indexer read 7th frame (last 188 bytes of 188*7 bytes) I get this error:<br>


Bad TS sync byte: 0x0<br>But when I drop the last frame each time, indexing works and it seems that it generates a correct one.<br>Am i doing it right.<br>Thanks again.<br></font><div><div></div><div class="h5"><br><div class="gmail_quote">

On Tue, Nov 2, 2010 at 6:15 PM, Ross Finlayson <span dir="ltr">&lt;<a href="mailto:finlayson@live555.com" target="_blank">finlayson@live555.com</a>&gt;</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></div><div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



I am trying to capture a live stream (which is MPEG2TS) via openRTSP and<br>
instead of recording it in &#39;video-MP2T-1&#39;, index the received video<br>
on-live.<br>
<br>
FramedSource* video1 = sources[0]; //I caught it from MediaSubsession<br>
MediaSink* outputIndexerSink = FileSink::createNew(*env, &quot;out.tsx&quot;);<br>
FramedSource* indexer = MPEG2IFrameIndexFromTransportS<br>
tream::createNew(*env, video1);<br>
<br>
outputIndexerSink-&gt;startPlaying(*indexer, subsessionAfterPlaying, NULL);<br>
<br>
when I run it, I get these errors:<br>
MultiFramedRTPSource::doGetNextFrame1(): The total received frame size exceeds the client&#39;s buffer size (188).  940 bytes of trailing data will be dropped!<br>
<br>
what seems to be the problem?<br>
</blockquote>
<br></div></div>
In principle, what you are doing is exactly right.  In practice, though, the problem is that the &quot;MPEG2IFrameIndexFromTransportStream&quot; object reads just one 188-byte MPEG Transport &#39;packet&#39; at a time, into a 188-byte buffer.  However, the upstream object &quot;SimpleRTPSource&quot; (a subclass of &quot;MultiFramedRTPSource&quot;) delivers a whole network packet&#39;s worth of data, which is usually much larger.<br>



<br>
To overcome this, you will need to write a new filter object and insert it between &quot;video1&quot; and &quot;indexer&quot; in your code.  This filter object will be of a subclass of &quot;FramedFilter&quot; that you&#39;ll need to write yourself.  It will read network packet data into a large buffer, and deliver - from this buffer - 188-byte MPEG Transport &#39;packets&#39;, one-at-a-time, to its downstream reader (&quot;indexer&quot;).<br>



-- <br><font color="#888888">
<br>
Ross Finlayson<br>
Live Networks, Inc.<br>
<a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a><br>
_______________________________________________<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>
</font></blockquote></div><br></div></div></div>
</div><br></div>