Apr 152011

webcam streaming

I was experimenting with cheap webcam, vlc on my windows xp workstation. Playing directly using vlc, performance was adequate. but when it came accross network/WAN, delay started increasing between 4-5 seconds(video/audio). i suspect, transcoding are behind these streaming lag. i don’t know what is the best tuning. but here’s the final setting.

start /high vlc.exe --logo-file avatar.png dshow:// :dshow-vdev="VideoCAM Eye" :dshow-adev="SigmaTel Audio" :dshow-caching="0" :sout=#transcode{vcodec=h264{keyint=15,vbv-maxrate=160,vbv-bufsize=160},acodec=mp3,deinterlace,samplerate=44100,sfilter=logo}:std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=,sdp=sap://,name="Webcam 3G"} --ttl 12

Continue reading »

Sep 202009

To encrypt a connection between a mysql client and a mysql server, run two instances of stunnel, one on client site and other on MySQL remote site

Here’s steps how to do it

# wget http://www.stunnel.org/download/stunnel/src/stunnel-4.27.tar.gz
# rpmbuild -ta stunnel-4.27.tar.gz
# rpm -ivh /usr/src/redhat/RPMS/stunnel-4.27-1.i386.rpm

Create stunnel.pem cert on server site

# openssl genrsa -out privkey.pem 2048
# openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
# cat privkey.pem cacert.pem >> /etc/stunnel/stunnel.pem

Set the proper permissions on the resulting private key:

# chmod 0400 /etc/stunnel/stunnel.pem

Set the proper ownership of the stunnel chroot dir

# chown nobody:nobody /var/run/stunnel

Continue reading »