XML/Minibrowser/Video

From Snom User Wiki

Jump to: navigation, search

Authors: Sascha Kruszka / Alexander Feldt

Contents

Introduction

The XML Minibrowser feature - which is available on all snom3x0, snom8xx and snom7xx phones - can be used to show a series of images on those phones with graphical display. Depending of the network performance the number of images shown may vary between 5 to 15 per second.

Requirements

  1. You need to have native picture sources (JPG, BMP) with maximum resolution of
    • snom360 format: 128x64 Pixel, 1-bit (monochrome) color, Windows bitmap (.bmp)
    • snom370 format: 240x128 Pixel, 5-bit (grayscale) color, Windows bitmap (.bmp)
    • snom820 format: 320x240 Pixel, 24-bit color, Windows bitmap (.bmp) or JPEG (.jpg)
    • snom870 format: 480x272 Pixel, 24-bit color, Windows bitmap (.bmp) or JPEG (.jpg)
    • Note: Some IP-Cameras like Mobotix or Panasonic are able to serve the current picture via integrated Web Server
      • http://<PanasonicWebcamIP>/SnapshotJPEG?Resolution=320x240&Quality=Precision&Count=257425
  2. A webserver for hosting the XML files
    • Note: If you need to cut or resize a picture you will need to have your own webserver and use tools like ImageMagic to process the pictures.
  3. XML file requesting images from ONE video source, see the Example Section

Important note regarding DTMF functionality

In case you intend to use the XML Minibrowser as described here, but you need to make sure DTMF tones can be signaled while the Minibrowser is executed (e.g. DTMF door opening) - Please carefully review the information / example under:

DTMF XML Minibrowser

Configuration on snom phones

  1. Go to "Function Key" page of the Web User Interface (WUI) of your snom phone
  2. Configure any available key like this - use key type "Action URL" and URL of the XML file - and save:
Image:wui_v7_function_keys_actionurl_xml_en.png

Examples

Example 1: "Videostream" from public webserver

The following lines are the content of the file video.xml located on your web server. By requesting that file by pressing the previously configured key (see "Configuration on snom phones") a series of images will be requested from the public Webserver "http://www.dhm.de/webcams/pics/cam2_video.jpg" and shown on the phone's display. The parameter <fetch mil="200"> will recall video.xml every 200 ms and as a result a new picture from the Webserver will be requested approx. 5 times per second.

<?xml version="1.0" encoding="UTF-8"?>
<SnomIPPhoneImageFile>
<LocationX>00</LocationX>
<LocationY>00</LocationY>
<URL>http://www.dhm.de/webcams/pics/cam2_video.jpg</URL>
<fetch mil="200">http://<yourwebserver>/video.xml</fetch>
</SnomIPPhoneImageFile>

Appearance on snom820 display:

  

Example 2: "Videostream" from Panasonic webcam in local LAN

The following lines are the content of the file video.xml located on your web server. By requesting that file by pressing the previously configured key (see "Configuration on snom phones") a series of images will be requested from the local Webcam "http://<yourwebserver>/SnapshotJPEG?Resolution=320x240&Quality=Precision&Count=257425" and shown on the phone's display. The parameter <fetch mil="200"> will recall video.xml every 200 ms and as a result a new picture from the Webserver will be requested approx. 5 times per second.

<?xml version="1.0" encoding="UTF-8"?>
<SnomIPPhoneImageFile>
<LocationX>00</LocationX>
<LocationY>00</LocationY>
<URL>http://<PanasonicWebcamIP>/SnapshotJPEG?Resolution=320x240&Quality=Precision&Count=257425</URL>
<fetch mil="200">http://<yourwebserver>/video.xml</fetch>
</SnomIPPhoneImageFile>

Appearance on snom820 display:

Image:snom820_webcammenu_mobotix_1.png

Example 3: XML Menu to integrate several video sources

