Stream the #RaspberryPi camera module to VLC media player

Leo White, on the Foundation forum, has provided the answer to a question I asked about streaming from the Pi camera to VLC.

There are two alternatives. One is over http, the other uses the rstp protocol.

Here’s the HTTP version:

raspivid -o - -t 9999999 -w 800 -h 600 --hflip | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8080}' :demux=h264

And here’s the RTSP version:

raspivid -o - -t 9999999 -w 800 -h 600 --hflip | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8080/}' :demux=h264

Now, the RTSP stream is better quality but the HTTP stream lets you do things like allowing remote clients to connect to it through your router.

To open up the streams, use:

http://<pi ip address>:8080

or

rtsp://<pi ip address>:8080

7 comments for “Stream the #RaspberryPi camera module to VLC media player

  1. The good news is the streaming works for me. The bad news is nothing else does. Not the mouse, not the keyboard. Just the streaming. The only option I seem to have once started is to pull the plug.

      • I’m using a duracell phone charger power supply. I’m thinking it’s likely a problem along those lines as prior to even just connecting the camera it was 24×7 up and running – no problems.

        • Ah. Yes, I reckon that’s your problem. It’s a question of amps and how much you are supplying. You need a 1A supply to power the camera, keyboard and mouse.

          • Got a 1.5 A power supply now. Everything’s ALMOST working.

            Webcam fills the screen. Everything else locked out. I’ve got three terminal windows open and I tried typing:

            pkill raspivid

            Nothing.

            I think I need to change the resolution, perhaps, but, not sure how.

            BTW, It’s not an HDMI monitor. It’s a PC monitor with a DVI port. Using an HDMI / DVI adapter.

  2. Ok, after some looking, here’s what I’ve found works for me. VLC keeps giving me MRL errors. Some investigation suggested I try Totem Player (which on my system – Linux Mint 15 is “Videos” under Sound / Video on the Apps Menu. I setup rtsp://ip_adress:8080. That has been working every time for me. What exactly accounts for that difference? Beats me. Haven’t tried http. YMMV (Your Mileage May Vary)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.