To use a webcam inside Repetier-Server, you need to stream the data as JPG or MJPG. You can use special IP webcams or a simple software, turning your webcam into a streaming webcam. Feel free to use other software as the one described here.
Stream with MJPG-streamer
Here you find a detailed description how to install MJPG-streamer:
1. Install build dependencies
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev make gcc git cmake g++
2. Download MJPG-streamer
git clone https://github.com/jacksonliam/mjpg-streamer.git
3. Open directory
4. Build MJPG-streamer
cmake -G "Unix Makefiles"
5. Install MJPG-streamer
sudo make install
6. Run MJPG-streamer as background process
/usr/local/bin/mjpg_streamer -i input_uvc.so -o "output_http.so -w /usr/local/share/mjpg-streamer/www" -b
If you are using a raspicam, you need to replace “input_usv.so” with “input_raspicam.so”. Don’t forget to replace that also in the init.d script
downloaded in the next step.
7. Make it start at bootup automatically (optinal)
If you do not want to start MJPG-streamer manually after every restart:
sudo wget http://www.repetier-server.com/en/software/extras/mjpgstreamer-init-debian/mjpgstreamer
sudo chmod 755 mjpgstreamer
sudo update-rc.d mjpgstreamer defaults
If you have a raspicam instead of a normal usb camera, you need to edit the mjpg_streamer commandline and replace input_uvc.so with input_raspicam.so.
Now you can use these commands to start and stop MJPG-streamer:
sudo /etc/init.d/mjpgstreamer start
sudo /etc/init.d/mjpgstreamer stop
sudo /etc/init.d/mjpgstreamer restart
sudo /etc/init.d/mjpgstreamer status
8. Get ip address
After installing the MJPG-streamer you need to get the local ip address of the server. With
ip addr you find your ip address in such a line:
inet 192.168.2.3/24 brd 192.168.2.255 scope global eth0
Here your ip address would be 192.168.2.3.
9. Enter the URLs in Repetier-Server
This are the required URLs (replace <ip address> with your ip address):
Dynamic Image URL:
Static Image URL:
In Repetier-Server open your printer and go to Printer Settings Webcam.
Select the desired webcam connection (JPG Images, MJPG Stream or JPG + MJPG Stream).
At Reload Interval you can enter the polling interval for new images.
Enter your URLs in Dynamic Image URL and in Static Image URL and click Save Configuration.
Some webcams need different starting parameters to work. So if you don’t see anything, edit the start script with:
sudo nano /etc/init.d/mjpgstreamer
Edit this line:
$DAEMON -i input_uvc.so -o "output_http.so -w /usr/local/share/mjpg-streamer/www" -b &
Change this line to:
$DAEMON -i "input_uvc.so -y -f 5" -o "output_http.so -w /usr/local/mjpg-streamer/www" -b &
-y activates camera in yuv mode.
-f 5 sets the frame rate, in our example 5 frames per second.
If you want to change the video resolution, you can add e.g.
-r 1280x720 for 720p or any other supported resolution.
Save and exit with
Strg + x. Then restart MJPG-streamer with
sudo /etc/init.d/mjpgstreamer restart.