Hi all.
I've been working on this for the past few hours and, despite some success, have been unable to get it working. I now need to get back to work, so hopefully someone has a bright idea.
I'm doing the following:
raspivid -w 400 -h 300 -t 1000000 -o - | cvlc -vvv - --noaudio --no-sout-audio --sout '#standard{access=http,mux=ts,dst=:8090}'
Which *should* broadcast the video output from the camera on port 8090 and I should be able to then read that on my laptop by looking at http://<pi address>:8090
BUT, I'm getting the following error (ad nauseum) on the Pi:
[0x1f16f60] main input debug: Buffering 0%
It could be something to do with the way the standard input stuff works as the following _does_ work to stream a static file:
cvlc -vvv test.h264 --sout '#standard{access=http,mux=ts,dst=:8090}'
Does anyone have any ideas? Cos I'm all out!
- recantha2
- Posts: 348
- Joined: Wed Nov 14, 2012 9:34 am
- Location: Potton, Bedfordshire
- Contact: Website Facebook Twitter
Using VLC to stream from the camera - Help needed
--
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Re: Using VLC to stream from the camera - Help needed
Hiya,
After much searching I managed to get this working using
raspivid -o - -t 99999 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264
its the ':demux=h264' that seemed to get things sorted.
This now lets me stream directly from the camera, over the network and to my PC running VLC!
Hope it works for you!
Now I just need to reduce the buffering to make it a bit more real time..
Leo
After much searching I managed to get this working using
raspivid -o - -t 99999 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264
its the ':demux=h264' that seemed to get things sorted.
This now lets me stream directly from the camera, over the network and to my PC running VLC!
Hope it works for you!
Now I just need to reduce the buffering to make it a bit more real time..
Leo
- recantha2
- Posts: 348
- Joined: Wed Nov 14, 2012 9:34 am
- Location: Potton, Bedfordshire
- Contact: Website Facebook Twitter
Re: Using VLC to stream from the camera - Help needed
Thank you!!! I shall try it out right now!
--
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Re: Using VLC to stream from the camera - Help needed
Hope it works for you!
I've got a stream running at http://109.145.254.207:8091/streaming/stream.m3u8 at the moment that can be watched via VLC.
See how long the RPi can stay up for if multiple people connect!
Leo
I've got a stream running at http://109.145.254.207:8091/streaming/stream.m3u8 at the moment that can be watched via VLC.
See how long the RPi can stay up for if multiple people connect!
Leo
Last edited by LeoWhite on Sat May 18, 2013 9:09 pm, edited 1 time in total.
- recantha2
- Posts: 348
- Joined: Wed Nov 14, 2012 9:34 am
- Location: Potton, Bedfordshire
- Contact: Website Facebook Twitter
Re: Using VLC to stream from the camera - Help needed
Hey look at that! A train just went past 

