Why won't StreamIn TOP connect over ffmpeg TCP?

Hello! I have been trying to use the StreamIn TOP element for a while now and would like some further assistance. Upon receiving an answer from @malcolm in one of my older posts Chat-gpt giving undocumented information over StreamIn TOP element , I tried giving ffmpeg a shot, as I only tried Gstreamer and OpenCv before he told me that TouchDesigner actually runs ffmpeg under the hood.
Here is what I managed to achieve:
1st, I managed to connect locally, so working only with my own machine(windows), to TouchDesigner by running these commands
On the server, the first command I run on my machine:
ffmpeg -f dshow -video_size 640x480 -rtbufsize 50M -i video="Integrated Camera" -b:v 500k -preset ultrafast -tune zerolatency -c:v libx264 -f mpegts tcp://127.0.0.1:9999\?listen
Inside TD StreamIn TOP’s url field, the second command I run:
tcp://127.0.0.1:9999
This worked very well, as you can see here Watch 1-2-edited | Streamable , this is just a safe link to one of the videos I made for this post. I’m sorry to have to resort to videos as I can see the option for uploading them isn’t there, but I think in this case videos are going to explain much more than words, so if you can, please take a look at them, it took me a bit of time to make these :slight_smile:

2nd, I managed to establish and confirm connectivity to my Aws ec2 instance by running these commands
Inside the ec2 instance(the first command I run):
ffplay -listen 1 -fflags nobuffer -flags low_delay -strict -2 -codec:v h264 tcp://0.0.0.0:9999
After this command has run, I proceed with the following in my own machine:
ffmpeg -f dshow -video_size 640x480 -rtbufsize 50M -i video="Integrated Camera" -pix_fmt yuvj420p -b:v 500k -preset ultrafast -tune zerolatency -c:v libx264 -f mpegts -vf eq=brightness=0.1:contrast=1.2 tcp://ec2-instance-elastic-ip:9999
Here you can see how that works Watch 2-edited | Streamable

3rd This is where it actually gets funny because here I try the final step, to connect to the StreamIn TOP inside of my ec2 instance (and I fail, hence the making of this post and asking for some help).
Re-using the commands from the 1st attempt I try:
To run this command from my own machine first, setting up a server with the ?listen option:
ffmpeg -f dshow -video_size 640x480 -rtbufsize 50M -i video="Integrated Camera" -b:v 500k -preset ultrafast -tune zerolatency -c:v libx264 -f mpegts tcp://127.0.0.1:9999\?listen
After this command I proceed to enter TouchDesigner from within my ec2 instance and in the StreamIn TOP’s url I type:
tcp://my-public-ipv4:9999
However this does not work and I get a bunch of errors saying something about dropped buffers Watch 3-edited | Streamable .

The output is mostly like this(you can see it also in the video):

Input #0, dshow, from ‘video=Integrated Camera’:
Duration: N/A, start: 25086.457838, bitrate: N/A
Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 30 fps, 30 tbr, 10000k tbn
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (62% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 5 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (63% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 5 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (64% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 5 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (65% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 6 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (66% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 5 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (67% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 6 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (68% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 5 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (69% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 6 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (70% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 6 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (71% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 5 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (72% of size: 50000000 [rtbufsize parameter])! frame dropped!
Last message repeated 6 times
[dshow @ 0000026b6b57ab00] real-time buffer [Integrated Camera] [video input] too full or near too full (73% of size: 50000000 [rtbufsize parameter])! frame dropped!

While working on it I noticed something I think is important, that is that the first two attempts (1st and 2nd) use two very different commands doing two very different things. The first sets up a server on my own machine, with the first command having the afore mentioned \?listen option at the end of it, having the StreamIn TOP become its “client-side”, if my understanding of servers has increased over the past time.
And the second attempt doing the exact opposite, so creating a server within the ec2 instance with the first command ffplay -listen 1 and having my own laptop/machine act as the client-side, only it still sends the webcam data over.
I’m not a big expert on the subject but I think somewhere in here is where the problem could be.

To return to the final 3rd attempt please do note that it is behaving as the first.

I really don’t know where else to get any sort of help on this matter, I searched everywhere but very little to no-people are actually using this TOP which I think is the reason for why it is so hard right now to work with. That or maybe I’m just really not good at servers and I’m not seeing something obvious.
Please look at the videos as they are a fundamental part of the post, thank you very much for your time.

Edit: the first links required an additional step of registering an account, I’m sorry for this I didn’t know untill I clicked from within the post itself. I made new links, these should not require any unnecessary step.

Can you try using SRT as the protocol instead of the TCP protocol?