camera server from internet

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
hatahata
Posts: 26
Joined: Thu Jul 07, 2016 3:42 am

camera server from internet

Post by hatahata »

hi all .

i am using the next script for camera server from internet

Code: Select all

cd /var/www/html
rm /var/www/html/index.html
while true
do
ffmpeg -f video4linux2 -i /dev/v4l/by-id/'usb-Microsoft_Microsoft��_LifeCam_NX-6000-video-index0'    -vframes 2 test%03d.jpeg
y=`date +%Y_%m%d__%H-%M__%S`.jpeg
mv test002.jpeg $y
echo "<a href=`echo $y`>`echo $y`</a>   </p> </p> " >> /var/www/html/index.html
sleep 30
rm `date +%Y_%m%d --date="7 day ago"`*.jpeg
rm `date +%Y_%m%d --date="8 day ago"`*.jpeg
rm `date +%Y_%m%d --date="9 day ago"`*.jpeg
rm `date +%Y_%m%d --date="10 day ago"`*.jpeg
rm `date +%Y_%m%d --date="11 day ago"`*.jpeg
rm `date +%Y_%m%d --date="12 day ago"`*.jpeg
rm `date +%Y_%m%d --date="13 day ago"`*.jpeg
rm `date +%Y_%m%d --date="13 day ago"`*.jpeg
done
because motion does not work for the microsoft NX-6000 :o
this is not specific to dietpi , even mint show the same phenomenon .

Code: Select all

dpkg -l | grep v4l | cut -d ' ' -f 2-3
 dv4l
 gambas3-gb-v4l
 libv4l-0:armhf
 libv4l-dev:armhf
 libv4l2rds0:armhf
 libv4lconvert0:armhf
 uvcdynctrl
 uvcdynctrl-data
 v4l-conf
 v4l-utils
 v4l2ucp


# dpkg -l | grep uvc | cut -d ' ' -f 2-3
 guvcview
 libguvcview-1.0-0:armhf
 libguvcview-dev:armhf
 uvccapture
 uvcdynctrl
 uvcdynctrl-data
 uvcdynctrl-dbg
r


# dpkg -l | grep jpeg | cut -d ' ' -f 2-3
 libjpeg-turbo-progs
 libjpeg62-turbo:armhf
 liblavjpeg-2.1-0
 libmjpegtools-dev
 libmjpegutils-2.1-0
 libopenjpeg-java
 libopenjpeg5:armhf
 libturbojpeg1:armhf
 mjpegtools
 mjpegtools-dbg
 mjpegtools-gtk
 openjpeg-tools
-----
regards
Last edited by k-plan on Tue Jun 13, 2017 8:09 pm, edited 1 time in total.
Reason: ... and the question is? - Move topic, because it is a ??? - not a Community Tutorial !
hatahata
Posts: 26
Joined: Thu Jul 07, 2016 3:42 am

Re: camera server from internet

Post by hatahata »

continued

my now state is

Code: Select all


cd /ma1/tuyosi
while true
do
cd /ma1/tuyosi
fswebcam -F 100  -r 640x480 test001.jpeg
convert  test001.jpeg -modulate 120   test002.jpeg
y=`date +%Y_%m%d__%H-%M__%S`.jpeg
ls -l /ma1/tuyosi/*.jpeg
ls -l /ma1/tuyosi/*.jpeg
ls -l /ma1/tuyosi/*.jpeg
mv test002.jpeg $y
echo $y
echo $y
echo $y
z=`date +%Y_%m%d__%H`
echo $z
echo $z
echo $z
mkdir -p /ma1/tuyosi/$z
mv $y /ma1/tuyosi/$z/
echo "<a href=`echo $z`>`echo $z`</a>   </p> </p> " >> /ma1/tuyosi/index.html-pre
awk '!a[$0]++' index.html-pre > index.html
cd  /ma1/tuyosi/$z
for W in  ` ls *.jpeg `
do
echo "<a href=`echo $W`> `echo $W` </a>   </p> </p> " >> ./index.html-pre
awk '!a[$0]++' index.html-pre > index.html
done  
sleep 20
cd /ma1/tuyosi/
rm -rf `date +%Y_%m%d --date="7 day ago"`*
rm -rf `date +%Y_%m%d --date="8 day ago"`*
rm -rf `date +%Y_%m%d --date="9 day ago"`*
rm -rf `date +%Y_%m%d --date="10 day ago"`*
rm -rf `date +%Y_%m%d --date="11 day ago"`*
rm -rf `date +%Y_%m%d --date="12 day ago"`*
rm -rf `date +%Y_%m%d --date="13 day ago"`*
rm -rf `date +%Y_%m%d --date="14 day ago"`*
done

i intend to save 7 days photos and save them hourly foldas . :roll:
jordancaver123
Posts: 2
Joined: Sat May 19, 2018 11:25 am

Re: camera server from internet

Post by jordancaver123 »

The server camera that is implemented on your PC or mobile device that can be used for live video chats, and when motion sensing is enabled, the webcam can be transformed into a cheap network IP camera. When action is detected, the camera can capture a few photos and automatically send the images to your email address. You can easily find a cheap network IP camera at websites that focus in video surveillance.
Thanks & Regards,
Jordan Caver
Home Theater Vancouver
Home Theater Toronto
Post Reply