Read the statement by Michael Teeuw here.
HELP to use a cam with MM PLEASE
-
@axel said in HELP to use a cam with MM PLEASE:
see my usb cam in live on the mirror!
If you can get an RTSP stream URL from your IP camera you can use my module: MMM-RTSPStream. Use the
develop
branch right now–and search this forum if you’re having issues getting it to work.If you want to stream your USB camera by hooking it up to the Pi, you can look at something like mjpg-streamer (Google ‘OctoPrint mjpg-streamer setup’ for some good guides) and then use MMM-iframe to show the image.
-
@shbatm
i try to use mjpg_streamer :
$ mjpg_streamer -o “output_http.so -w ./www” -i “input_uvc.so -f 1 -q 75 -y”but i have this error : bind:Address already in use.
also : Innappropriate ioctl for device (25)help!
-
@axel said in HELP to use a cam with MM PLEASE:
bind:Address already in use.
The default port is the same as the Mirror, 8080. Try adding
-p 8081
to your command to change the port. -
This post is deleted! -
@shbatm
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 withchmod +x startcam.sh
and then use pm2 to autostart and maintain the script:pm2 start startcam.sh
When you’re satisfied with pm2’s handling, save the state:pm2 save
In the future, please use the markdown features of the board when posting code & logs.
-
@bhepler
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.
Edit the
startcam.sh
script 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.
-
@bhepler
Ok i can run manually the script.
and now?
😉 -
@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