Skip to content

Commit 98f103e

Browse files
author
Sungjin Han
committed
Merge branch 'hotfix/0.0.2'
2 parents 1fafd18 + ed616ce commit 98f103e

File tree

3 files changed

+18
-129
lines changed

3 files changed

+18
-129
lines changed

README.md

+5-23
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ $ sudo raspi-config
1515

1616
```
1717
$ sudo apt-get update
18-
$ sudo apt-get install libv4l-dev libjpeg8-dev subversion imagemagick v4l-utils
18+
$ sudo apt-get install build-essential libjpeg8-dev imagemagick libv4l-dev git cmake uvcdynctrl
1919
```
2020

2121
### Build mjpg-streamer
2222

2323
```
24-
$ svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/ mjpg-streamer
25-
$ cd mjpg-streamer
2624
$ sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h
27-
$ make USE_LIBV4L2=true clean all
25+
$ git clone https://github.com/jacksonliam/mjpg-streamer
26+
$ cd mjpg-streamer/mjpg-streamer-experimental
27+
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=.. .
28+
$ make install
2829
```
2930

3031
### Setup video4linux for Raspberry Pi Camera module
@@ -87,25 +88,6 @@ $ sudo systemctl start mjpg-streamer.service
8788
$ sudo systemctl stop mjpg-streamer.service
8889
```
8990

90-
#### init.d
91-
92-
```
93-
# copy & edit init/mjpg-streamer file,
94-
$ sudo cp rpi-mjpg-streamer/init/mjpg-streamer.sample /etc/init.d/mjpg-streamer
95-
$ sudo chmod +x /etc/init.d/mjpg-streamer
96-
$ sudo vi /etc/init.d/mjpg-streamer
97-
98-
# then register as a boot-up service
99-
$ sudo update-rc.d mjpg-streamer defaults
100-
101-
# or remove it
102-
$ sudo update-rc.d -f mjpg-streamer remove
103-
104-
# and start/stop it
105-
$ sudo service mjpg-streamer start
106-
$ sudo service mjpg-streamer stop
107-
```
108-
10991
## C. Connect
11092

11193
Connect through the web browser:

init/mjpg-streamer.sample

-98
This file was deleted.

run-mjpg-streamer.sh.sample

+13-8
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,27 @@
22
#
33
# created by : [email protected]
44
#
5-
# last update: 2014.01.24.
5+
# last update: 2018.08.14.
66
#
77

88
################
99
# customize these:
1010

1111
# mjpg_streamer's install location
12-
MJPG_STREAMER_INSTALL="/home/pi/builds/mjpg-streamer"
12+
# XXX - edit this location to yours!!!
13+
MJPG_STREAMER_DIR="/home/pi/builds/mjpg-streamer"
1314

1415
# mjpg_streamer excutable's location
15-
MJPG_STREAMER="$MJPG_STREAMER_INSTALL/mjpg_streamer"
16+
MJPG_STREAMER_BIN="$MJPG_STREAMER_DIR/bin/mjpg_streamer"
17+
18+
# mjpg_streamer plugins' location
19+
MJPG_STREAMER_PLUGINS_DIR="$MJPG_STREAMER_DIR/lib/mjpg-streamer"
1620

1721
# streaming port
1822
MJPG_STREAMER_PORT="8080"
1923

2024
# htmls and related files' location
21-
MJPG_STREAMER_WWW="$MJPG_STREAMER_INSTALL/www"
25+
MJPG_STREAMER_WWW="$MJPG_STREAMER_DIR/share/mjpg-streamer/www"
2226

2327
# video device
2428
DEVICE_IN="/dev/video0"
@@ -28,6 +32,7 @@ RESOLUTION="640x480"
2832
FPS=24
2933

3034
# authentication
35+
# XXX - change these values before exposing your Pi to the outer world!!!
3136
USERNAME="pi"
3237
PASSWORD="raspberry"
3338
if [ ! -z $USERNAME ] && [ ! -z $PASSWORD ]; then
@@ -39,14 +44,14 @@ fi
3944
# LED blink
4045
LED="off" # on/off/blink/auto (may not work on rpi camera modules)
4146

42-
# plugin
43-
PLUGIN_IN="$MJPG_STREAMER_INSTALL/input_uvc.so -d $DEVICE_IN -r $RESOLUTION -f $FPS -l $LED"
44-
PLUGIN_OUT="$MJPG_STREAMER_INSTALL/output_http.so -p $MJPG_STREAMER_PORT -w $MJPG_STREAMER_WWW $AUTH"
47+
# plugins
48+
PLUGIN_IN="$MJPG_STREAMER_PLUGINS_DIR/input_uvc.so -d $DEVICE_IN -r $RESOLUTION -f $FPS -l $LED"
49+
PLUGIN_OUT="$MJPG_STREAMER_PLUGINS_DIR/output_http.so -p $MJPG_STREAMER_PORT -w $MJPG_STREAMER_WWW $AUTH"
4550

4651

4752

4853
################
4954
# run mjpg_streamer
50-
$MJPG_STREAMER -i "$PLUGIN_IN" -o "$PLUGIN_OUT"
55+
$MJPG_STREAMER_BIN -i "$PLUGIN_IN" -o "$PLUGIN_OUT"
5156
################
5257

0 commit comments

Comments
 (0)