I had been looking for such a solution this weekend.
Since i found one i thought to share it for future researchers.
PC 1 = Server. The PC in my lan having my movie stored
$ netcat -l -p 8111 <mymovie.mp4 # -p 8111 :port 8111. Can be any port
#OR
$ cat mymovie.mp4 |netcat -l -p 8111 # -l : listening mode
PC 2 = Client. The PC connected to my TV
$ netcat 192.168.1.116 8111 |vlc - # Change IP accordingly to find PC1
#OR
$ cat </dev/tcp/192.168.1.116/8111 |vlc - # in Bash
Instead of vlc
you can use mpv
or any other video player as soon as read from standard input is supported.
Next Weekend Task:
Serve mymovie.mp4
to client alongside with subtitles srt
file
VLC
has a server mode that you can use in Linux do this. Usingcat
to netcat won't make it speak the RTP protocol. – jordanm Jun 12 '13 at 5:12nc -l -p 5001 | mplayer -fps 31 -cache 1024 -
on the receiving side. – Piotr Kula Nov 14 '13 at 9:27nc: address already in use
– Braden Best Oct 19 '17 at 7:29