Page 6 of 7

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 4:31 pm
by ludespeedny
My window has a screen so yeah shooting through a wire mesh too.
The Pi is wired and I can stream a bit better in house, but get the same effect @720p wired from my PC, and only about 5 foot cable run from the Pi to router to PC
How can I tell the info like load mem usage etc...

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 4:36 pm
by FFAMax
ludespeedny wrote:My window has a screen so yeah shooting through a wire mesh too.
The Pi is wired and I can stream a bit better in house, but get the same effect @720p wired from my PC, and only about 5 foot cable run from the Pi to router to PC
How can I tell the info like load mem usage etc...
cat /proc/loadavg
free -m
And please, try to streamcast with -w 80 -h 60

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 4:40 pm
by ludespeedny
Ok, am using 80x60 now

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 4:41 pm
by FFAMax
Ok, it much better now. Remove {use-key-frames} and picture will be more pretty

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 4:46 pm
by FFAMax
So, as i can see, then we decrease network truffic stucks go away.
I can suggest else one test:
connect PC to Raspberry by direct link (ethernet patch-cord) (if PC lose IP-address then set up it manually from both side, ifconfig eth0 192.168.55.1 netmask 255.255.255.0 and at PC set up 192.168.55.2 - it's just example)
and repeat test with high resolution

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 4:46 pm
by ludespeedny
what would the command be to stream with what you just posted?

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 4:48 pm
by FFAMax
ludespeedny wrote:what would the command be to stream with what you just posted?
it's my example
current: raspivid -fps 30 -w 640 -h 480 -t 999999 --hflip -o - | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts{use-key-frames},dst=:8080}' :demux=h264
new: raspivid -fps 30 -w 640 -h 480 -t 999999 --hflip -o - | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8080}' :demux=h264

For better test at garden must play some cat with dog ;)

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 4:54 pm
by ludespeedny
Ok, put that in.
Yeah, I think tomorrow I'll point it at the road so we can have some action and no screen to go through.

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 5:01 pm
by FFAMax
ludespeedny wrote:Ok, put that in.
Yeah, I think tomorrow I'll point it at the road so we can have some action and no screen to go through.
Which address you write in your vlc player at PC? 72.135.99.235?
If yes, try to write local IP address of Raspberry Pi (ifconfig eth0| grep addr\:)

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 5:05 pm
by ludespeedny
in network I use either device name or local address, but here at work I use my IP and port that is forwarded to my device.

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 5:09 pm
by FFAMax
ludespeedny wrote:in network I use either device name or local address, but here at work I use my IP and port that is forwarded to my device.
Oh.. so you now have only remote access..
Well, try again to watch in high resolution then you will be in local network.
Just need to exclude network issue.

Re: Using VLC to stream from the camera - Help needed

Posted: Thu May 23, 2013 5:13 pm
by ludespeedny
Ok, I'll try that when home later.

Re: Using VLC to stream from the camera - Help needed

Posted: Fri May 24, 2013 1:38 pm
by ludespeedny
I was able to stream 720 pretty much flawless, 1080p had issues being stable, not sure why.
Is there a way to test the speed of the Pi's bandwidth

Re: Using VLC to stream from the camera - Help needed

Posted: Fri May 24, 2013 1:50 pm
by ludespeedny
I was able to get http streaming working with the armv7 nightly but was very slow.
I used mxplayer and installed the NEON codecs and I was able to do a 720p stream very well.

I am still trying RDP.
LeoWhite wrote:
ludespeedny wrote:Yeah, I actually used that blog to try, but there are a lot of VLC players on the app store so I picked 2 I thought would work.
I tries VLC Direct Pro, and Joe's VLC and they didn't work. I also tried MX Player, but no success.

Could you point me to the link for the VLC you use that works?
I use https://play.google.com/store/apps/deta ... betav7neon on my Nexus 7.

Leo

Re: Using VLC to stream from the camera - Help needed

Posted: Sat May 25, 2013 6:06 pm
by EnzioBrK
LeoWhite wrote: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
LOL It work very nice, I'm watching your back garden rignt now ;)

