issue52:linuxlab
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue52:linuxlab [2011/08/12 20:43] – créée fredphil91 | issue52:linuxlab [2011/10/03 21:38] (Version actuelle) – fredphil91 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | + | ** | |
ZoneMinder WebCam CCTV | ZoneMinder WebCam CCTV | ||
Ligne 10: | Ligne 9: | ||
In this example, I’m using my Logitech C310 HD webcam. It’s automatically detected in most Ubuntu-based distros, and you can check that it’s working by installing an application such as ‘Cheese’. If the webcam is working in Cheese, then there’s a good chance it will work in ZoneMinder. | In this example, I’m using my Logitech C310 HD webcam. It’s automatically detected in most Ubuntu-based distros, and you can check that it’s working by installing an application such as ‘Cheese’. If the webcam is working in Cheese, then there’s a good chance it will work in ZoneMinder. | ||
+ | ** | ||
+ | Zoneminder : télévision en circuit fermé au moyen de webcams | ||
+ | |||
+ | |||
+ | 1ere Partie | ||
+ | |||
+ | Par Ronnie Tucker | ||
+ | |||
+ | N' | ||
+ | |||
+ | Dans cet exemple, j' | ||
+ | |||
+ | ** | ||
So, with my webcam plugged in and working in Cheese, it’s time to install ZoneMinder: | So, with my webcam plugged in and working in Cheese, it’s time to install ZoneMinder: | ||
sudo apt-get install zoneminder apache2 php5-mysql libapache2-mod-php5 mysql-server ffmpeg | sudo apt-get install zoneminder apache2 php5-mysql libapache2-mod-php5 mysql-server ffmpeg | ||
Ligne 24: | Ligne 36: | ||
Now you should be able to get into ZoneMinder by going to your browser and pointing it to: | Now you should be able to get into ZoneMinder by going to your browser and pointing it to: | ||
http:// | http:// | ||
+ | ** | ||
+ | Donc, avec la webcam branchée et fonctionnant avec Cheese, installons ZoneMinder : | ||
+ | sudo apt-get install zoneminder apache2 php5-mysql libapache2-mod-php5 mysql-server ffmpeg | ||
+ | |||
+ | Vous remarquerez que nous installons Apache et MysSQL. Apache est installé, car il est possible de contrôler ZoneMinder via Internet. La totalité de ZoneMinder est contrôlée dans une fenêtre de navigateur. On a besoin de MySQL, puisque ZoneMinder enregistre la plupart de ses activations et ce genre de choses dans une base de données MySQL. | ||
+ | |||
+ | Ensuite, nous devons faire discuter Apache avec ZoneMinder : | ||
+ | sudo ln -s / | ||
+ | |||
+ | Une fois ceci fait, nous devons redémarrer Apache : | ||
+ | sudo apache2ctl restart | ||
+ | |||
+ | Maintenant vous devriez être capable d' | ||
+ | http:// | ||
+ | |||
+ | ** | ||
[zm01] | [zm01] | ||
Ligne 30: | Ligne 58: | ||
This is where I hit my first major hurdle. My webcam is local. As in, it’s sitting in the same room as me as I tinker with ZoneMinder. The other alternative is ‘remote’ which means the camera is not in the same room as me. No matter what I did, I could not get my camera to work with ZoneMinder. One major flaw with ZoneMinder is that it doesn’t just autodetect a camera and work, like Cheese does. The trick is to use mjpg-stream to stream the video from the camera to ZoneMinder. Thus, ZoneMinder now recognises it as a remote camera. This is when I hit my second major problem. The .deb package for mjpg-stream is no longer recognised as being valid (in the eyes of Ubuntu/ | This is where I hit my first major hurdle. My webcam is local. As in, it’s sitting in the same room as me as I tinker with ZoneMinder. The other alternative is ‘remote’ which means the camera is not in the same room as me. No matter what I did, I could not get my camera to work with ZoneMinder. One major flaw with ZoneMinder is that it doesn’t just autodetect a camera and work, like Cheese does. The trick is to use mjpg-stream to stream the video from the camera to ZoneMinder. Thus, ZoneMinder now recognises it as a remote camera. This is when I hit my second major problem. The .deb package for mjpg-stream is no longer recognised as being valid (in the eyes of Ubuntu/ | ||
+ | ** | ||
+ | [zm01] | ||
+ | |||
+ | Pour des raisons de sécurité, je vous recommanderais de créer un compte administrateur pour vous-même dans « Options » (sous l' | ||
+ | |||
+ | C'est là que j'ai rencontré mon premier obstacle. Ma webcam est branchée en local. C' | ||
+ | |||
+ | ** | ||
Double click the downloaded file, or open it in Gdebi, and let it install. To run MJPG we open a terminal and do: | Double click the downloaded file, or open it in Gdebi, and let it install. To run MJPG we open a terminal and do: | ||
mjpg_streamer -i “input_uvc.so -r 320x240 -f 6” -o “output_http.so -p 8080” -b | mjpg_streamer -i “input_uvc.so -r 320x240 -f 6” -o “output_http.so -p 8080” -b | ||
Ligne 40: | Ligne 76: | ||
And, finally, click the ‘Save’ button. | And, finally, click the ‘Save’ button. | ||
+ | ** | ||
+ | Double-cliquez sur le fichier téléchargé ou ouvrez-le dans Gdebi et laissez-le s' | ||
+ | mjpg_streamer -i “input_uvc.so -r 320x240 -f 6” -o “output_http.so -p 8080” -b | ||
+ | |||
+ | Ici, nous disons à la caméra d' | ||
+ | |||
+ | Cliquez d' | ||
+ | ? | ||
+ | |||
+ | Enfin, cliquez sur le bouton « Save ». | ||
+ | |||
+ | ** | ||
[zm02 and 03] | [zm02 and 03] | ||
Ligne 46: | Ligne 94: | ||
Now, back in the ZoneMinder main screen, you should have your monitor (aka: camera) listed. Below the header of ‘Name’ should be your camera name (if you gave it a name) which you can click to see what your camera is streaming. | Now, back in the ZoneMinder main screen, you should have your monitor (aka: camera) listed. Below the header of ‘Name’ should be your camera name (if you gave it a name) which you can click to see what your camera is streaming. | ||
+ | ** | ||
+ | |||
+ | [zm02 and 03] | ||
+ | |||
+ | Avant de pouvoir voir quelque chose dans ZoneMinder, nous devons modifier son paramétrage « image-to-browser » par défaut de JPG à MPG. C'est fait dans l' | ||
+ | |||
+ | Maintenant, de retour sur l' | ||
+ | ** | ||
[zm04] | [zm04] | ||
Ligne 56: | Ligne 112: | ||
and you’ll see your camera at 320x240 at 6fps. Close the tab/window in your browser and kill MJPG from a terminal with: | and you’ll see your camera at 320x240 at 6fps. Close the tab/window in your browser and kill MJPG from a terminal with: | ||
killall mjpg_streamer | killall mjpg_streamer | ||
+ | ** | ||
+ | Passons au problème suivant. Notre paramétrage de 320x240 à 6 fps n'est guère l' | ||
+ | |||
+ | Pour prouver que c'est un problème de ZoneMinder, nous pouvons tester la sortie de la caméra en allant dans le navigateur et en saisissant : | ||
+ | http:// | ||
+ | |||
+ | et vous verrez votre caméra à 320x240 avec 6 fps. Fermez l' | ||
+ | killall mjpg_streamer | ||
+ | |||
+ | ** | ||
then enter: | then enter: | ||
mjpg_streamer -i “input_uvc.so -r 640x480 -f 30” -o “output_http.so -p 8080” -b | mjpg_streamer -i “input_uvc.so -r 640x480 -f 30” -o “output_http.so -p 8080” -b | ||
Ligne 66: | Ligne 132: | ||
Go back in to ZoneMinder and edit your camera settings to make the resolution 640 wide and 480 high, save it, go back, and check what your camera is streaming. You’ll probably see nothing. If you see something then you’re doing better than I did! If you see nothing, read on. | Go back in to ZoneMinder and edit your camera settings to make the resolution 640 wide and 480 high, save it, go back, and check what your camera is streaming. You’ll probably see nothing. If you see something then you’re doing better than I did! If you see nothing, read on. | ||
+ | ** | ||
+ | puis saisissez : | ||
+ | mjpg_streamer -i “input_uvc.so -r 640x480 -f 30” -o “output_http.so -p 8080” -b | ||
+ | |||
+ | pour paramétrer la caméra à 640x480 avec 30 fps. Retournez dans votre navigateur et faites : | ||
+ | http:// | ||
+ | |||
+ | et votre caméra sera réellement en 640x480 et affichera 30 images par secondes. | ||
+ | |||
+ | Retournez dans ZoneMinder et éditez le paramétrage de votre caméra pour rendre la résolution à 640 de large sur 480 de haut, sauvegardez, | ||
+ | |||
+ | ** | ||
To fix things, we need to edit the sysctl.conf file by doing: | To fix things, we need to edit the sysctl.conf file by doing: | ||
sudo gedit / | sudo gedit / | ||
Ligne 78: | Ligne 156: | ||
which will show you the stuff we just typed in. All good. | which will show you the stuff we just typed in. All good. | ||
+ | ** | ||
+ | Pour corriger cela, nous devons éditer le fichier sysctl.conf en saisissant : | ||
+ | sudo gedit / | ||
+ | |||
+ | et sous la ligne qui dit # | ||
+ | kernel.shmall=268435456 | ||
+ | kernel.shmmax=268435456 | ||
+ | |||
+ | et enregistrez-le. Vous pouvez fermer votre éditeur de texte ; nous n'en aurons plus besoin. Pour utiliser ce nouveau fichier sysctl.conf, | ||
+ | sudo sysctl -p | ||
+ | |||
+ | qui vous montrera les choses que nous venons juste de taper. Tout va bien. | ||
+ | |||
+ | ** | ||
Get ZoneMinder in your browser again and you might notice that your source ‘localhost’ is in red. If it is, click it, then click ‘Save’; that should fix it, and the text should go back to being orange. Click your camera (under ‘Name’) and it should work! | Get ZoneMinder in your browser again and you might notice that your source ‘localhost’ is in red. If it is, click it, then click ‘Save’; that should fix it, and the text should go back to being orange. Click your camera (under ‘Name’) and it should work! | ||
In the next part of this tutorial we’ll enable some simple motion-detect capabilities, | In the next part of this tutorial we’ll enable some simple motion-detect capabilities, | ||
+ | ** | ||
+ | |||
+ | Entrez à nouveau l' | ||
+ | |||
+ | Dans la prochaine partie du tutoriel, nous activerons quelques capacités de détection de mouvement et aussi nous lirons quelques enregistrements. | ||
+ |
issue52/linuxlab.1313174635.txt.gz · Dernière modification : 2011/08/12 20:43 de fredphil91