[Live-devel] Stream errors with MPEG 4 ES

Kumar Bala (DSP-Weuffen GmbH) kumar.bala at DSP-Weuffen.de
Tue Jul 1 01:58:15 PDT 2008


Hello,

I use  the testOnDemandRTSPServer to stream live video (captured using
an analog camera and encoded to MPEG 4 ES using a co-processor). I use
ByteFileStreamSource.cpp in (ASYNCHRONOUS mode) as a base model for my
device. I have modified doReadFromFile in such a way that it reurns an
MPEG 4 frame from the "codec engine"(capture device + mpeg 4 encoder).

I am having problems with the BANK_SIZE defined in StreamParser.cpp.
Since I keep on reading from the codec engine and filling data untill
BANK_SIZE (am I right ???) . When I reach the boundary (around
BANK_SIZE) and I read X bytes and if adding X bytes would exceeed
BANK_SIZE I end up with an error (and a visible glitch) at the decoder
(mplayer compiled with LIVE555 support and MAX_RTP_FRAME_SIZE increased
to 100000).

Here is the output at the mplayer end:

[mpeg4 @ 0x889a290]Error at MB: 89
[mpeg4 @ 0x889a290]concealing 1584 DC, 1584 AC, 1584 MV errors
[mpeg4 @ 0x889a290]ac-tex damaged at 20 17
[mpeg4 @ 0x889a290]Error at MB: 802
[mpeg4 @ 0x889a290]concealing 884 DC, 884 AC, 884 MV errors
[mpeg4 @ 0x889a290]ac-tex damaged at 12 22

Here is the debug output(newly added) at the Server end,

----------------------
ByteCount exceeded
----------------------

bufferSize = 79020
byteCount  = 9954316
----------------------
ByteCount exceeded
----------------------
bufferSize = 13086
byteCount  = 999549

and the explanation:
bufferSize - size of frame returned by the codec engine.
byteCount  - current amount of bytes I have filled into "fTo" buffer


What should I do to ignore the last frames since they exceed BANK_SIZE ?
or my understanding of the problem is flawed ?. I can stream videos with
really low latency using live555 server. The only glitch I have now is
there error happening once in 30 sec or so.

Any suggestion on how to fix this would be of great help.

Mit freundlichen Grüßen / Best regards
Kumar Bala




More information about the live-devel mailing list