Re: Using VLC to stream from the camera - Help needed

Posted: Sat May 25, 2013 6:37 pm
by LeoWhite
EnzioBrK wrote:
LeoWhite wrote: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
LOL It work very nice, I'm watching your back garden rignt now ;)
You can watch the trains going by then :)

Re: Using VLC to stream from the camera - Help needed

Posted: Sun May 26, 2013 11:45 am
by LeoWhite
LeoWhite wrote: My camera board is currently connected up to a 512MB Model B I ordered at the same time. I might try connecting up to my Model A or one of my earlier 256MB Model Bs to see if I notice any stability issues with them.
Got a camera connected up to one of my 256MB Model B boards, being powered from one of my monitor's USB ports, and that seems to be streaming HLS happily enough. I did decide to install lighttpd instead of apache as its a bit more resource friendly, but I don't think that would make much difference to the reliability.

Re: Using VLC to stream from the camera - Help needed

Posted: Sat Jun 01, 2013 2:02 am
by wallarug
@LeoWhite

I was talking to you about a week ago about the vlc stream not working.

I am attempting to fix it today. I am starting with a fresh raspbain image.

Code: Select all

apt-get update && apt-get upgrade
raspi-config
apt-get install vlc
raspivid -t 10000 -vf -hf -o test.h264
This is my plan for 1 hour. Then I will test the streams into and out of the network to the WWW.

Re: Using VLC to stream from the camera - Help needed

Posted: Wed Jun 05, 2013 9:43 pm
by ppumkin
I have been trying this for an hour now and I cant get it to work.

I am running the Pi headless and I run the commands as user Pi (the build in one that comes with the image). I ran raspi-config as root and installed vlc as root, did upgrade and all that.

Do I need X to get vlc to work properly?

When I try to connect i get this in VLC on my client.
main debug: adding item `rtsp://192.168.1.104:8554' ( rtsp://192.168.1.104:8554 )
qt4 debug: Adding a new MRL to recent ones: rtsp://192.168.1.104:8554
main debug: rebuilding array of current - root Playlist
main debug: rebuild done - 2 items, index 0
main debug: processing request item: rtsp://192.168.1.104:8554, node: null, skip: 0
main debug: resyncing on rtsp://192.168.1.104:8554
main debug: rtsp://192.168.1.104:8554 is at 1
main debug: starting playback of the new playlist item
main debug: resyncing on rtsp://192.168.1.104:8554
main debug: rtsp://192.168.1.104:8554 is at 1
main debug: creating new input thread
main debug: Creating an input for 'rtsp://192.168.1.104:8554'
qt4 debug: IM: Setting an input
main debug: using timeshift granularity of 50 MiB, in path 'C:\Users\Dell\AppData\Local\Temp'
main debug: `rtsp://192.168.1.104:8554' gives access `rtsp' demux `' path `192.168.1.104:8554'
main debug: creating demux: access='rtsp' demux='' location='192.168.1.104:8554' file='\\192.168.1.104:8554'
main debug: looking for access_demux module: 1 candidate
live555 debug: version 2012.12.18
main debug: no fetch required for (null) (art currently (null))
live555 debug: connection error 404
live555 error: Failed to connect with rtsp://192.168.1.104:8554
main debug: no access_demux module matching "rtsp" could be loaded
using http does the same. But if i point my browser to there it starts to download a file... What am I doing wrong?

Re: Using VLC to stream from the camera - Help needed

Posted: Thu Jun 06, 2013 4:10 pm
by rbn
Hi. Followed this thread with interest, and the one http://www.raspberrypi.org/phpBB3/viewt ... 43&t=45368 Streaming Raspberry Pi Camera H264 into HTML over RTMP
I am interested in streaming the Pi Cam to my iphone, and have it working as per your instructions on sending an HLS file via http (The only way it will work on iOS). However as you point out it uses all the Pi resources, whereas the RTMP method is much lighter on the Pi, although it will not work with the iPhone.
I used the nginx web server so altered the references to /var/www/ to /usr/share/nginx/www , which is the location of the default www directory for this server. I also had to make sure that there were write permissions for vlc to create the ts files.
I'm wondering if it is possible to stream HLS to http using ffmpeg instead of VLC, and whether this will be less demanding on the Pi, but I have not been able to work out how to do it.