--
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Re: Using VLC to stream from the camera - Help needed
Heh, that's about all that does! Trains, birds and the occasional fox.recantha2 wrote:Hey look at that! A train just went past
Re: Using VLC to stream from the camera - Help needed
I used your revised command and tried opening a stream in a web browser (safari on mac) using http://myip:8090 and the browser just tried to constantly download the stream like it was a file. What am I doing wrong here?
Re: Using VLC to stream from the camera - Help needed
I tried your revised command and when I opened up http://ipofpi:8090 in a web browser (safari on a mac) it just tried to endlessly download the stream like it was a file. tried it in firefox as well to no effect. What am I doing wrong here?
Re: Using VLC to stream from the camera - Help needed
LeoWhite wrote:Hiya,
After much searching I managed to get this working using
raspivid -o - -t 99999 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264
its the ':demux=h264' that seemed to get things sorted.
This now lets me stream directly from the camera, over the network and to my PC running VLC!
Hope it works for you!
Now I just need to reduce the buffering to make it a bit more real time..
Leo
Did you compile cvlc? Or did you get it from a disto repo?
Re: Using VLC to stream from the camera - Help needed
I've just tried that but get the error -bash: cvlc: command not foundLeoWhite wrote:Hiya,
After much searching I managed to get this working using
raspivid -o - -t 99999 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264
its the ':demux=h264' that seemed to get things sorted.
Re: Using VLC to stream from the camera - Help needed
Do you have VLC installed? you may need to do 'sudo apt-get install vlc' to install it.ProgDrums wrote:I've just tried that but get the error -bash: cvlc: command not foundLeoWhite wrote:Hiya,
After much searching I managed to get this working using
raspivid -o - -t 99999 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264
its the ':demux=h264' that seemed to get things sorted.
Re: Using VLC to stream from the camera - Help needed
D'oh! Thanks. I'm new to all of this.
Re: Using VLC to stream from the camera - Help needed
Not a problem! hope that sorts it for you.ProgDrums wrote:D'oh! Thanks. I'm new to all of this.
Re: Using VLC to stream from the camera - Help needed
Working perfectly now. Thanks again.
Is there a way to stop the feed timing out?
Is there a way to stop the feed timing out?
Re: Using VLC to stream from the camera - Help needed
I think the only way is to increase the timeout. So put a few 9s in the timeout value (I'm using -t 9999999 at the moment)ProgDrums wrote:Working perfectly now. Thanks again.
Is there a way to stop the feed timing out?
- recantha2
- Posts: 348
- Joined: Wed Nov 14, 2012 9:34 am
- Location: Potton, Bedfordshire
- Contact: Website Facebook Twitter
Re: Using VLC to stream from the camera - Help needed
The rtsp version works better than the http version. There's still a fair amount of distortion but it's a good 'other' way of getting streaming working.
--
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Re: Using VLC to stream from the camera - Help needed
Yes I found the rtsp version a bit better, unfortunately I can't get it through my firewall without exposing all the other ports on the RPi! So running a http stream for now!recantha2 wrote:The rtsp version works better than the http version. There's still a fair amount of distortion but it's a good 'other' way of getting streaming working.
- recantha2
- Posts: 348
- Joined: Wed Nov 14, 2012 9:34 am
- Location: Potton, Bedfordshire
- Contact: Website Facebook Twitter
Re: Using VLC to stream from the camera - Help needed
My stream is now online at
http://86.136.128.196:8080
http://86.136.128.196:8080
--
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Re: Using VLC to stream from the camera - Help needed
Think I managed to get one or two frames before it locked up!recantha2 wrote:My stream is now online at
http://86.136.128.196:8080
I notice my stream seems to be around 3 Mb/s so could be a little heavy on the network connection!
- recantha2
- Posts: 348
- Joined: Wed Nov 14, 2012 9:34 am
- Location: Potton, Bedfordshire
- Contact: Website Facebook Twitter
Re: Using VLC to stream from the camera - Help needed
Ahhhh, mine's over wifi. Probably why I'm getting a few problems!
--
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Michael Horne - @recantha
Raspberry Pi blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam
Website: http://camjam.me
Facebook: https://www.facebook.com/cambridgeraspberryjam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam
Re: Using VLC to stream from the camera - Help needed
That might introduce some issues! I've got my RPi connected via Ethernet at the moment, haven't tried wireless yet.recantha2 wrote:Ahhhh, mine's over wifi. Probably why I'm getting a few problems!
Re: Using VLC to stream from the camera - Help needed
I can't seem to get any streaming to work from my RPi.
NC fills the buffer then bombs out.
VLC says its casting over HTTP but I can't see the streams. I can however see the streams listed above.
Maybe a dumb question, when my RPi is on the same network as my PC do I use the Public IP of my Internet connection or my local IP for my RPi 192.168.xx.xx?
Also my putty session locks up after the 99999 timer finishes and I have to restart my RPi to reestablish a connection.
NC fills the buffer then bombs out.
VLC says its casting over HTTP but I can't see the streams. I can however see the streams listed above.
Maybe a dumb question, when my RPi is on the same network as my PC do I use the Public IP of my Internet connection or my local IP for my RPi 192.168.xx.xx?
Also my putty session locks up after the 99999 timer finishes and I have to restart my RPi to reestablish a connection.
Re: Using VLC to stream from the camera - Help needed
You should use the local IP for your RPi in that case.momentum wrote:I can't seem to get any streaming to work from my RPi.
NC fills the buffer then bombs out.
VLC says its casting over HTTP but I can't see the streams. I can however see the streams listed above.
Maybe a dumb question, when my RPi is on the same network as my PC do I use the Public IP of my Internet connection or my local IP for my RPi 192.168.xx.xx?
To get the stream working via the public IP of your internet connection you'd have to enable port forwarding in your router so map the external port to your Raspberry Pi.
Haven't seen that myself, but lately I've been running my tests on MobaXterm (http://mobaxterm.mobatek.net/) as it has an X server built in (useful for running the VLC graphical interface)momentum wrote: Also my putty session locks up after the 99999 timer finishes and I have to restart my RPi to reestablish a connection.
Re: Using VLC to stream from the camera - Help needed
Some more clues to what it going on... It seem that when I run the command to start streaming it kills my lan and USB ports on the RPi until I reboot it. This is why I was seeing it die in Moba and Putty. This is obviously why its not streaming also... Anyone else having this problem? Going to try to find another power supply.. maybe too much current draw.
Re: Using VLC to stream from the camera - Help needed
Well I've now gotten HLS working! So my new stream is at http://109.145.254.207:8091/streaming/stream.m3u8
and I launched it using
Which is based on some examples found on the web and previously mentioned in these forums.
This does seem to consume a lot more CPU time than the raw HTTP/RTSP stream tho..
Leo
and I launched it using
Code: Select all
raspivid -o - -w 920 -h 540 -t 9999999 | vlc -v -I "dummy" stream:///dev/stdin :sout="#std{access=livehttp{seglen=10,delsegs=true,numsegs=5, index=/var/www/streaming/stream.m3u8, index-url=http://109.145.254.207/streaming/stream-########.ts}, mux=ts{use-key-frames}, dst=/var/www/streaming/stream-########.ts}" :demux=h264
This does seem to consume a lot more CPU time than the raw HTTP/RTSP stream tho..
Leo