Hi,
I’m having trouble to reduce the latency while trying to broadcast my webcam. I’m streaming the webcam feed to Wowza server through ffmpeg, both the ffmpeg and Wowza server resides on the same machine.
With the webcam, I’m obtaining the compressed mjpeg feed at ~30 fps @ 1280x720 as in the input. As the encoder, I’m using x264 with zerolatency tune and preset of ultrafast. With Wowza application, I’ve enabled the low latency option. An example cmd line for ffmpeg is the following.
ffmpeg -f v4l2 -s 1280x720 -input_format mjpeg -i /dev/video0 -c:v libx264 -preset ultrafast -tune zerolatency -f flv rtmp://wowzaserverip:port/live/myStream
The current latency is about 3 seconds, viewed from Test Player on Wowza Engine Manager. I’ve tried online suggestions here but the latency doesn’t vary at all. I’ve played with crf and other settings and the only difference I noticed was image quality. With zerolatency, there is already 0 bframe with rc_lookahead and slice_lookahead disabled. The latency in transcoding should be of minimal.
I’m really stuck in finding out what is causing the latency. Please advice if anyone has any suggestions. Thank you very much.