Persistent delay (latency) in live streaming on localhost
I have been trying to stream live video from my laptop's webcam through Wowza Media Server on localhost. However, trying to view the stream through the LiveVideoStreaming example or VLC always causes a few seconds' delay in the video playback. I have tried the following instructions: -
I have tried both RTMP direct and MPEG-TS streaming. I have tried using both ffmpeg and Telestream Wirecast encoder. I have tried buffer size, bitrate, frame rate, muxdelay, muxpreload and vsync parameters on ffmpeg (both increasing and decreasing), but nothing works. Wowza Media Server seems to remain unaffected by any change whatsoever. I have tried this on both Linux and Windows. I am using the H.264 codec (libx264 in ffmpeg). I will be very grateful if someone can help me achieve a zero or near-zero latency.
That first link is what we know about this. A few seconds indicates low FPS h.264 video in Flash RTMP client with NetStream.bufferLength > 0. You can increase FPS. You should test locally to eliminate network latency, which you cannot control really.