[Live-devel] Live555 RTSP Transport (TCP) of live H264 Stream leads to artifacts as I-Frames are sent

p.otto at lefx.de p.otto at lefx.de
Fri Nov 20 07:55:56 PST 2015


Hi all,

in the past weeks I've been working on a streaming solution using an 
H264 hardware encoder and live555 to stream the data over RTSP.

The solution is roughly based on the testOnDemandRTSPServer including a 
subclass of OnDemandServerMediaSubsession, a custom FramedSource for my 
Live-Input and a wrapping Medium.
Using the frames provided by the encoder I build the NALUs for live555 
and deliver them with my Live-FramedSource.

The example works fine so far, we achive good latencys, multiple client 
connections work well and the actual "frame sending mechanism" runs 
flawlessly.

However, if we watch the video-stream (e.g. with ffplay), we encounter 
heavy artifacts and blocking whenever an I-Frame NALU arrives.
But these artifacts are corrected in a fraction of a second as new NALUs 
follow..

To "avoid" these artifacts we are using a very high I-Frame interval at 
the moment (600), so the interruptions occur less frequently.
Nevertheless this is not an solution for the problem.

I know that I-Frames are much bigger than P-Frames (log states aswell, 
see below), so I tried to tweak several parameters like the maximum size 
of the OutPacketBuffer or the actual size (quality) of the frames/NALUs 
I supply with my encoder, but the sizes do not seem to be a problem, 
because limits set by live555 are not exceeded and outputs of ffplay and 
openRTSP do not report errors/packet loss/truncation as the artifacts 
appear.

In my attachments are screenshots of ffplay showing an actual 
live-stream received, in which you can see the artifacts as the I-Frame 
interval starts/ends.
( mirrored to imgur.com/a/vsVFG )

Do you have any ideas, what might cause these problems or can give me 
special insights regarding this problem? I appreciate any help.

Best regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4.png
Type: image/png
Size: 673352 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151120/638a08c1/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.png
Type: image/png
Size: 590358 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151120/638a08c1/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.png
Type: image/png
Size: 615221 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151120/638a08c1/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3.png
Type: image/png
Size: 635572 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151120/638a08c1/attachment-0003.png>


More information about the live-devel mailing list