fireblade900rr
Posts: 3
Joined: Wed May 22, 2013 7:31 pm

Automatically start raspivid to rtsp streaming

Wed May 22, 2013 7:36 pm

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 ?

Trav
Posts: 20
Joined: Mon Mar 05, 2012 10:02 pm

Re: Automatically start raspivid to rtsp streaming

Thu May 23, 2013 8:57 am

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.
1st Batch Model B (256M) running Raspbian, Pibrow case, with RaspiCam.
Model A (256M) running Raspbmc, caseless.

User avatar
RaTTuS
Posts: 10538
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Automatically start raspivid to rtsp streaming

Thu May 23, 2013 9:06 am

put the command in /etc/rc.local
and use full paths for the instructions

that is how I would do it
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

fireblade900rr
Posts: 3
Joined: Wed May 22, 2013 7:31 pm

Re: Automatically start raspivid to rtsp streaming

Thu May 23, 2013 7:27 pm

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 ?

Trav
Posts: 20
Joined: Mon Mar 05, 2012 10:02 pm

Re: Automatically start raspivid to rtsp streaming

Thu May 23, 2013 9:14 pm

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.
1st Batch Model B (256M) running Raspbian, Pibrow case, with RaspiCam.
Model A (256M) running Raspbmc, caseless.

fireblade900rr
Posts: 3
Joined: Wed May 22, 2013 7:31 pm

Re: Automatically start raspivid to rtsp streaming

Fri May 24, 2013 12:25 pm

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...

walolinux
Posts: 2
Joined: Wed Jan 09, 2013 7:53 pm

Re: Automatically start raspivid to rtsp streaming

Sat Jul 20, 2013 7:38 pm

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

Return to “Camera board”