The following lines are the content of the file video_menu.xml located on your web server. By requesting that file by pressing the previously configured key (see "Configuration on snom phones") a menu will be shown on the phone's display:

<?xml version="1.0" encoding="UTF-8"?> 
<SnomIPPhoneMenu>
 <Title>Video Menu</Title>
 <MenuItem>
  <Name>Mobotix Cam</Name>
  <URL>http://<yourwebserver>/video1.xml</URL>
 </MenuItem>
 <MenuItem>
  <Name>Kurfuerstendamm</Name>
  <URL>http://<yourwebserver>/video2.xml</URL>
 </MenuItem>
 <MenuItem>
  <Name>Brandenburger Tor</Name>
  <URL>http://<yourwebserver>/video3.xml</URL>
 </MenuItem>
 <MenuItem>
  <Name>Fernsehturm</Name>
  <URL>http://<yourwebserver>/video4.xml</URL>
 </MenuItem>
 <MenuItem>
  <Name>Elvira Cam</Name>
  <URL>http://<yourwebserver>/video5.xml</URL>
 </MenuItem>
</SnomIPPhoneMenu>

Appearance on snom820 display:

   

Example 4: "Video" + remote control of Panasonic webcam in local LAN

The following lines are the content of the file video.php located on your Webserver <yourwebserver>. By requesting that file by pressing the previously configured key (see "Configuration on snom phones") a series of images will be requested from the LAN network camera (via the script http://<yourwebserver>/video_frame.php) and shown on the phone's display. The parameter <fetch mil="200"> will recall video.php every 300 ms and as a result a new picture from the Webserver will be requested approx. 3 times per second. Additionally the network camera can be controlled via the phone keyboard:

  • Pressing "6" moves to the right
  • Pressing "4" moves to the left
  • Pressing "2" moves up
  • Pressing "8" moves down
  • Pressing "5" moves to center
  • Pressing "1" zooms in
  • Pressing "3" zooms out
  • Pressing "7" switches zoom off

Each keypress sends an HTTP request with different control parameter to the PHP Script video.php running on your Webserver <yourwebserver>. The script converts the key information received from the snom phone into control commands for the specific camera model.

<?xml version="1.0" encoding="UTF-8"?><SnomIPPhoneImageFile>                                             
 <LocationX>00</LocationX>                                            
 <LocationY>00</LocationY>

 <SoftKeyItem>
  <Name>6</Name>
  <URL>http://<yourwebserver>/video.php?key=right</URL>
 </SoftKeyItem>

 <SoftKeyItem>
  <Name>4</Name>
  <URL>http://<yourwebserver>/video.php?key=left</URL>
 </SoftKeyItem>

 <SoftKeyItem>
  <Name>2</Name>
  <URL>http://<yourwebserver>/video.php?key=up</URL>
 </SoftKeyItem>

 <SoftKeyItem>
  <Name>8</Name>
  <URL>http://<yourwebserver>/video.php?key=down</URL>
 </SoftKeyItem>

 <SoftKeyItem>
  <Name>5</Name>
  <URL>http://<yourwebserver>/video.php?key=center</URL>
 </SoftKeyItem>

 <SoftKeyItem>
  <Name>1</Name>
  <URL>http://<yourwebserver>/video.php?key=zoomin</URL>
 </SoftKeyItem>

 <SoftKeyItem>
  <Name>3</Name>
  <URL>http://<yourwebserver>/video.php?key=zoomout</URL>
 </SoftKeyItem>
 
 <SoftKeyItem>
  <Name>7</Name>
  <URL>http://<yourwebserver>/video.php?key=zoomoff</URL>
 </SoftKeyItem>
 
 <URL>http://<yourwebserver>/video_frame.php</URL>

 <fetch mil="300">http://<yourwebserver>/video.php</fetch>
</SnomIPPhoneImageFile>

Links

Ciphron Blog

Personal tools
Interoperability