Page 1 of 1

Automatically start raspivid to rtsp streaming

Posted: Wed May 22, 2013 7:36 pm
by fireblade900rr
Hi !

Im not very familar with linux...

i tried to start the command

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

automatically at startup using a script in /etc/init.d/

I think its working cause the camera led is on for a second at boot up but then it turns off and there's no transmission.

How do i keep it running ?

Re: Automatically start raspivid to rtsp streaming

Posted: Thu May 23, 2013 8:57 am
by Trav
I can't answer your question directly, but if you can get a bit of information from the start up kernel messages then the Linux community here will be able to offer more suggestions.
After rebooting, from a terminal session type "dmesg" (without quotes). This will scroll a large amount of infromation past you, but you should be able to scroll back and look for references to raspivid and/or cvlc. If you copy and paste all these lines, plus one or to before and after, into a reply here we can perhaps suggest a solution, or at least a few more things to try.

Re: Automatically start raspivid to rtsp streaming

Posted: Thu May 23, 2013 9:06 am
by RaTTuS
put the command in /etc/rc.local
and use full paths for the instructions

that is how I would do it

Re: Automatically start raspivid to rtsp streaming

Posted: Thu May 23, 2013 7:27 pm
by fireblade900rr
dmesg has no messages containing raspivid or vlc

i've put it in the rc.local with full path, but that doesnt work too.

Its always the same the led switches on for a second and turns out...

is it that hard to execute a command line after boot ?

Re: Automatically start raspivid to rtsp streaming

Posted: Thu May 23, 2013 9:14 pm
by Trav
A script in /etc/init.d must have the execution bit set e.g. sudo chmod +x scriptname
If you paste the command into /etc/rc.local, you have to do the same for rc.local i.e. sudo chmod +x /etc/rc.local otherwise the system will ignore them. The fact that there is no mention in dmesg indicates that the script is not being run rather than failing.

Re: Automatically start raspivid to rtsp streaming

Posted: Fri May 24, 2013 12:25 pm
by fireblade900rr
The scripts are executable an theyre starting, if put the line

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

7 times in a scipt the led at the camera board will turn on 7 times...but just for a second...

the only problem is to keep it running...

Re: Automatically start raspivid to rtsp streaming

Posted: Sat Jul 20, 2013 7:38 pm
by walolinux
I had the same problem but runnig ffmpeg, i solved it putting the full path to the bynary:

Code: Select all

raspivid -t 9999999 -w 960 -h 540 -fps 25 -b 500000 -o - | /usr/local/bin/ffmpeg -i - -vcodec copy -an -metadata title="Streaming desde raspberry pi" -f flv rtmp://ip/live/web
http://www.alvarolara.com/2013/07/20/em ... pberry-pi/

In your case, put the path to cvlc and tell me if it is running, you can execute:

Code: Select all

whereis cvlc