Why is WebRTC latency so less

277 views
Skip to first unread message

CheWei Sung

unread,
Jul 23, 2021, 4:49:34 AM7/23/21
to meetecho-janus

Hello, I just try to install Janus WebRTC server and run streaming test successfully. I used ffmpeg and my webcam for input streaming.

ffmpeg -f v4l2 -framerate 25 -video_size 1920x1080 -i /dev/video0 -vcodec libx264 -pix_fmt yuv420p   -an -g 5  -preset ultrafast -tune zerolatency  -sdp_file video.sdp -f rtp rtp://<IP>:6004?pkt_size=1200

The latency from source to browser where I can see is about 100ms.

I also play the rtp streaming on ffplay, the latency is 800ms:

ffplay -probesize 32 -sync ext -protocol_whitelist file,udp,rtp -nobuffer 0  video.sdp

ffmpeg->Janus WebRTC server->HTTP server->browser latency is only 100ms, but
ffmpeg->ffplay latency is 800ms. Anyone can tell me why the WebRTC has more steps but less latency than playing on ffplay?

Lorenzo Miniero

unread,
Jul 23, 2021, 6:00:10 AM7/23/21
to meetecho-janus
ffplay does buffering, I believe: WebRTC doesn't.

L.
Reply all
Reply to author
Forward
0 new messages