Webcam video surveillance via mjpg-streamer entware

If you own a webcam from this list than you can attach it to the AsusWRT routers usb port and see in real time images from it, like babyroom, garage, courtyard...

It's only for mipsel devices like RT-N16, RT-N66U, RT-AC66U...

We need a usb-flash formatted EXT2 or a usb-hdd formated EXT3, may not work on FAT32 or NTFS.

Download custom firmware from here
Go to firmware upgrade page and upload normaly like a stock one
Install Entware from here
Login to router with putty terminal and paste this commands:

opkg update
opkg upgrade
opkg install mjpg-streamer coreutils-yes
/opt/etc/init.d/S96mjpg-streamer stop
wget -c -O /opt/share/www/webcam/
chmod a+rx /opt/share/www/webcam/
wget -c -O /opt/tmp/uvc_modules_2.6.22.19-378.50b2-mipsel.tar
cd /
tar -zxf /opt/tmp//uvc_modules_2.6.22.19-378.50b2-mipsel.tar
/opt/share/www/webcam/ load
/opt/etc/init.d/S96mjpg-streamer start

(if you have a different firmware version, use this guide to compile modules or ask someone on forums)
Go to a web browser and type:
You can change resolution, fps, port...

opkg install nano
/opt/etc/init.d/S96mjpg-streamer stop
nano /opt/etc/init.d/S96mjpg-streamer

If you want to enable password login, add -c username:password right after webcam:


mjpg_streamer -b -i " -r 320x240 -f 5" -o " -p 3000 -w /opt/share/www/webcam"


mjpg_streamer -b -i " -r 320x240 -f 5" -o " -p 3000 -w /opt/share/www/webcam -c DeSiReDUsErNaMe:DeSiReDPaSsWoRd"

• Save with CTRL-O / Enter / and exit with CTRL-X

If you want to access the webcam from wan, we have to add the next  rule to firewall-start scripts for opening port 3000

nano /jffs/scripts/firewall-start

Add this lines

iptables -I INPUT -p tcp --destination-port 3000 -j ACCEPT

• Save with CTRL-O / Enter / and exit with CTRL-X

chmod a+rx /jffs/scripts/firewall-start
sh /jffs/scripts/firewall-start

Start mjpg server

/opt/etc/init.d/S96mjpg-streamer start

Now just type your_wan_ip adress:3000/stream_simple.html in browser and should see your webcam
If you have dynamic ip, better set a dynamic dns

Tested successfully with Logitech C270 webcam

Video HERE...

Review (Click on the stars to rate!)
User Review
4.8 (5 votes)