This content has been marked as final. Show 2 replies
with RTMFP, video and audio can go out of sync if the data rate of your stream exceeds your network capacity. video is currently sent with 100% reliability, so once it's queued for transmission, it's going to be sent (eventually). video is lower priority than audio, though, so your audio data gets first dibs on your network capacity. if the video stream's data rate is higher than what fits in your network (after audio), the video data will back up until its send buffer is filled, and new camera frames will stop getting captured. in the steady state, this can look like a multi-second offset between the video and audio.
try turning your video rate/quality down so that it fits in your network capacity. video and audio should stay in sync.
with RTMP, there's one network transmission buffer (TCP's) for all of the parts of your stream (audio & video). when you have insufficient network bandwidth, the TCP buffer will eventually fill up and video frames will stop being captured to compensate. so while audio and video might remain in sync, the total end-to-end latency will go up. when using RTMFP, the audio and video have independent transmission buffers, so in cases of insufficient network resources, the higher-priority audio should remain more timely but video may fall behind.
Mike, thanks for the explanation. Really helps! I will try adjusting my video bit rate and check how it goes. In fact, for me sometimes AV were in sync and sometimes they go out of sync. With your reasoning I can see why ...
Thanks a lot!