TP-LINK TL-WR1043ND Router + Web Cam = IP Cam
- A working OpenWRT on TP-LINK TL-WR1043ND Router
- Web Camera. I'm using Microsoft LifeCam HD-5000

opkg update
opkg install kmod-usb2
opkg install kmod-video-uvc
opkg install kmod-i2c-core
opkg install kmod-input-core
opkg install mjpg-streamer
|
config mjpg-streamer core |
option resolution "1280x720" |
/etc/init.d/mjpg-streamer enable |
root@OpenWrt:~# mjpg_streamer --help
----------------------------------------------------------------------- Usage: mjpg_streamer -i | --input "<input-plugin.so> [parameters]" -o | --output "<output-plugin.so> [parameters]" [-h | --help ]........: display this help [-v | --version ].....: display version information [-b | --background]...: fork to the background, daemon mode ----------------------------------------------------------------------- Example #1: To open an UVC webcam "/dev/video1" and stream it via HTTP: mjpg_streamer -i "input_uvc.so -d /dev/video1" -o "output_http.so" ----------------------------------------------------------------------- Example #2: To open an UVC webcam and stream via HTTP port 8090: mjpg_streamer -i "input_uvc.so" -o "output_http.so -p 8090" ----------------------------------------------------------------------- Example #3: To get help for a certain input plugin: mjpg_streamer -i "input_uvc.so --help" ----------------------------------------------------------------------- In case the modules (=plugins) can not be found: * Set the default search path for the modules with: export LD_LIBRARY_PATH=/path/to/plugins, * or put the plugins into the "/lib/" or "/usr/lib" folder, * or instead of just providing the plugin file name, use a complete path and filename: mjpg_streamer -i "/path/to/modules/input_uvc.so" |
root@OpenWrt:~# mjpg_streamer --input "input_uvc.so --help" [-d | --device ].......: video device to open (your camera) |
root@OpenWrt:~# mjpg_streamer --output "output_file.so --help"
MJPG Streamer Version: svn rev: exported --------------------------------------------------------------- Help for output plugin..: FILE output plugin --------------------------------------------------------------- The following parameters can be passed to this plugin: [-f | --folder ]........: folder to save pictures
[-m | --mjpeg ]........: save the stream to an mjpeg file [-d | --delay ].........: delay after saving pictures in ms [-s | --size ]..........: size of ring buffer (max number of pictures to hold) [-e | --exceed ]........: allow ringbuffer to exceed limit by this amount [-c | --command ].......: execute command after saving picture [-i | --input ].......: read frames from the specified input plugin
|
root@OpenWrt:~# mjpg_streamer --output "output_http.so --help" [-w | --www ]...........: folder that contains webpages in flat hierarchy (no subfolders) |
http://192.168.1.1:8080/?action=snapshot |
http://192.168.1.1:8080/?action=stream |
- Download & run VLC Media Player
- Select Media -> Open Network Stream...
- Enter http://192.168.1.1:8080/?action=stream for network URL
-
Download mjpg-streamer-r63.tar.gz
-
Extract the file to your computer
-
Rename www folder to camwww
-
Copy the camwww to www folder of router, you have /www/camwww inside your router
-
Start mjpg_streamer as below
mjpg_streamer -i "input_uvc.so -r 640x480 -f 24" -o "output_http.so -p 8080 -w /www/camwww"
|
-
Viewing video from browser as below. You shoud see video on your screen.
http://192.168.1.1:8080/javascript_simple.html |
- Or this one (require java to install on computer)
http://192.168.1.1:8080/java_control.html |
- Or this one (the main program)
http://192.168.1.1:8080/
|

config mjpg-streamer core |
start() { |
- Reboot router after making changes
- Open Google Chrome (Do not use Internet Explorer)
- Testing with http://192.168.1.1:8080/?action=snapshot or http://192.168.1.1:8080/?action=stream
- You will see a login screen as shown in figure below.
- Enter user as User Name
- Enter myPassword as Password
- You will see your picture upon enter correct User Name and Password