[Live-devel] how to use H264or5VideoRTPSink

Roland Aigner Roland.Aigner at aec.at
Thu Jan 12 06:36:31 PST 2017


Hi all,

I've got a few beginner questions:

I'm trying to stream H264/H265 encoded live video via RTP/RTCP. For this, I'm trying to build upon your testOnDemandRTSPServer sample, since it best fits my needs.

I saw that you prepared a dummy class DeviceSource, apparently for the purpose of implementing live streaming. I tried adapting the class for my purposes, but failed since fMaxSize seems to adapt dynamically, according to the actually used buffer size, which after some time causes the fTo buffer to be too small every other time, so I have to drop data at some frames, which of course causes glitches. I realized you use a ByteStreamFileSource in H264VideoFileServerMediaSubsession, which reads and buffers a bunch of encoded data, so you never run into this issue. I however have to deal with single frames, so the fMaxSize drops to 300 sometimes, which is then too small. How can I prevent this from happening? I tried
OutPacketBuffer::maxSize = 300000;
and
OutPacketBuffer::increaseMaxSizeTo( 300000 );
but this doesn't have any effect.

Currently, I came across a class called H264or5VideoRTPSink, which from its name seems to be exactly what I'd have to use. I have no idea however, how it is intended to be used. Also, you don't use it in your sample - is there a reason to it? Maybe it's not what I think it is?

By the way: I put some cout traces into constructors/destructors/methods of ByteStreamFileSource and realized that, when I connect to testH264VideoToTransportStream, the source is  instantiated twice. First, it is created, then a few frames are read, then it gets destroyed again, then another one is created and this one is kept until the end. It doesn't matter what client I use, it happens with VLC and testRTPSClient alike. Why is that?

Thanks,
Roland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20170112/d6e3c443/attachment-0001.html>


More information about the live-devel mailing list