Reputation: 511
I use RTMFP with NetGroup and Adobe Cirrus. Broadcasting settings are 320x240 with 5 fps.
However, in some cases it takes a long time for the webcam stream to appear (10-20 seconds, even if having a 1:1 connection). If the stream appears eventually, it looks like this:
I think this comes from a high keyframe interval and the subscribers needs to wait for the next keyframe, so that the stream appears properly. This happens in contrast to streaming servers, where the server caches the last keyframes from the publisher stream.
My question is how I am able to tune the broadcasting, e.g. set the keyframe interval and other settings. Can you recommend a good setup? And, why is this issue not popular (I haven't found much information about it)?
Thanks, Valentin
Upvotes: 0
Views: 1720
Reputation: 68526
RTMFP is a peer-2-peer protocol, so eventually there will be video distortion(the scrshot you attached) in the beginining and also when there is a lot of activity(more frames) on the webcam.
You can't set the quality or the bandwidth option , as RTMFP is purely p2p.
If you are looking for these parameters go for RTMP.
Upvotes: 1
Reputation: 4546
Try setting the keyframe interval like normal: camera.setKeyFrameInterval(1);
You should be able to avoid the pixelated image by setting netStream.bufferTime
greater than or equal to the keyframe interval. That way by the time it's buffered, you will have at least 1 keyframe.
But, you can't guarantee there won't be glitches, because RTMFP uses UDP, which is lossy.
Upvotes: 2