Hi!
I want to stream some video with VLC over the internet and other networks with high packet loss rates. Since there seems to be no FEC support until now, i thought it might be a good idea to stream the data through a TCP-tunnel and buffer a few seconds on the receiver side. I implemented the following concept in a program:
vlc sends UDP packets to 127.0.0.1
my program receives them and sends them via TCP to the target computer 49.216.114.71
Another instance of my program runs on this computer and receives these TCP packets
and forwards them as UDP packets to 127.0.0.1
where another instance of vlc is waiting for them.
So i assume, that there's no loss of UDP packets, since they're only used for communication to the localhost address. And the TCP protocol guarantees, that there's no loss or reordering of packets on the actual way between both computers. So far the theory.
Unfortunately, it seems that this doesn't work with high bandwidth streams in practise, not even for communication from localhost to localhost. There are always visual artifacts in complex scenes. My program already makes sure, that the time intervals between the packets are exactly the same on both the sender and the receiver side (the timer precision is microseconds). There is no high cpu or network load at all (~20% cpu caused by all programs together). In contrast to that, streaming from VLC to another instance of VLC which streams to another instance to VLC, which streams..., works perfectly without a single visual artifact.
So i ask you and myself: What could be wrong in my implementation, if the timing is perfect and there is no loss of packets and i still don't get the same result? Is there any kind of feedback channel or some information, which is not transportet on the "normal" port?
Thank you in advance for all kinds of help!