I'm trying to use netcat on Linux server to stream video to my windows client using VLC

I started running netcat on Linux:

 cat /media/HD1/myMovie.mkv | nc -l 8668

In VLC Windows Client I tried to:

Open VLC > Open network stream vlc > rtp://@serverIP:8668

Without success.

  • VLC has a server mode that you can use in Linux do this. Using cat to netcat won't make it speak the RTP protocol.
    – jordanm
    Jun 12, 2013 at 5:12
  • Someone told me that VLC server is heavy and i could try to use mplayer instead. Do you agree? (i'm using Raspberry pi)
    – Makah
    Jun 13, 2013 at 22:02
  • nc -l -p 5001 | mplayer -fps 31 -cache 1024 - on the receiving side.
    – Piotr Kula
    Nov 14, 2013 at 9:27
  • @ppumkin nc: address already in use Oct 19, 2017 at 7:29
  • Port is in use by something else? try another port number
    – Piotr Kula
    Oct 19, 2017 at 14:39

2 Answers 2


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
$ cat mymovie.mp4 |netcat -l -p 8111  # -l : listening mode

PC 2 = Client. The PC connected to my TV

$ netcat 8111 |vlc -         # Change IP accordingly to find PC1
$ cat </dev/tcp/ |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 stream feature to redirect video by network. You need execute this command on server:

vlc -vvv zzx.rmvb  --sout '#std{access=mmsh,mux=asfh,dst=:8080}'

And then,you can execute this command on client:


As the above,I use mms/mmsh to redirect video by network. Vlc support other stream methods. For example:http,udp,rtp/rtsp and so on. Please take a look at the document of vlc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.