Setting camserv as Webcam Streaming Server on Redhat Linux

Install camserv
# rpm -ivh camserv-0.5.0-1.i386.rpm

/usr/local/lib/camserv/ berisi filter dan library yang digunakan video server oleh camserv
/usr/local/share/camserv/ berisi default konfigurasi camserv.cfg dan default html yang digunakan untuk menampilkan streaming
/usr/local/bin/camserv ialah camera server binary

ekstrak file quickcam.zip pada /usr/local/src
kopikan semua isi direktori lib pada /usr/local/lib/camserv/ dan overwrite semua file

Edit file konfigurasi /usr/local/share/camserv/camserv.cfg
# vi /usr/local/share/camserv/camserv.cfg

[video_v4l_qcam]
path /usr/local/lib/camserv/libvideo_v4l.so
device_path /dev/video0
port 0
color 30000
hue 30000
contrast 30000
brightness 30000
whiteness 30000
autobright 0

[jpg_filter]
path /usr/local/lib/camserv/libjpg_filter.so
quality 30

[hello_world_banner]
path /usr/local/lib/camserv/libtext_filter.so
text Smiert Webcam
bg #000000
fg #ffffff
x 0
y 0
mangle 0
fontname 6×11

[time_stamp]
path /usr/local/lib/camserv/libtext_filter.so
text Time: %X
bg #000000
fg #ffffff
x 0
y 11
mangle 1
fontname 8×8

[static_filter]
path /usr/local/lib/camserv/librand_filter.so
num_perline 20
coloredpix 0

[imlib2_filter]
path /usr/local/lib/camserv/libimlib2_filter.so
file /tmp/my_nasty_picture.png
x 0
y 0

[socket]
listen_port 9192
max_frames 0
max_bytes 0
max_seconds 0

[filters]
num_filters 2
filter0_section time_stamp
filter1_section hello_world_banner


video_section video_v4l_qcam
width 320
height 240
maxfps 0
memhack 1

[main]
#output_snapfile foo.jpg
#output_presnaps 100

Copikan file /usr/local/share/camserv/defpage.html ke direktori web
# cp /usr/local/share/camserv/defpage.html /var/www/html/index.html

# vi /var/www/html/index.html

Buat file binary untuk menjalankan service camserv
# vi /usr/bin/camserv

#!/bin/bash
/usr/local/bin/camserv &

Ubah mode file binary tadi sehingga dapat dieksekusi
# chmod 755 /usr/bin/camserv

Jalankan service edna dengan mengetikkan pada konsole
# camserv

Agar camserv dapat berjalan pada saat booting maka tambahkan pada /etc/rc.local baris berikut

camserv

Cara mengakses streaming dengan mengetikkan pada web browser alamat ip diikuti alamat port yang digunakan camserv menjalankan service. Misal : 192.168.0.1:9192

Leave a Reply

Your email address will not be published. Required fields are marked *


*

Skip to toolbar