As a second comment, there are one or two streaming threads here now. It would be good to pull them all together.
The summary here http://www.mybigideas.co.uk/RPi/RPiCamera/ is a good starting point.

Re: Using VLC to stream from the camera - Help needed

Posted: Thu Jun 06, 2013 4:32 pm
by towolf
rbn wrote: I'm wondering if it is possible to stream HLS to http using ffmpeg instead of VLC, and whether this will be less demanding on the Pi, but I have not been able to work out how to do it.
It's very simple. Check this thread: http://www.raspberrypi.org/phpBB3/viewt ... 38&t=45893

Together with nginx it serves HLS stream with single digit CPU usage on the Raspberry Pi.

Re: Using VLC to stream from the camera - Help needed

Posted: Sun Jun 30, 2013 5:34 pm
by chorlton2080
This works great at 30fps, but not at all at 10fps! Can't understand that.

Anyway, I don't need the high fps, so I was wondering if anyone can describe how I might use raspistill to output a file which could then be picked up and served by Apache. The problem I have is that because the raspistill file (which I reference in Apache) is constantly being rewritten, the webpage rarely displays anything other than a single raster line.

Re: Using VLC to stream from the camera - Help needed

Posted: Tue Jul 02, 2013 1:35 pm
by wallarug
ludespeedny wrote:I was able to stream 720 pretty much flawless, 1080p had issues being stable, not sure why.
Is there a way to test the speed of the Pi's bandwidth

Saw this post and decided to investigate:

http://linuxaria.com/article/tool-comma ... ux?lang=en

YES, there is a way to test the Pi's bandwidth... you may need two linux boxes though.

On Client machine:

Code: Select all

iperf -c 10.1.1.1 -d
where 10.1.1.1 is the IP of the server

On Server machine:

Code: Select all

iperf -s
When I ran the test, I got the bandwidth of the Pi to be around 18 - 22 Mbit/s (when the Pi was the server and MacBook2010 was client (in virtual machine BT5R3).)

Adding to my setup in more detail:

Pi --> 15 metre cat5e cable --> switch (1GBit) --> router (1GBit) --> wireless spectrum (802.11n) over 7 metres through 4 walls --> Windows 8 MacBook2010 --> Virtual Machine running BT5R3


I think I will do another test tomorrow from a 50 cm cable into raspi and cat5e cable to non-virtual machine and see if I get better results.

Re: Using VLC to stream from the camera - Help needed

Posted: Fri Aug 02, 2013 3:22 pm
by technoducky
LeoWhite wrote:
ProgDrums wrote:Working perfectly now. Thanks again.

Is there a way to stop the feed timing out?
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)
Using -t 0 will set an infinite timeout.
See RaspiVid.c at userland repo: https://github.com/raspberrypi/userland ... id.c#L1129

Re: Using VLC to stream from the camera - Help needed

Posted: Sun Sep 08, 2013 2:55 pm
by Uriah Heep
For simple streaming on the LAN, I didn't see much point in using VLC on both server and client, so I did it this way:

I installed socat as a better netcat (and is something I'm familiar with) on both client and server. The steps below assume the use of socat but could be modified for netcat.

Code: Select all

 # apt-get install socat
Use the client machine's package manager to install socat on it then set up a listener for the incoming stream and send its output to VLC (or cvlc if preferred):

Code: Select all

$ socat TCP4-LISTEN:5001 - | vlc stream:///dev/stdin :demux=h264
and then fire up the camera on the Pi:

Code: Select all

$ raspivid -t 0 -o - | socat - tcp:your.client.ip.address:5001
With these values there's a couple of seconds of latency but with the camera pointing out of an open window I can watch insects fly past. CPU usage shows as 60% idle.