Things you would need.

  • tee
  • youtube-dl
  • a media player that can read from stdin
  • netcat

I used mpv as my example for this

So on the main host that has tee command.

youtube-dl -o - | tee >(nc -l 9000) | mpv -

This will start downloading the file and netcat will hold up the buffer until the client connects then it will start playing the video

On the client side they need to type in

nc host 9000 | mpv -

or on windows

nc host 9000 > mpv -

I have only tried this on local lans so I have no clue how bad the latency will be over the Internet, but I feel it would be about the same as the ping between the clients. There might be a small chance for the videos not to match up correctly. This isn’t too bad for a quick way to watch videos between people