[Live-devel] Index onlive stream

Mojtaba Nouri mojtaba.nouri at gmail.com
Wed Nov 3 04:09:40 PDT 2010


Thank you.
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:
Bad TS sync byte: 0x0
But when I drop the last frame each time, indexing works and it seems that
it generates a correct one.
Am i doing it right.
Thanks again.

On Tue, Nov 2, 2010 at 6:15 PM, Ross Finlayson <finlayson at live555.com>wrote:

> I am trying to capture a live stream (which is MPEG2TS) via openRTSP and
>> instead of recording it in 'video-MP2T-1', index the received video
>> on-live.
>>
>> FramedSource* video1 = sources[0]; //I caught it from MediaSubsession
>> MediaSink* outputIndexerSink = FileSink::createNew(*env, "out.tsx");
>> FramedSource* indexer = MPEG2IFrameIndexFromTransportS
>> tream::createNew(*env, video1);
>>
>> outputIndexerSink->startPlaying(*indexer, subsessionAfterPlaying, NULL);
>>
>> when I run it, I get these errors:
>> MultiFramedRTPSource::doGetNextFrame1(): The total received frame size
>> exceeds the client's buffer size (188).  940 bytes of trailing data will be
>> dropped!
>>
>> what seems to be the problem?
>>
>
> 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.
>
> 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").
> --
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20101103/851aca74/attachment-0001.html>


More information about the live-devel mailing list