I’ve tried several different IP cameras and found that when viewed through touch’s video stream in TOP there’s a good 3ish seconds of latency… but when I view them through the onvif viewer, there’s almost no latency at all. No matter what I do with the video stream in TOP, I can’t seem to even come close to the latency offered by other viewers. Am I missing something, or is this just a limitation of the video stream in top?
thanks!
michael
Usually bigger latency is because of a bigger default buffer. And a bigger buffer is used to prevent hiccups in the stream if the connection speed drops temporarily.
Did you try changing the default buffer settings of the Video Stream In TOP to a lower value?
This would be the Network Buffer Size
and Network Queue Size
parameters on the Tune
page.
Perhaps also tune down the Pre-Read Frames.
Yeah, I reduced them all as much as it would let me. Still a good 3 second latency. It seems like there’s some internal buffer that I can’t modify… or perhaps this is a bug. Neither VLC nor onvif have this problem.
So far I’ve been unable to get VLC to perform better than our node. Are you using any setting in VLC to reduce it’s latency?
I’m experiencing the same issue. The live browser view has no latency. Although with the rtsp command : rtsp://169.254.136.29/axis-media/media.amp i have a 2-3 seconds delay in OBS or Touchdesigner.
I am able to get rid of the delay in OBS by using the gStreamer plugin (see this thread : shorturl.at/gmCGT)
I assume there would be a way to capture the feed with no latency in TouchDesigner directly, but the VideoStreamIn TOP with the rtsp link doesn’t seem to do this.
Any idea on how to improve this?
Thanks
Noticing these issues as well. There is very little latency when viewing my IP camera through their browser admin portal as well as a desktop app called IP Camera Viewer 4 but there is about a 2-3 second latency with VLC and Touchdesigner. I’ve spent hours trying to figure out how to get less latency in VLC and Touchdesigner and haven’t had any luck. I’ve tried using other streams as well like MJPEG ones but I can get them to work at all.
Edit:
I take that back! It seems that messing with Network Buffer Size and Network Queue Size did improve the latency. The settings I used are:
Network Buffer Size: 32
Network Queue Size: 2
There’s some green on the screen right when it starts but it clears up and seems to run fine!!
Edit 2:
Ok, so another thing I’m noticing is that the stream starts to get really delayed inside my large project. The fix I’ve found is to have a separate instance of TD running that reads in the RTSP feed and then sends this out to my project over Spout or whatever out TOP you wanna use. So far this seems to perform a lot better. Not really sure why the delay gets bigger and bigger in a large project.