HELP to use a cam with MM PLEASE
This post is deleted!
it works well but now i tried To start mjpg on boot in vain. I used the crontab but how To write it with the options??
@axel - Create a script with your command, name it something obvious like
startcam.sh. Make it executable with
chmod +x startcam.shand then use pm2 to autostart and maintain the script:
pm2 start startcam.shWhen you’re satisfied with pm2’s handling, save the state:
In the future, please use the markdown features of the board when posting code & logs.
i did it but the status is not online but stopped. After a moment, the status changed To errored!! Help please…
@axel - Okay. Let’s skip PM2 for now and just concentrate on getting your script running.
startcam.shscript and paste in the mjpg_streamer command:
mjpg_streamer -o “output_http.so -w ./www” -i “input_uvc.so -f 1 -q 75 -y” -p 8081
Once you have the script file to where it’s only that command, you can try to run that script manually by typing
./startcam.sh. That should be the equivalent of typing the command in yourself.
Try that and let us know how it goes.
axel last edited by axel
Ok i can run manually the script.
sdetweil last edited by sdetweil
@axel he said
you can try to run that script manually by typing ./startcam.sh.
he left off that you need to mark the script as executable
chmod +x ./startcam.sh
i did it before
@axel - Now that you can run your script and have it execute the command (I’m assuming that when you run the script, it does what you want) you just have to tell pm2 to manage that script.
Tell pm2 to manage the script:
pm2 start startcam.sh
Tell pm2 to remember & autostart the script:
Let us know how it goes.