Greetings, I have been asking chat-gpt to help me out with an issue I’ve been having regarding connectivity of the StreamIn TOP through UDP protocol.
To my surprise the a.i. was able to give me information that I could not find on the wiki page Video Stream In TOP | Derivative , and I am now asking myself whether that information is correct or not.
Here is the output of a recent query:
To connect the Python UDP video stream to TouchDesigner’s Stream In TOP, we need to ensure that the video frames are sent in a compatible format. Touch Designer’s Stream In TOP expects raw image data in MJPEG (Motion JPEG) format over UDP.
Key Changes for Compatibility with TouchDesigner
1.MJPEG Encoding: TouchDesigner’s Stream In TOP supports MJPEG, so we must ensure frames are properly encoded in JPEG format.
2.Frame Headers: The Stream In TOP expects UDP packet to start with a frame header, including a magic number ( b’TDMI’ ).
3.Proper Frame Chunking: UDP has a maximum packet size ( 65507 bytes), so we may need to split large frames.
4.Port and IP Configuration: TouchDesigner listens on a specific IP/Port, typically 127.0.0.1:12345 by default.
Can you confirm this is true? Mainly the first two lines in the list. And if it is, where is it getting it from? It is quite rather odd to think about. However I was able to make great progress thanks to it and managed to actually connect to the StreamIn TOP with my webcam through UDP, the output is still somewhat jaggy but I think I can work on it in the coming days. The final goal would be to be able to connect to my AWS Ec2 instance (which has a much beefier setup) and work from there.
I have made a post on r/Python as well on this topic, if you are curious https://www.reddit.com/r/Python/comments/1jht5xf/python_script_causing_severe_glitch_effect_while/