MJPG and crontab
Posted: Sat Dec 07, 2013 11:48 am
Hi there,
I hope someone can help me out with this.
I have followed this guide here:
http://blog.miguelgrinberg.com/post/how ... spberry-pi
and everything is working like a charm as I can watch the stream in my browser.
I am now trying to automate the all process by using:
which I have edited as follows:
Basically after rebooting my RPI I can see the new folder /tmp/stream, by running top I can see the raspistill is running but not mjpg. I am sure I am doing something wrong but I wouldn't know what though. I have also tried to edit crontab as follows:
where stream.sh is a script which I have edited as follows:
then I have given the right permission with:
The script itself is working, indeed if I run it I can watch the video in my browser. But I won't work with crontab.
I would appreciate if someone could help me out as I am really struggling now
Many thanks in advance.
I hope someone can help me out with this.
I have followed this guide here:
http://blog.miguelgrinberg.com/post/how ... spberry-pi
and everything is working like a charm as I can watch the stream in my browser.
I am now trying to automate the all process by using:
Code: Select all
crontab -eCode: Select all
@reboot mkdir /tmp/stream && raspistill --nopreview -w 640 -h 480 -q 5 -o /tmp/stream/pic.jpg -tl 100 -t 9999999 -th 0:0:0 && LD_LIBRARY_PATH=/usr/local/lib mjpg_streamer -i "input_file.so -f /tmp/stream -n pic.jpg" -o "output_http.so -w /usr/local/www"
Code: Select all
@reboot mkdir /tmp/stream && raspistill --nopreview -w 640 -h 480 -q 5 -o /tmp/stream/pic.jpg -tl 100 -t 9999999 -th 0:0:0 && home/pi/stream.sh"
Code: Select all
#!/bin/bash
LD_LIBRARY_PATH=/usr/local/lib mjpg_streamer -i "input_file.so -f /tmp/stream -n pic.jpg" -o "output_http.so -w /usr/local/www
Code: Select all
sudo chmod 755 /home/pi/streamI would appreciate if someone could help me out as I am really struggling now
Many thanks in advance.