Reputation: 187
I have an IP camera that i can view in VLC via the link rtsp://admin:admin@192.168.1.199:554/mpeg4/ch0/main/av_stream
but i noticed there is a significant delay to the video in vlc compared to when the camera is viewed in the NVR. The vlc has a delay of 4-6 seconds while in the nvr its barely noticeable at all less than 1 second of delay.
I need to know why that is so i can then plan out what methods/libraries to use in the program im going to make. It helps to know why so that a possible work aroung maybe explored.
Is this a problem inherent to vlc or a limitation to rtsp?
Is there any way i can reduce this delay?
Upvotes: 2
Views: 19087
Reputation: 98
VLC, Ubuntu version at least, has a caching option, set by default a 1000ms, if you have lag you can decrease this value to 100ms and check the video quality.
Upvotes: 0
Reputation: 1068
First get sure that your camera has no issue with getting multiple streams. Deactivate your camera on NVR and check if you have a better latency.
VLC use per default rtsp/rtp over TCP so force vlc to use rtsp/rtp over UDP just google about the vlc argument. And verify if u have better latency. As BijayRegmi wrote be aware of the default buffering.
Also you can try ffplay from ffmpeg libary and open the rtsp stream with it. There u have more informations about the health of the stream like package loss etc. Also this gives u an second option to verify your stream/latency, then u should know wich part produce the latency.
Upvotes: 2