User Tools

Site Tools


text:text-webcam-server-fr
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Next revision
text:text-webcam-server-fr [2018/11/12 08:56] – external edit 127.0.0.1
Line 1: Line 1:
 +====== Texte WebCam sur Server ======
 +[[:france#objects|{{  :objects.png}}]][[:franceh|{{  :rocrail-logo-35.png}}]]
 +[[:france|Sommaire]] -> [[:france#objects|Objets]] ->   **Texte** 
 +  * [[:text:text-webcam-fr|WebCam]] | **WebCam sur Server**
 +[[:text-fr|Index]] | [[:text-gen-fr|Général]] | [[:text-interface-fr|Interface]] 
  
 + \\
 +
 +
 +
 +=====Introduction=====
 +La WebCam sur Serveur fournit les images capturées à tous les clients connectés..\\
 +Clients pris en charge :
 +  * __**[[:france#rocview|Rocview]]**__
 +  * __**[[:rocweb:rocweb-fr|Rocweb]]**__
 +L'image WebCam capturée doit être aussi petite que possible pour économiser de la bande passante. Ceci est particulièrement important dans le cas des clients mobiles connectés .\\
 +
 + \\
 +
 +=====Configuration=====
 +
 +====Objet Texte====
 +{{:text:webcam-server-setup-en.png}}\\
 +
 +  * Le rafraîchissement doit être remis à zéro.
 +  * L'option ** WebCam ** doit être activée
 +  * La nouvelle image capturée sera recherchée dans le __**[[:rocrailini-gen-fr#image_path|chemin fichier image]]**__
 +
 + \\
 +
 +====Action====
 +{{:text:webcam-server-action-en.png}}\\
 +L'action appelle une __**[[#capture_script|Capture Script]]**__ externe pour capturer une nouvelle image instantanée depuis la WebCam..\\
 +L'option ** Asynchrone ** doit être désactivée pour cette action.\\
 +
 + \\
 +
 +====Contrôle d'action====
 +{{:text:webcam-action-control-en.png}}\\
 +Cette action sera appelée chaque seconde, corrigée, avec l'état "**webcam**"..\\
 +
 + \\
 +
 +====Capture Script====
 +Le script doit fournir une image au format JPEG et doit être le plus petit possible et ** doit être inférieur à 100kB**.\\
 +===Mac OS X===
 +L'option **wacaw** --CIF générera une petite image de 352 X 288. ([[https://en.wikipedia.org/wiki/Common_Intermediate_Format|Common Intermediate Format]])\\
 +<code bash>
 +#!/bin/bash
 +echo "Snapping a new image of the webcam..."  
 +/Users/rob/Projects/Rocrail/unxbin/rocnet/webcam/wacaw -d 2 --jpeg --CIF /Users/rob/Projects/Rocrail/unxbin/rocnet/webcam/_picture
 +mv /Users/rob/Projects/Rocrail/unxbin/rocnet/webcam/_picture.jpeg /Users/rob/Projects/Rocrail/unxbin/rocnet/images/picture.jpg
 +</code>
 +Explication des lignes: 
 +  - L'interprète utilisé 
 +  - Le message terminal
 +  - Un appel au programme ** wacaw ** pour capturer une nouvelle image 
 +  - déplace l'image capturée dans le chemin fichier de l'image 
 +
 +
 +===Linux===
 +<code bash>
 +#!/bin/bash
 +picfile="/home/sven/rocrail/images/$(basename "$0").jpg"
 +tmpfile="/home/sven/rocrail/images/_$(basename "$0").jpg"
 +device="/dev/video${0: -1}"
 +
 +echo "Snapping a new picture from $device to $picfile"  
 +
 +avconv -f video4linux2 -i "$device" -frames 1 "$tmpfile" 
 +mv "$tmpfile" "$picfile"
 +</code>
 +
 +===Windows===
 +  * Exemple avec tous les fichiers et programmes nécessaires:  {{:text:webcam.zip}}
text/text-webcam-server-fr.txt · Last modified: 2021/11/09 16:34 by phil45