Why video call has no (even if there is, it is lower than human perception can discern) latency, but no matter what options of ffmpeg I tried to transmit video to a remote server, the lowest I can get is ~0.2s latency (estimated, not sure how to profile)?
What is the technology behind video call that allows it to be much faster than ffmpeg?
I tried sending to the server and make the server send back the stream using the following commands:
CLIENT:
termimal 1-
ffmpeg -pixel_format mjpeg -s hd720 -r 30 -i /dev/video1 -c libx264 -preset ultrafast -tune zerolatency -crf 18 -b 5M -f matroska -vf hflip tcp://X:5000
termimal 2-
mplayer -benchmark ffmpeg://tcp://Y:5000?listen
SERVER:
ffmpeg -i tcp://X:5000 -c copy -f matroska tcp://Y:5000
However, the video I got back has a slight delay of about 0.5s (estimated, not sure how to profile). Is sending to and fro different that causes it to have longer delay?
ffmpeg -f matroska -i tcp://X:5000 -c copy -f matroska tcp://Y:5000