<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"><<a href="mailto:finlayson@live555.com" target="_blank">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></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 'video-MP2T-1', index the received video<br>
on-live.<br>
<br>
FramedSource* video1 = sources[0]; //I caught it from MediaSubsession<br>
MediaSink* outputIndexerSink = FileSink::createNew(*env, "out.tsx");<br>
FramedSource* indexer = MPEG2IFrameIndexFromTransportS<br>
tream::createNew(*env, video1);<br>
<br>
outputIndexerSink->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'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 "MPEG2IFrameIndexFromTransportStream" object reads just one 188-byte MPEG Transport 'packet' at a time, into a 188-byte buffer. However, the upstream object "SimpleRTPSource" (a subclass of "MultiFramedRTPSource") delivers a whole network packet'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 "video1" and "indexer" in your code. This filter object will be of a subclass of "FramedFilter" that you'll need to write yourself. It will read network packet data into a large buffer, and deliver - from this buffer - 188-byte MPEG Transport 'packets', one-at-a-time, to its downstream reader ("indexer").<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>