Video Stream In TOP Delay and Stutter

We have an installation built with TouchDesigner that uses a live 8K camera feed streamed into touch via the Video Stream In TOP. When the app is started, the video stream comes into touch smooth but with a delay. As the app runs the video stream starts to stutter. The amount of time the app runs before the stutter begins seems to be at random. Closing touch and relaunching does get the stream to play smoothly but will eventually start stuttering again. Whether the camera feed is stuttering or not, the rest of the TouchDesigner app is running smoothly at 60 FPS. Navigating to the IP address of the camera in a web browser pulls up a live view of the camera feed. The web view of the camera has no delay and never stutters like it does in Touch so the issues we are seeing are happening in the video stream in TOP. Is there settings in the stream in TOP to prevent this issue?

Here is the full setup:

TouchDesigner 2023.11880

Video Stream In TOP Settings
Play:
Mode: Server

Image:
Deinterlace: Even
Field Precedence: Odd
Bottom Half is Alpha: Off

Tune:
Pre-Read Frames: 3
Max Decode CPUs: 6
Network Buffer Size (KB): 0
Network Queue Size: 0
Disable Buffering: Off
Hardware Decode: On

PC Specs:

  • 4U Rack Server Chassis CX4200a 4U 20in Rackmount Chassis - EATX and 360mm AIO
  • Motherboards ROG Strix Z790-E Gaming WIFI II, Intel® Z790 Chipset, LGA 1700, ATX
  • Processors Core™ i7-14700K 20 (8P+12E) Cores 2.5 - 5.6GHz Turbo, LGA 1700, 253W MTP
  • Memory 32GB (2 x 16GB) FURY Beast DDR5 5200MHz, CL40, Black, DIMM
  • Graphics Cards GeForce RTX™ 4070 SUPER 12G VENTUS 2X OC, 2505 - 2520MHz, 12GB GDDR6X
  • M.2 SSD1TB MP600 ELITE, w/ Heatsink, 7000 / 6200 MB/s, 3D TLC NAND, PCIe NVMe 4.0 x4, M.2 2280 SSD
  • Network Interface Cards ST1000SPEXD4, 1Gbps, 2xRJ45, PCIe
  • Operating Systems Windows 11 Pro 64-bit Digital OEMAVA

Camera:
Model BOSMA G1 Pro DC0201

Streaming:
Video is broadcast as 8k HLS stream as h.265 MP4 stream at a variable bit rate. The camera is connected to the PC via ethernet from the camera to a fiber line then back to ethernet into the PC.

Hey,
Are you able to set the parameters back to default and see if it improves things? I would expect setting the network settings so low could certainly break the connection. Also I’d suggest increasing the Pre-Read Frames to something higher as well.

I switch from HLS to SRT streaming and also updated the settings to the following:

pre-read frames: 3
max decode CPUs: 6
network buffer size: 32
network queue size: 2

So far it seems stable but going to let it run to see if the stutter starts again. If the stutter happens again I’ll try increasing the pre read frames settings. We set those settings that low because the default settings caused the camera feed to stutter immediately. Bringing the settings down seemed to help

Do these new network settings seem better in your opinion? Do you recommend RTSP, HLS, or SRT for a setup like this?

Appreciate the help!

I would still recommend the default values offhand. Those are the default that the underlaying library uses.

I would say HLS or SRT are the better options likely.

I set these parameters back to the default values and the video stream still ends up stuttering after some time. I am able to launch the app in the morning and the stream will remain stable for most of the day, however the next morning the stream is usually stuttering until touch is restarted.

Can you try increasing the Pre-Read Size. This is the buffer size, so possibly having a larger buffer should help with this.

I up’d the pre-read frames setting from 5 to 8 but the stream still starts stuttering after about 24 hours or so

Can you take a video recording of the Info CHOP pointing to your Video Stream In TOP when the stuttering is occuring?
As a test, can you also turn up the pre-read to 50. Just to help isolate this.
Thanks