How to stream a video with VLC in a LAN

36,751

Solution 1

Here is a command line to stream webcam:

vlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-width=640 :v4l2-height=480 --sout="#transcode{vcodec=h264,vb=800,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:8554/live.ts}" -I dummy

Solution 2

Go to Media > Stream and select appropriate tab (file, disk, network, capture device) > Stream

Then click Next and Check display locally (optional) and from the drop down box select http: and click add

Select desired port not in use and hit Next

Check activate transcoding and select desired output format (click tool icon next to dropdown box to configure bitrate and other specific settings) > Next > Stream.

If all is good, you should see your source displayed/playing locally.

To test the stream, go to another computer on your LAN and with VLC, go to media > open network stream and type http://serverIP:portnumber (replace serverIP and portnumber with actual values) and hit Play.

If all is good, your stream will connect and play quickly.

Share:
36,751

Related videos on Youtube

Luis Alvarado
Author by

Luis Alvarado

System Engineer Social Engineer Master in Pedagogy Master in Open Source CCNA Certified Linux Foundation Certified Former Askubuntu Moderator Stack Careers | Linkedin | Launchpad | Ubuntu Wiki - Random SE Stuff - Latin American Members | JC Race Award | Human Robot Award 74

Updated on September 18, 2022

Comments

  • Luis Alvarado
    Luis Alvarado over 1 year

    I wish to execute a video in my PC and stream it in the LAN so anybody can connect to it and watch it. What steps do I need to do to accomplish this in an easy manner.

  • Nephente
    Nephente over 8 years
    It's a good and correct answer, but could use a little bit of formatting. Kind of hard to follow.
  • Philippe Gachoud
    Philippe Gachoud about 7 years
    could you give some more explanations & give an example of reading the rtsp with vlc too on client side, it would enhance the answer which is great thx!
  • Philippe Gachoud
    Philippe Gachoud about 7 years
    @Nephente suggest an edit!