https://wiki.elphel.com/api.php?action=feedcontributions&user=Khlut&feedformat=atomElphelWiki - User contributions [en]2024-03-29T11:47:36ZUser contributionsMediaWiki 1.28.0https://wiki.elphel.com/index.php?title=Eeebox&diff=10574Eeebox2011-08-04T20:41:24Z<p>Khlut: /* IP forwarding (in case the camera wants to see the big world) */</p>
<hr />
<div>===Live-USB===<br />
Boot and install the system<br />
<br />
===Installation from the CVS===<br />
<br />
Get [http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz elphel353_80_install_from_cvs.sh] open archive that contains the shell script and execute it. It is recommended that you create subdirectory in your home directory, i.e. "elphel_projects", move and execute elphel353_80_install_from_cvs.sh script there. Directory "distfiles" will be created there and used as a cache for software archives that will be downloaded during installation.<br />
<br />
mkdir -p ~/elphel_projects; cd ~/elphel_projects<br />
wget "http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz"<br />
tar zxvf elphel353_80_install_from_cvs.sh.tar.gz<br />
./elphel353_80_install_from_cvs.sh<br />
<br />
===IP forwarding (in case the camera wants to see the big world)===<br />
1. To<br />
sudo kate /etc/sysctl.conf<br />
Add<br />
net.ipv4.ip_forward=1<br />
net.ipv4.conf.default.forwarding=1<br />
net.ipv4.conf.all.forwarding=1<br />
<br />
2. To<br />
sudo kate /etc/rc.local<br />
Add<br />
iptables -P FORWARD DROP<br />
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT<br />
iptables -A FORWARD -i eth0 -j ACCEPT<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
===Links===<br />
* [https://help.ubuntu.com/community/Internet/ConnectionSharing ConnectionSharing in Ubuntu]</div>Khluthttps://wiki.elphel.com/index.php?title=Elphel_Software_Kit_for_Ubuntu&diff=10090Elphel Software Kit for Ubuntu2011-05-11T10:49:25Z<p>Khlut: /* User software */</p>
<hr />
<div>=About=<br />
<br />
This page is a simple howto for running Elphel software on (K)Ubuntu GNU/Linux.<br />
<br />
Instructions below are updated for the [http://www.kubuntu.org Kubuntu 9.04] , should work with Ubuntu 9.04 also --[[User:Andrey.filippov|Andrey.filippov]] 02:52, 24 May 2009 (CDT)''<br />
<br />
You can download this GNU/Linux distribution freely from http://www.kubuntu.org/<br />
<br />
=If you are new to GNU / Linux=<br />
Many forums and wikis are available in many languages to help you to install and use Ubuntu. Ex: http://www.google.com/search?q=forum+ubuntu (you can add "&hl=fr" or any language code to the URL)<br />
<br />
Most instructions below are commands that you need to enter in the in the terminal window. For the lines that do not end with "\" sign you just copy them one-by-one and paste in the terminal window (in KDE it is Konsole in the "System" menu). For pasting you '''can not''' use <cntrl-V> - you need to '''right-click in the terminal window and select "Paste"''' from the drop-down context menu. Alternatively you can use '''the middle mouse button''' to both copy (drag while middle mouse pressed) and paste - click it in the console window.<br />
<br />
Character "'''\'''" at the end of the line means continuation, so you can copy the whole block of text where each line but the very last ends with "\" and paste them together.<br />
<br />
Many of the commands start with "'''sudo'''" - first time system will ask you for your user password that you enter without any starts (provided you have administrative privileges).<br />
<br />
If you get some problems it is very useful to copy the error message that system outputs (avoiding anything specific to your particular installation - like user directories names) and paste them into the search box of you browser.<br />
<br />
=User software=<br />
<br />
Some software need to be patched and recompiled even if they exist in Ubuntu software repositories, some softwares are not yet packaged in Ubuntu, so you have to compile them from sources also. We try to push our software patches to the mainstream applications, but it take time and is not always possible. For Ubuntu users some packages can be downloaded and upgraded using our [https://launchpad.net/~elphel/+archive/ppa ppa on launchpad].<br />
<br />
==Mplayer==<br />
'''Kubuntu 9.10 includes MPlayer that is working with Elphel camera "out of the box"'''<br />
So for (K)Ubuntu 9.10 you just need to install<br />
sudo apt-get install mplayer-nogui mplayer gecko-mediaplayer<br />
<br />
===Mplayer - installation for (K)Ubuntu older than 9.10 release ===<br />
<br />
With the previous verions MPlayer has to be patched and recompiled, following instructions document how to do it on (K)Ubuntu or Debian based workstation.<br />
<br />
Install gecko-mediaplayer before compiling/installing MPlayer, if you do it later it will install non-patched version of MPlayer<br />
<br />
sudo apt-get gecko-mediaplayer<br />
<br />
<br />
First install some compilation dependencies, mainly libraries...<br />
<br />
<!-- sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \<br />
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev liblzo-dev gawk libjpeg62-dev libaudiofile-dev \<br />
libsmbclient-dev libxv-dev libpng3-dev libgif-dev libcdparanoia0-dev libxvidcore4-dev libdv-dev \<br />
liblivemedia-dev libfreetype6-dev em8300-headers libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \<br />
libglu-dev libartsc0-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \<br />
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev libaa1-dev libcaca-dev \<br />
libx264-dev libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \<br />
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev libmp3lame-dev<br />
<br />
'''If you are under Ubuntu 8.10 (Intrepid) replace liblame-dev at the end by libmp3lame-dev''' --><br />
<br />
sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \<br />
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev gawk libjpeg62-dev libaudiofile-dev \<br />
libsmbclient-dev libxv-dev libpng12-dev libgif-dev libcdparanoia-dev libdv4-dev \<br />
liblivemedia-dev libfreetype6-dev libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \<br />
libglu1-mesa-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \<br />
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev libaa1-dev libcaca-dev \<br />
libx264-dev libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \<br />
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev libmp3lame-dev<br />
<br />
<br />
<!--<br />
Get the MPlayer ubuntu source package:<br />
apt-get source mplayer<br />
<br />
patch the sources and compile:<br />
cd mplayer-1.0~rc2/<br />
sed s/\#define\ MAX_RTP_FRAME_SIZE\ 50000/\#define\ MAX_RTP_FRAME_SIZE\ 5000000/g \<br />
libmpdemux/demux_rtp.cpp > libmpdemux/demux_rtp.cpp_<br />
mv libmpdemux/demux_rtp.cpp_ libmpdemux/demux_rtp.cpp<br />
sudo dpkg-buildpackage <br />
cd ..<br />
<br />
install mplayer package:<br />
sudo dpkg --install mplayer_1.0~rc2-0ubuntu*.deb<br />
--><br />
Current MPlayer code is capable of working with full resolution video produced by Elphel cameras. That is not yet true for the MPlayer packages in Ubuntu repositories, so you'll have to obtain the source code from MPlayer recommended source - their Subversion (SVN) source. First you need to install Subversion itself:<br />
sudo apt-get install subversion<br />
Now create a download directory and get MPlayer source:<br />
mkdir download; cd download<br />
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer<br />
Configure, compile and prepare Debian package from that source (will take some time):<br />
cd mplayer<br />
sudo dpkg-buildpackage <br />
Occasionally dpkg-buildpackage fails to build, try the comon ./configure, make, make install way then.<br />
<br />
Now uninstall the default Ubuntu's mplayer and mencoder & install the created package:<br />
sudo apt-get remove mplayer mencoder mplayer-nogui<br />
cd ..<br />
sudo dpkg --install mplayer_1.0svn*.deb<br />
<br />
===MPlayer - testing with Elphel camera ===<br />
You should be able now to play videos with up to 5MB frames (highest quality 5MPix images are around 1 MB) as a multicast or unicast video stream. (the streamer in the camera should be ENABLED)<br />
mplayer rtsp://192.168.0.9:554 -vo x11 -fs -zoom<br />
<br />
''Update 10/09/2009: In (K)Ubuntu 9.10 (Karmic Koala) repository the '''50,000 bytes limit on the frame size''' is fixed, but unfortunately the [https://bugs.launchpad.net/ubuntu/+source/mplayer/+bug/296488 other one -'''frame width limit of 2048 pixels'''] (submitted to MPlayer SVN on May, 5, 2009) - is not''--[[User:Andrey.filippov|Andrey.filippov]] 19:03, 9 October 2009 (CDT)<br />
<br />
The first (50,000) makes you picture break after the first 50,000 bytes (only top is shown), the second (current for the 9.10) makes MPlayer to report fatal error. So you still have to use MPlayer SVN to have the full resolution from Elphel cameras.<br />
<br />
Additionally, to make MPlayer work inside the web page you need to specify video output as "x11" in the [http://howto.wikia.com/wiki/Howto_configure_MPlayer MPlayer config file] - add a line<br />
vo="x11"<br />
To ~/.mplayer/config file<br />
<br />
=For developers=<br />
''Following was written for (K)Ubuntu 9.10 and earlier, it also works with 10.04, please see revision-specific notes.''<br />
<br />
==Adding universe and multiverse sources==<br />
Please follow this howto for adding universe and multiverse sources. <br />
<br />
https://help.ubuntu.com/community/Repositories/Ubuntu<br />
<br />
or <br />
<br />
https://help.ubuntu.com/community/Repositories/Kubuntu<br />
<br />
==Install needed packages==<br />
Minimal packages:<br />
sudo apt-get install cvs build-essential autoconf flex byacc bison libglib2.0-dev tcl gettext libncurses5-dev patch zlib1g-dev nfs-kernel-server bash xutils-dev<br />
Suggested packages:<br />
sudo apt-get install kinfocenter minicom firefox graphviz doxygen ctags cervisia php5 php5-cli xchat ssh kompare git-core<br />
<br />
==Configure your NFS server==<br />
<br />
Let's say you want to configure an NFS server on your machine and your IP address is '''192.168.0.15'''.<br />
<br />
<!--Edit /etc/exports file with your favorite editor. Here I use nano.<br />
sudo nano -w /etc/exports<br />
alternatively you may edit the same file with kate<br />
Those who know how to use nano will figure that out themselves --[[User:Andrey.filippov|Andrey.filippov]] 18:09, 23 May 2009 (CDT)<br />
--><br />
Modify the configuration file:<br />
kdesudo kate /etc/exports<br />
Add at the end of the file:<br />
/nfs 192.168.0.0/255.255.0.0(rw,sync,no_root_squash)<br />
save the file.<br />
<br />
If it does not yet exist make /nfs directory and make it world writable to make it possible to write logs from the camera.<br />
sudo mkdir /nfs<br />
sudo chmod 777 -R /nfs<br />
<br />
And finally export the filesystem.<br />
sudo exportfs -a<br />
<br />
<br />
== Installation of GCC Compiler kit for Axis ETRAX processor ==<br />
==== Downloading and unpacking gcc-cris ====<br />
Download and install Cris-GCC compiler. It is needed to compile C and C++ programs for the CPU used in Elphel cameras - [http://en.wikipedia.org/wiki/ETRAX_CRIS Axis ETRAX FS] :<br />
mkdir -p ~/Downloads/axis ; cd ~/Downloads/axis<br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headers-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headersv32-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-glibc-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64.tar.gz<br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64-1--1.64-2.patch<br />
tar zxvf cris-dist-1.64.tar.gz<br />
cd cris-dist-1.64/<br />
tar zxvf ../cris-dist-linux-headers-1.64.tar.gz <br />
tar zxvf ../cris-dist-linux-headersv32-1.64.tar.gz <br />
tar zxvf ../cris-dist-glibc-1.64.tar.gz<br />
patch -p0 < ../cris-dist-1.64-1--1.64-2.patch<br />
<br />
==== Compiling gcc-cris ====<br />
Now you may proceed with compiling gcc-cris (takes some time):<br />
<br />
sudo ./install-cris-tools<br />
answer by default (enter, enter, ...)<br />
<br />
<!--<br />
Don't forget to export the path to the cris-compiler - the defaul location is /usr/local/cris, as example<br />
<br />
tobias@MoonbaseAlphaOne:~$ export PATH=$PATH:/usr/local/cris/bin<br />
<br />
If everything worked out well, you can check the compiler version with<br />
<br />
gcc-cris --version<br />
<br />
Which should result in an output like this one (example, might vary with version)<br />
<br />
cris-axis-elf-gcc (GCC) 3.2.1 Axis release R64/1.64<br />
Copyright (C) 2002 Free Software Foundation, Inc.<br />
This is free software; see the source for copying conditions. There is NO<br />
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
--><br />
<br />
== Build Elphel Software==<br />
Get the [http://sourceforge.net/projects/elphel/files/elphel353-8/install-8.0-fromcvs/elphel353_80_install_from_cvs.sh.tar.gz/download script]. Unpack & Launch.<br />
<br />
<br />
== Installation of Kdevelop 3.5 ==<br />
''note: Newer KDevelop 4 does not work with Elphel software''<br />
==== pre (K)Ubuntu 9.10 ====<br />
sudo apt-get install kdevelop<br />
<br />
==== (K)Ubuntu 9.10 (Karmic), 10.4 (Lucid) ====<br />
see [[KDevelop#Installation_of_KDevelop_3.5_on_.28K.29Ubuntu_9.10|Installation of KDevelop 3.5 on (K)Ubuntu 9.10]]<br />
<br />
== Install Icarus Verilog and GTKWave ==<br />
(If you plan to develop FPGA code or at least look how it works)<br />
<br />
GTKWave is OK from repository:<br />
sudo apt-get install gtkwave<br />
<br />
But unfortunately Icarus Verilog (package verilog) is compiled without needed support for compressed output format, so you'll have to compile it<br />
cd ~/Downloads<br />
wget "ftp://ftp.icarus.com/pub/eda/verilog/v0.9/verilog-0.9.3.tar.gz"<br />
tar zxvf verilog-0.9.3.tar.gz<br />
cd verilog-0.9.3/<br />
./configure<br />
make<br />
sudo make install<br />
<br />
== Installing Xilinx WebPack (to be moved to a separate page, just a link here)==<br />
If you plan to compile the FPGA code from the source code you will need to install appropriate software from the FPGA manufacturer web site. This is proprietary (and non-free) software provided by [http://www.xilinx.com Xilinx] free of charge. This software is called the [http://www.xilinx.com/tools/webpack.htm ISE WebPACK] and you may download it (currently some 2.2GB) after registering at Xilinx web site. Currently tested version is 10.1.03, we'll try to update our code when Xilinx will release the new version of their software.<br />
<br />
You will also need that software if you would like to simulate the FPGA functionality. Elphel camera FPGA code (written in Verilog HDL) is licensed under GNU GPLv3, simulator and waveform viewer (see below) are also Free Software, but there are a few Verilog models of some primitives of Xilinx FPGA that are not and can be only obtained from Xilinx as a part of their unisims library. For simulation we use small subset of the unisims library components and only for functional simulation so it will probably make sense to re-write those primitives models so the 2.2 GB distribution will not be needed to extract just few kilobytes of required source code.<br />
<br />
Such independent re-implementation will help us to solve another problem - we have to patch the Xilinx library components to make them work correctly with our code and the simulator we use and currently each Xilinx library update breaks our patches.<br />
<br />
When you will build Elphel software (as described later) the installation script will try to locate Xilinx software on your computer and patch a copy of unisims library. If you'll install Xilinx WebPack after building the camera software - you'll need to navigate to ''fpga'' subdirectory of the source tree and execute<br />
make clean ; make<br />
It is described in file ''README.simulation'' in that subdirectory.<br />
<br />
<br />
There are additional steps required for the Xilinx WebPACK installation if you have a 64-bit GNU/Linux operation system. The next command line detects if you are running on 64 bit version of GNU/Linux and conditionally installs '''ia64-libs'''. That library is needed if you'll install Xilinx WebPack software (Xilinx does not allow to use 64-bit programs in their free for download software and the provided installation script does not install 32-bit version on its own). There is [http://ubuntuforums.org/showthread.php?t=203459 another trick] you'll need to be aware of if you are using 32-bit Xilinx WebPack on a 64-bit GNU/Linux system.<br />
if [ `uname -m` = "x86_64" ] ; then sudo apt-get install ia32-libs ; fi<br />
<br />
==Installation of the source code of Elphel camera software==<br />
<br />
You may install Elphel source code by either of the two methods. Either from the CVS (the most current code) and form the tarball files. <br />
===Installation from the CVS===<br />
<br />
Get [http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz elphel353_80_install_from_cvs.sh] open archive that contains the shell script and execute it. It is recommended that you create subdirectory in your home directory, i.e. "elphel_projects", move and execute elphel353_80_install_from_cvs.sh script there. Directory "distfiles" will be created there and used as a cache for software archives that will be downloaded during installation.<br />
<br />
mkdir -p ~/elphel_projects; cd ~/elphel_projects<br />
wget "http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz"<br />
tar zxvf elphel353_80_install_from_cvs.sh.tar.gz<br />
./elphel353_80_install_from_cvs.sh<br />
<br />
===Installation from the tarball (release file)===<br />
http://sourceforge.net/projects/elphel<br />
<br />
* get one of the elphel353-8.0.* releases<br />
* decompress the archive<br />
* execute the ./install_elphel script<br />
./install_elphel<br />
<br />
There will be created a file build.log in the top installation directory. If you get any installation problems you can compress that file and email it to Elphel support.<br />
<br />
At the end of installation the script will generate a list of all the files in the target (camera) file system that are to be installed and compares it against the contents of the file ''target.list'' that is included in the distribution. If there are any differences -- they will be reported (there should be none). If there are some missing files it is likely that something failed to install correctly.<br />
<br />
After the installation will be completed successfully you may want to execute the following command in the top installation directory (the one that has apps, configure-files, ... subdirectories)<br />
./prep_kdevelop.php<br />
<br />
That will create ''elphel353.kdevelop'' - a project file for KDevelop IDE (version 3.5.x), you can use it as described here - [[KDevelop]]<br />
<br />
<br />
----<br />
<br />
== ImageJ and Elphel plugins for imageJ ==<br />
ImageJ is a powerful open source image processing package, written in Java. There are plugins to work with Elphel cameras, the most universal one allows opening JP46 files (stored on a file system or downloaded directly from the camera). This plugin reads meta data from the image and un-applies in-camera non-linear conversion resulting in the linearized image, where each pixel is represented by a floating point value proportional to the number of photons that were detected in that pixel.<br />
<br />
It is a very useful tool to do quantitative analysis of the camera images.<br />
<br />
===ImageJ installation ===<br />
You may download ImageJ bundled with Java from the [http://rsbweb.nih.gov/ij/download.html download page]:<br />
==== With 32-bit Java ==== <br />
cd ~/Download; wget "http://rsbweb.nih.gov/ij/download/linux/ij143-x86.tar.gz" ; tar zxvf ij143-x86.tar.gz<br />
==== With 64-bit Java ====<br />
cd ~/Download; wget "http://rsbweb.nih.gov/ij/download/linux/ij143-linux64.tar.gz" ; tar zxvf ij143-linux64.tar.gz<br />
http://rsbweb.nih.gov/ij/download/linux/ij143-linux64.tar.gz - 64-bit Java version<br />
===Running ImageJ ===<br />
There is "run" command the newly crated directory. You may start ImageJ with the following command:<br />
/Downloads/ImageJ/run<br />
That command allows Java to use 512M of system memory. If you need more you can change "512" to say "1024" in a single-line "run" script. If the run command is started from the command prompt, you'll be able to see some debug output - either from existent plugins or from your own ones. It is also very useful to see any error diagnostic output.<br />
<br />
=== Installation of Elphel plugins for ImageJ ===<br />
Elphel plugins are available in Elphel project page Git repository. To use it you first need to install git (if it was not already done):<br />
sudo apt-get install git-core<br />
<br />
Then clone the repository - directly to the ImageJ plugins directory. Provided you used the same directory for ImageJ as written above:<br />
cd ~/Downloads/ImageJ/plugins<br />
git clone git://elphel.git.sourceforge.net/gitroot/elphel/ImageJ-Elphel<br />
<br />
=== Updating Elphel plugins for ImageJ ===<br />
Later, when you'll need to update your files from the repository you will need another command:<br />
cd ~/Downloads/ImageJ/plugins/ImageJ-Elphel<br />
git pull<br />
=== Running Elphel plugin for ImageJ ===<br />
When you just install Elphel plugins you need to select<br />
~/Downloads/ImageJ/plugins/ImageJ-Elphel/JP46_Reader_camera.java<br />
That command will do exactly as it is named - first compile that source file to the Java bytecode, then execute it. Next time after you close and re-start ImageJ there will be a submenu in Plugins: Plugins->ImageJ-Elphel and JP46_Reader_camera command there,<br />
<br />
When you'll update the source files, you 'll need to re-run "Compile and run...". meanwhile just use the item in Plugins->ImageJ-Elphel menu.</div>Khluthttps://wiki.elphel.com/index.php?title=Elphel_Software_Kit_for_Ubuntu&diff=10057Elphel Software Kit for Ubuntu2011-05-04T08:18:37Z<p>Khlut: reinstall gcc now is not needed</p>
<hr />
<div>=About=<br />
<br />
This page is a simple howto for running Elphel software on (K)Ubuntu GNU/Linux.<br />
<br />
Instructions below are updated for the [http://www.kubuntu.org Kubuntu 9.04] , should work with Ubuntu 9.04 also --[[User:Andrey.filippov|Andrey.filippov]] 02:52, 24 May 2009 (CDT)''<br />
<br />
You can download this GNU/Linux distribution freely from http://www.kubuntu.org/<br />
<br />
=If you are new to GNU / Linux=<br />
Many forums and wikis are available in many languages to help you to install and use Ubuntu. Ex: http://www.google.com/search?q=forum+ubuntu (you can add "&hl=fr" or any language code to the URL)<br />
<br />
Most instructions below are commands that you need to enter in the in the terminal window. For the lines that do not end with "\" sign you just copy them one-by-one and paste in the terminal window (in KDE it is Konsole in the "System" menu). For pasting you '''can not''' use <cntrl-V> - you need to '''right-click in the terminal window and select "Paste"''' from the drop-down context menu. Alternatively you can use '''the middle mouse button''' to both copy (drag while middle mouse pressed) and paste - click it in the console window.<br />
<br />
Character "'''\'''" at the end of the line means continuation, so you can copy the whole block of text where each line but the very last ends with "\" and paste them together.<br />
<br />
Many of the commands start with "'''sudo'''" - first time system will ask you for your user password that you enter without any starts (provided you have administrative privileges).<br />
<br />
If you get some problems it is very useful to copy the error message that system outputs (avoiding anything specific to your particular installation - like user directories names) and paste them into the search box of you browser.<br />
<br />
=User software=<br />
<br />
Some software need to be patched and recompiled even if they exist in Ubuntu software repositories, some softwares are not yet packaged in Ubuntu, so you have to compile them from sources also. We try to push our software patches to the mainstream applications, but it take time and is not always possible.<br />
<br />
<br />
==Mplayer==<br />
'''Kubuntu 9.10 includes MPlayer that is working with Elphel camera "out of the box"'''<br />
So for (K)Ubuntu 9.10 you just need to install<br />
sudo apt-get install mplayer-nogui mplayer gecko-mediaplayer<br />
<br />
===Mplayer - installation for (K)Ubuntu older than 9.10 release ===<br />
<br />
With the previous verions MPlayer has to be patched and recompiled, following instructions document how to do it on (K)Ubuntu or Debian based workstation.<br />
<br />
Install gecko-mediaplayer before compiling/installing MPlayer, if you do it later it will install non-patched version of MPlayer<br />
<br />
sudo apt-get gecko-mediaplayer<br />
<br />
<br />
First install some compilation dependencies, mainly libraries...<br />
<br />
<!-- sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \<br />
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev liblzo-dev gawk libjpeg62-dev libaudiofile-dev \<br />
libsmbclient-dev libxv-dev libpng3-dev libgif-dev libcdparanoia0-dev libxvidcore4-dev libdv-dev \<br />
liblivemedia-dev libfreetype6-dev em8300-headers libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \<br />
libglu-dev libartsc0-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \<br />
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev libaa1-dev libcaca-dev \<br />
libx264-dev libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \<br />
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev libmp3lame-dev<br />
<br />
'''If you are under Ubuntu 8.10 (Intrepid) replace liblame-dev at the end by libmp3lame-dev''' --><br />
<br />
sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \<br />
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev gawk libjpeg62-dev libaudiofile-dev \<br />
libsmbclient-dev libxv-dev libpng12-dev libgif-dev libcdparanoia-dev libdv4-dev \<br />
liblivemedia-dev libfreetype6-dev libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \<br />
libglu1-mesa-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \<br />
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev libaa1-dev libcaca-dev \<br />
libx264-dev libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \<br />
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev libmp3lame-dev<br />
<br />
<br />
<!--<br />
Get the MPlayer ubuntu source package:<br />
apt-get source mplayer<br />
<br />
patch the sources and compile:<br />
cd mplayer-1.0~rc2/<br />
sed s/\#define\ MAX_RTP_FRAME_SIZE\ 50000/\#define\ MAX_RTP_FRAME_SIZE\ 5000000/g \<br />
libmpdemux/demux_rtp.cpp > libmpdemux/demux_rtp.cpp_<br />
mv libmpdemux/demux_rtp.cpp_ libmpdemux/demux_rtp.cpp<br />
sudo dpkg-buildpackage <br />
cd ..<br />
<br />
install mplayer package:<br />
sudo dpkg --install mplayer_1.0~rc2-0ubuntu*.deb<br />
--><br />
Current MPlayer code is capable of working with full resolution video produced by Elphel cameras. That is not yet true for the MPlayer packages in Ubuntu repositories, so you'll have to obtain the source code from MPlayer recommended source - their Subversion (SVN) source. First you need to install Subversion itself:<br />
sudo apt-get install subversion<br />
Now create a download directory and get MPlayer source:<br />
mkdir download; cd download<br />
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer<br />
Configure, compile and prepare Debian package from that source (will take some time):<br />
cd mplayer<br />
sudo dpkg-buildpackage <br />
Occasionally dpkg-buildpackage fails to build, try the comon ./configure, make, make install way then.<br />
<br />
Now uninstall the default Ubuntu's mplayer and mencoder & install the created package:<br />
sudo apt-get remove mplayer mencoder mplayer-nogui<br />
cd ..<br />
sudo dpkg --install mplayer_1.0svn*.deb<br />
<br />
===MPlayer - testing with Elphel camera ===<br />
You should be able now to play videos with up to 5MB frames (highest quality 5MPix images are around 1 MB) as a multicast or unicast video stream. (the streamer in the camera should be ENABLED)<br />
mplayer rtsp://192.168.0.9:554 -vo x11 -fs -zoom<br />
<br />
''Update 10/09/2009: In (K)Ubuntu 9.10 (Karmic Koala) repository the '''50,000 bytes limit on the frame size''' is fixed, but unfortunately the [https://bugs.launchpad.net/ubuntu/+source/mplayer/+bug/296488 other one -'''frame width limit of 2048 pixels'''] (submitted to MPlayer SVN on May, 5, 2009) - is not''--[[User:Andrey.filippov|Andrey.filippov]] 19:03, 9 October 2009 (CDT)<br />
<br />
The first (50,000) makes you picture break after the first 50,000 bytes (only top is shown), the second (current for the 9.10) makes MPlayer to report fatal error. So you still have to use MPlayer SVN to have the full resolution from Elphel cameras.<br />
<br />
Additionally, to make MPlayer work inside the web page you need to specify video output as "x11" in the [http://howto.wikia.com/wiki/Howto_configure_MPlayer MPlayer config file] - add a line<br />
vo="x11"<br />
To ~/.mplayer/config file<br />
<br />
=For developers=<br />
''Following was written for (K)Ubuntu 9.10 and earlier, it also works with 10.04, please see revision-specific notes.''<br />
<br />
==Adding universe and multiverse sources==<br />
Please follow this howto for adding universe and multiverse sources. <br />
<br />
https://help.ubuntu.com/community/Repositories/Ubuntu<br />
<br />
or <br />
<br />
https://help.ubuntu.com/community/Repositories/Kubuntu<br />
<br />
==Install needed packages==<br />
Minimal packages:<br />
sudo apt-get install cvs build-essential autoconf flex byacc bison libglib2.0-dev tcl gettext libncurses5-dev patch zlib1g-dev nfs-kernel-server bash xutils-dev<br />
Suggested packages:<br />
sudo apt-get install kinfocenter minicom firefox graphviz doxygen ctags cervisia php5 php5-cli xchat ssh kompare git-core<br />
<br />
==Configure your NFS server==<br />
<br />
Let's say you want to configure an NFS server on your machine and your IP address is '''192.168.0.15'''.<br />
<br />
<!--Edit /etc/exports file with your favorite editor. Here I use nano.<br />
sudo nano -w /etc/exports<br />
alternatively you may edit the same file with kate<br />
Those who know how to use nano will figure that out themselves --[[User:Andrey.filippov|Andrey.filippov]] 18:09, 23 May 2009 (CDT)<br />
--><br />
Modify the configuration file:<br />
kdesudo kate /etc/exports<br />
Add at the end of the file:<br />
/nfs 192.168.0.0/255.255.0.0(rw,sync,no_root_squash)<br />
save the file.<br />
<br />
If it does not yet exist make /nfs directory and make it world writable to make it possible to write logs from the camera.<br />
sudo mkdir /nfs<br />
sudo chmod 777 -R /nfs<br />
<br />
And finally export the filesystem.<br />
sudo exportfs -a<br />
<br />
<br />
== Installation of GCC Compiler kit for Axis ETRAX processor ==<br />
==== Downloading and unpacking gcc-cris ====<br />
Download and install Cris-GCC compiler. It is needed to compile C and C++ programs for the CPU used in Elphel cameras - [http://en.wikipedia.org/wiki/ETRAX_CRIS Axis ETRAX FS] :<br />
mkdir -p ~/Downloads/axis ; cd ~/Downloads/axis<br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headers-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headersv32-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-glibc-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64.tar.gz<br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64-1--1.64-2.patch<br />
tar zxvf cris-dist-1.64.tar.gz<br />
cd cris-dist-1.64/<br />
tar zxvf ../cris-dist-linux-headers-1.64.tar.gz <br />
tar zxvf ../cris-dist-linux-headersv32-1.64.tar.gz <br />
tar zxvf ../cris-dist-glibc-1.64.tar.gz<br />
patch -p0 < ../cris-dist-1.64-1--1.64-2.patch<br />
<br />
==== Compiling gcc-cris ====<br />
Now you may proceed with compiling gcc-cris (takes some time):<br />
<br />
sudo ./install-cris-tools<br />
answer by default (enter, enter, ...)<br />
<br />
<!--<br />
Don't forget to export the path to the cris-compiler - the defaul location is /usr/local/cris, as example<br />
<br />
tobias@MoonbaseAlphaOne:~$ export PATH=$PATH:/usr/local/cris/bin<br />
<br />
If everything worked out well, you can check the compiler version with<br />
<br />
gcc-cris --version<br />
<br />
Which should result in an output like this one (example, might vary with version)<br />
<br />
cris-axis-elf-gcc (GCC) 3.2.1 Axis release R64/1.64<br />
Copyright (C) 2002 Free Software Foundation, Inc.<br />
This is free software; see the source for copying conditions. There is NO<br />
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
--><br />
<br />
== Build Elphel Software==<br />
Get the [http://sourceforge.net/projects/elphel/files/elphel353-8/install-8.0-fromcvs/elphel353_80_install_from_cvs.sh.tar.gz/download script]. Unpack & Launch.<br />
<br />
<br />
== Installation of Kdevelop 3.5 ==<br />
''note: Newer KDevelop 4 does not work with Elphel software''<br />
==== pre (K)Ubuntu 9.10 ====<br />
sudo apt-get install kdevelop<br />
<br />
==== (K)Ubuntu 9.10 (Karmic), 10.4 (Lucid) ====<br />
see [[KDevelop#Installation_of_KDevelop_3.5_on_.28K.29Ubuntu_9.10|Installation of KDevelop 3.5 on (K)Ubuntu 9.10]]<br />
<br />
== Install Icarus Verilog and GTKWave ==<br />
(If you plan to develop FPGA code or at least look how it works)<br />
<br />
GTKWave is OK from repository:<br />
sudo apt-get install gtkwave<br />
<br />
But unfortunately Icarus Verilog (package verilog) is compiled without needed support for compressed output format, so you'll have to compile it<br />
cd ~/Downloads<br />
wget "ftp://ftp.icarus.com/pub/eda/verilog/v0.9/verilog-0.9.3.tar.gz"<br />
tar zxvf verilog-0.9.3.tar.gz<br />
cd verilog-0.9.3/<br />
./configure<br />
make<br />
sudo make install<br />
<br />
== Installing Xilinx WebPack (to be moved to a separate page, just a link here)==<br />
If you plan to compile the FPGA code from the source code you will need to install appropriate software from the FPGA manufacturer web site. This is proprietary (and non-free) software provided by [http://www.xilinx.com Xilinx] free of charge. This software is called the [http://www.xilinx.com/tools/webpack.htm ISE WebPACK] and you may download it (currently some 2.2GB) after registering at Xilinx web site. Currently tested version is 10.1.03, we'll try to update our code when Xilinx will release the new version of their software.<br />
<br />
You will also need that software if you would like to simulate the FPGA functionality. Elphel camera FPGA code (written in Verilog HDL) is licensed under GNU GPLv3, simulator and waveform viewer (see below) are also Free Software, but there are a few Verilog models of some primitives of Xilinx FPGA that are not and can be only obtained from Xilinx as a part of their unisims library. For simulation we use small subset of the unisims library components and only for functional simulation so it will probably make sense to re-write those primitives models so the 2.2 GB distribution will not be needed to extract just few kilobytes of required source code.<br />
<br />
Such independent re-implementation will help us to solve another problem - we have to patch the Xilinx library components to make them work correctly with our code and the simulator we use and currently each Xilinx library update breaks our patches.<br />
<br />
When you will build Elphel software (as described later) the installation script will try to locate Xilinx software on your computer and patch a copy of unisims library. If you'll install Xilinx WebPack after building the camera software - you'll need to navigate to ''fpga'' subdirectory of the source tree and execute<br />
make clean ; make<br />
It is described in file ''README.simulation'' in that subdirectory.<br />
<br />
<br />
There are additional steps required for the Xilinx WebPACK installation if you have a 64-bit GNU/Linux operation system. The next command line detects if you are running on 64 bit version of GNU/Linux and conditionally installs '''ia64-libs'''. That library is needed if you'll install Xilinx WebPack software (Xilinx does not allow to use 64-bit programs in their free for download software and the provided installation script does not install 32-bit version on its own). There is [http://ubuntuforums.org/showthread.php?t=203459 another trick] you'll need to be aware of if you are using 32-bit Xilinx WebPack on a 64-bit GNU/Linux system.<br />
if [ `uname -m` = "x86_64" ] ; then sudo apt-get install ia32-libs ; fi<br />
<br />
==Installation of the source code of Elphel camera software==<br />
<br />
You may install Elphel source code by either of the two methods. Either from the CVS (the most current code) and form the tarball files. <br />
===Installation from the CVS===<br />
<br />
Get [http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz elphel353_80_install_from_cvs.sh] open archive that contains the shell script and execute it. It is recommended that you create subdirectory in your home directory, i.e. "elphel_projects", move and execute elphel353_80_install_from_cvs.sh script there. Directory "distfiles" will be created there and used as a cache for software archives that will be downloaded during installation.<br />
<br />
mkdir -p ~/elphel_projects; cd ~/elphel_projects<br />
wget "http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz"<br />
tar zxvf elphel353_80_install_from_cvs.sh.tar.gz<br />
./elphel353_80_install_from_cvs.sh<br />
<br />
===Installation from the tarball (release file)===<br />
http://sourceforge.net/projects/elphel<br />
<br />
* get one of the elphel353-8.0.* releases<br />
* decompress the archive<br />
* execute the ./install_elphel script<br />
./install_elphel<br />
<br />
There will be created a file build.log in the top installation directory. If you get any installation problems you can compress that file and email it to Elphel support.<br />
<br />
At the end of installation the script will generate a list of all the files in the target (camera) file system that are to be installed and compares it against the contents of the file ''target.list'' that is included in the distribution. If there are any differences -- they will be reported (there should be none). If there are some missing files it is likely that something failed to install correctly.<br />
<br />
After the installation will be completed successfully you may want to execute the following command in the top installation directory (the one that has apps, configure-files, ... subdirectories)<br />
./prep_kdevelop.php<br />
<br />
That will create ''elphel353.kdevelop'' - a project file for KDevelop IDE (version 3.5.x), you can use it as described here - [[KDevelop]]<br />
<br />
<br />
----<br />
<br />
== ImageJ and Elphel plugins for imageJ ==<br />
ImageJ is a powerful open source image processing package, written in Java. There are plugins to work with Elphel cameras, the most universal one allows opening JP46 files (stored on a file system or downloaded directly from the camera). This plugin reads meta data from the image and un-applies in-camera non-linear conversion resulting in the linearized image, where each pixel is represented by a floating point value proportional to the number of photons that were detected in that pixel.<br />
<br />
It is a very useful tool to do quantitative analysis of the camera images.<br />
<br />
===ImageJ installation ===<br />
You may download ImageJ bundled with Java from the [http://rsbweb.nih.gov/ij/download.html download page]:<br />
==== With 32-bit Java ==== <br />
cd ~/Download; wget "http://rsbweb.nih.gov/ij/download/linux/ij143-x86.tar.gz" ; tar zxvf ij143-x86.tar.gz<br />
==== With 64-bit Java ====<br />
cd ~/Download; wget "http://rsbweb.nih.gov/ij/download/linux/ij143-linux64.tar.gz" ; tar zxvf ij143-linux64.tar.gz<br />
http://rsbweb.nih.gov/ij/download/linux/ij143-linux64.tar.gz - 64-bit Java version<br />
===Running ImageJ ===<br />
There is "run" command the newly crated directory. You may start ImageJ with the following command:<br />
/Downloads/ImageJ/run<br />
That command allows Java to use 512M of system memory. If you need more you can change "512" to say "1024" in a single-line "run" script. If the run command is started from the command prompt, you'll be able to see some debug output - either from existent plugins or from your own ones. It is also very useful to see any error diagnostic output.<br />
<br />
=== Installation of Elphel plugins for ImageJ ===<br />
Elphel plugins are available in Elphel project page Git repository. To use it you first need to install git (if it was not already done):<br />
sudo apt-get install git-core<br />
<br />
Then clone the repository - directly to the ImageJ plugins directory. Provided you used the same directory for ImageJ as written above:<br />
cd ~/Downloads/ImageJ/plugins<br />
git clone git://elphel.git.sourceforge.net/gitroot/elphel/ImageJ-Elphel<br />
<br />
=== Updating Elphel plugins for ImageJ ===<br />
Later, when you'll need to update your files from the repository you will need another command:<br />
cd ~/Downloads/ImageJ/plugins/ImageJ-Elphel<br />
git pull<br />
=== Running Elphel plugin for ImageJ ===<br />
When you just install Elphel plugins you need to select<br />
~/Downloads/ImageJ/plugins/ImageJ-Elphel/JP46_Reader_camera.java<br />
That command will do exactly as it is named - first compile that source file to the Java bytecode, then execute it. Next time after you close and re-start ImageJ there will be a submenu in Plugins: Plugins->ImageJ-Elphel and JP46_Reader_camera command there,<br />
<br />
When you'll update the source files, you 'll need to re-run "Compile and run...". meanwhile just use the item in Plugins->ImageJ-Elphel menu.</div>Khluthttps://wiki.elphel.com/index.php?title=Elphel_Software_Kit_for_Ubuntu&diff=10044Elphel Software Kit for Ubuntu2011-04-30T07:15:56Z<p>Khlut: /* Obsolette: Temporary replacing current GCC (4.4.x) with the older one (gcc-4.2) to compile gcc-cris */</p>
<hr />
<div>=About=<br />
<br />
This page is a simple howto for running Elphel software on (K)Ubuntu GNU/Linux.<br />
<br />
Instructions below are updated for the [http://www.kubuntu.org Kubuntu 9.04] , should work with Ubuntu 9.04 also --[[User:Andrey.filippov|Andrey.filippov]] 02:52, 24 May 2009 (CDT)''<br />
<br />
You can download this GNU/Linux distribution freely from http://www.kubuntu.org/<br />
<br />
=If you are new to GNU / Linux=<br />
Many forums and wikis are available in many languages to help you to install and use Ubuntu. Ex: http://www.google.com/search?q=forum+ubuntu (you can add "&hl=fr" or any language code to the URL)<br />
<br />
Most instructions below are commands that you need to enter in the in the terminal window. For the lines that do not end with "\" sign you just copy them one-by-one and paste in the terminal window (in KDE it is Konsole in the "System" menu). For pasting you '''can not''' use <cntrl-V> - you need to '''right-click in the terminal window and select "Paste"''' from the drop-down context menu. Alternatively you can use '''the middle mouse button''' to both copy (drag while middle mouse pressed) and paste - click it in the console window.<br />
<br />
Character "'''\'''" at the end of the line means continuation, so you can copy the whole block of text where each line but the very last ends with "\" and paste them together.<br />
<br />
Many of the commands start with "'''sudo'''" - first time system will ask you for your user password that you enter without any starts (provided you have administrative privileges).<br />
<br />
If you get some problems it is very useful to copy the error message that system outputs (avoiding anything specific to your particular installation - like user directories names) and paste them into the search box of you browser.<br />
<br />
=User software=<br />
<br />
Some software need to be patched and recompiled even if they exist in Ubuntu software repositories, some softwares are not yet packaged in Ubuntu, so you have to compile them from sources also. We try to push our software patches to the mainstream applications, but it take time and is not always possible.<br />
<br />
<br />
==Mplayer==<br />
'''Kubuntu 9.10 includes MPlayer that is working with Elphel camera "out of the box"'''<br />
So for (K)Ubuntu 9.10 you just need to install<br />
sudo apt-get install mplayer-nogui mplayer gecko-mediaplayer<br />
<br />
===Mplayer - installation for (K)Ubuntu older than 9.10 release ===<br />
<br />
With the previous verions MPlayer has to be patched and recompiled, following instructions document how to do it on (K)Ubuntu or Debian based workstation.<br />
<br />
Install gecko-mediaplayer before compiling/installing MPlayer, if you do it later it will install non-patched version of MPlayer<br />
<br />
sudo apt-get gecko-mediaplayer<br />
<br />
<br />
First install some compilation dependencies, mainly libraries...<br />
<br />
<!-- sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \<br />
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev liblzo-dev gawk libjpeg62-dev libaudiofile-dev \<br />
libsmbclient-dev libxv-dev libpng3-dev libgif-dev libcdparanoia0-dev libxvidcore4-dev libdv-dev \<br />
liblivemedia-dev libfreetype6-dev em8300-headers libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \<br />
libglu-dev libartsc0-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \<br />
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev libaa1-dev libcaca-dev \<br />
libx264-dev libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \<br />
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev libmp3lame-dev<br />
<br />
'''If you are under Ubuntu 8.10 (Intrepid) replace liblame-dev at the end by libmp3lame-dev''' --><br />
<br />
sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \<br />
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev gawk libjpeg62-dev libaudiofile-dev \<br />
libsmbclient-dev libxv-dev libpng12-dev libgif-dev libcdparanoia-dev libdv4-dev \<br />
liblivemedia-dev libfreetype6-dev libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \<br />
libglu1-mesa-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \<br />
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev libaa1-dev libcaca-dev \<br />
libx264-dev libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \<br />
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev libmp3lame-dev<br />
<br />
<br />
<!--<br />
Get the MPlayer ubuntu source package:<br />
apt-get source mplayer<br />
<br />
patch the sources and compile:<br />
cd mplayer-1.0~rc2/<br />
sed s/\#define\ MAX_RTP_FRAME_SIZE\ 50000/\#define\ MAX_RTP_FRAME_SIZE\ 5000000/g \<br />
libmpdemux/demux_rtp.cpp > libmpdemux/demux_rtp.cpp_<br />
mv libmpdemux/demux_rtp.cpp_ libmpdemux/demux_rtp.cpp<br />
sudo dpkg-buildpackage <br />
cd ..<br />
<br />
install mplayer package:<br />
sudo dpkg --install mplayer_1.0~rc2-0ubuntu*.deb<br />
--><br />
Current MPlayer code is capable of working with full resolution video produced by Elphel cameras. That is not yet true for the MPlayer packages in Ubuntu repositories, so you'll have to obtain the source code from MPlayer recommended source - their Subversion (SVN) source. First you need to install Subversion itself:<br />
sudo apt-get install subversion<br />
Now create a download directory and get MPlayer source:<br />
mkdir download; cd download<br />
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer<br />
Configure, compile and prepare Debian package from that source (will take some time):<br />
cd mplayer<br />
sudo dpkg-buildpackage <br />
Occasionally dpkg-buildpackage fails to build, try the comon ./configure, make, make install way then.<br />
<br />
Now uninstall the default Ubuntu's mplayer and mencoder & install the created package:<br />
sudo apt-get remove mplayer mencoder mplayer-nogui<br />
cd ..<br />
sudo dpkg --install mplayer_1.0svn*.deb<br />
<br />
===MPlayer - testing with Elphel camera ===<br />
You should be able now to play videos with up to 5MB frames (highest quality 5MPix images are around 1 MB) as a multicast or unicast video stream. (the streamer in the camera should be ENABLED)<br />
mplayer rtsp://192.168.0.9:554 -vo x11 -fs -zoom<br />
<br />
''Update 10/09/2009: In (K)Ubuntu 9.10 (Karmic Koala) repository the '''50,000 bytes limit on the frame size''' is fixed, but unfortunately the [https://bugs.launchpad.net/ubuntu/+source/mplayer/+bug/296488 other one -'''frame width limit of 2048 pixels'''] (submitted to MPlayer SVN on May, 5, 2009) - is not''--[[User:Andrey.filippov|Andrey.filippov]] 19:03, 9 October 2009 (CDT)<br />
<br />
The first (50,000) makes you picture break after the first 50,000 bytes (only top is shown), the second (current for the 9.10) makes MPlayer to report fatal error. So you still have to use MPlayer SVN to have the full resolution from Elphel cameras.<br />
<br />
Additionally, to make MPlayer work inside the web page you need to specify video output as "x11" in the [http://howto.wikia.com/wiki/Howto_configure_MPlayer MPlayer config file] - add a line<br />
vo="x11"<br />
To ~/.mplayer/config file<br />
<br />
=For developers=<br />
''Following was written for (K)Ubuntu 9.10 and earlier, it also works with 10.04, please see revision-specific notes.''<br />
<br />
==Adding universe and multiverse sources==<br />
Please follow this howto for adding universe and multiverse sources. <br />
<br />
https://help.ubuntu.com/community/Repositories/Ubuntu<br />
<br />
or <br />
<br />
https://help.ubuntu.com/community/Repositories/Kubuntu<br />
<br />
==Install needed packages==<br />
Minimal packages:<br />
sudo apt-get install cvs build-essential autoconf flex byacc bison libglib2.0-dev tcl gettext libncurses5-dev patch zlib1g-dev nfs-kernel-server bash xutils-dev<br />
Suggested packages:<br />
sudo apt-get install kinfocenter minicom firefox graphviz doxygen ctags cervisia php5 php5-cli xchat ssh kompare git-core<br />
<br />
==Configure your NFS server==<br />
<br />
Let's say you want to configure an NFS server on your machine and your IP address is '''192.168.0.15'''.<br />
<br />
<!--Edit /etc/exports file with your favorite editor. Here I use nano.<br />
sudo nano -w /etc/exports<br />
alternatively you may edit the same file with kate<br />
Those who know how to use nano will figure that out themselves --[[User:Andrey.filippov|Andrey.filippov]] 18:09, 23 May 2009 (CDT)<br />
--><br />
Modify the configuration file:<br />
kdesudo kate /etc/exports<br />
Add at the end of the file:<br />
/nfs 192.168.0.0/255.255.0.0(rw,sync,no_root_squash)<br />
save the file.<br />
<br />
If it does not yet exist make /nfs directory and make it world writable to make it possible to write logs from the camera.<br />
sudo mkdir /nfs<br />
sudo chmod 777 -R /nfs<br />
<br />
And finally export the filesystem.<br />
sudo exportfs -a<br />
<br />
<br />
== Installation of GCC Compiler kit for Axis ETRAX processor ==<br />
==== Downloading and unpacking gcc-cris ====<br />
Download and install Cris-GCC compiler. It is needed to compile C and C++ programs for the CPU used in Elphel cameras - [http://en.wikipedia.org/wiki/ETRAX_CRIS Axis ETRAX FS] :<br />
mkdir -p ~/Downloads/axis ; cd ~/Downloads/axis<br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headers-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headersv32-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-glibc-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64.tar.gz<br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64-1--1.64-2.patch<br />
tar zxvf cris-dist-1.64.tar.gz<br />
cd cris-dist-1.64/<br />
tar zxvf ../cris-dist-linux-headers-1.64.tar.gz <br />
tar zxvf ../cris-dist-linux-headersv32-1.64.tar.gz <br />
tar zxvf ../cris-dist-glibc-1.64.tar.gz<br />
patch -p0 < ../cris-dist-1.64-1--1.64-2.patch<br />
<br />
==== Obsolete: Temporary replacing current GCC (4.4.x) with the older one (gcc-4.2) to compile gcc-cris ====<br />
<br />
Unfortunately CRIS compiler does not compile with GCC 4.3.x and the only know working solution would be to temporary downgrade the compiler. You'll rather upgrade it back to the current one after gcc-cris is built:<br />
<br />
sudo apt-get remove gcc<br />
See what other packages are removed as being dependent on GCC. You may copy that list an re-install them later with "sudo apt-get install ''list of removed packages''<br />
<br />
===== Additional step for (K)Ubuntu 10.04(Lucid) & 10.10(Maverick)=====<br />
There is no gcc-4.2 in Lucid/Maverick repository, you need to add older one to your /etc/apt/sources.list file (i.e. with "sudo kate /etc/apt/sources.list"): <br />
deb http://us.archive.ubuntu.com/ubuntu/ karmic main<br />
deb http://us.archive.ubuntu.com/ubuntu/ karmic universe<br />
and then run<br />
sudo apt-get update<br />
<br />
===== Installing gcc-4.2 (all versions) ===== <br />
<br />
sudo apt-get install gcc-4.2 g++-4.2<br />
<br />
And link them as default version:<br />
sudo ln -sf /usr/bin/gcc-4.2 /usr/bin/gcc<br />
sudo ln -sf /usr/bin/g++-4.2 /usr/bin/g++<br />
sudo ln -sf /usr/bin/gcc-4.2 /usr/bin/cc<br />
<br />
You may verify the current GCC version (make sure it is 4.2.x) with the following command:<br />
gcc --version<br />
<br />
==== Compiling gcc-cris ====<br />
Now you may proceed with compiling gcc-cris (takes some time):<br />
<br />
sudo ./install-cris-tools<br />
answer by default (enter, enter, ...)<br />
<br />
If everything finished OK you may reinstall the GCC back (and add other packages you may have removed):<br />
<br />
==== Re-installing current GCC and related packages ====<br />
<br />
sudo apt-get install build-essential g++ gcc<br />
<br />
<!--<br />
Don't forget to export the path to the cris-compiler - the defaul location is /usr/local/cris, as example<br />
<br />
tobias@MoonbaseAlphaOne:~$ export PATH=$PATH:/usr/local/cris/bin<br />
<br />
If everything worked out well, you can check the compiler version with<br />
<br />
gcc-cris --version<br />
<br />
Which should result in an output like this one (example, might vary with version)<br />
<br />
cris-axis-elf-gcc (GCC) 3.2.1 Axis release R64/1.64<br />
Copyright (C) 2002 Free Software Foundation, Inc.<br />
This is free software; see the source for copying conditions. There is NO<br />
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
--><br />
<br />
== Build Elphel Software==<br />
Get the [http://sourceforge.net/projects/elphel/files/elphel353-8/install-8.0-fromcvs/elphel353_80_install_from_cvs.sh.tar.gz/download script]. Unpack & Launch.<br />
<br />
<br />
== Installation of Kdevelop 3.5 ==<br />
''note: Newer KDevelop 4 does not work with Elphel software''<br />
==== pre (K)Ubuntu 9.10 ====<br />
sudo apt-get install kdevelop<br />
<br />
==== (K)Ubuntu 9.10 (Karmic), 10.4 (Lucid) ====<br />
see [[KDevelop#Installation_of_KDevelop_3.5_on_.28K.29Ubuntu_9.10|Installation of KDevelop 3.5 on (K)Ubuntu 9.10]]<br />
<br />
== Install Icarus Verilog and GTKWave ==<br />
(If you plan to develop FPGA code or at least look how it works)<br />
<br />
GTKWave is OK from repository:<br />
sudo apt-get install gtkwave<br />
<br />
But unfortunately Icarus Verilog (package verilog) is compiled without needed support for compressed output format, so you'll have to compile it<br />
cd ~/Downloads<br />
wget "ftp://ftp.icarus.com/pub/eda/verilog/v0.9/verilog-0.9.3.tar.gz"<br />
tar zxvf verilog-0.9.3.tar.gz<br />
cd verilog-0.9.3/<br />
./configure<br />
make<br />
sudo make install<br />
<br />
== Installing Xilinx WebPack (to be moved to a separate page, just a link here)==<br />
If you plan to compile the FPGA code from the source code you will need to install appropriate software from the FPGA manufacturer web site. This is proprietary (and non-free) software provided by [http://www.xilinx.com Xilinx] free of charge. This software is called the [http://www.xilinx.com/tools/webpack.htm ISE WebPACK] and you may download it (currently some 2.2GB) after registering at Xilinx web site. Currently tested version is 10.1.03, we'll try to update our code when Xilinx will release the new version of their software.<br />
<br />
You will also need that software if you would like to simulate the FPGA functionality. Elphel camera FPGA code (written in Verilog HDL) is licensed under GNU GPLv3, simulator and waveform viewer (see below) are also Free Software, but there are a few Verilog models of some primitives of Xilinx FPGA that are not and can be only obtained from Xilinx as a part of their unisims library. For simulation we use small subset of the unisims library components and only for functional simulation so it will probably make sense to re-write those primitives models so the 2.2 GB distribution will not be needed to extract just few kilobytes of required source code.<br />
<br />
Such independent re-implementation will help us to solve another problem - we have to patch the Xilinx library components to make them work correctly with our code and the simulator we use and currently each Xilinx library update breaks our patches.<br />
<br />
When you will build Elphel software (as described later) the installation script will try to locate Xilinx software on your computer and patch a copy of unisims library. If you'll install Xilinx WebPack after building the camera software - you'll need to navigate to ''fpga'' subdirectory of the source tree and execute<br />
make clean ; make<br />
It is described in file ''README.simulation'' in that subdirectory.<br />
<br />
<br />
There are additional steps required for the Xilinx WebPACK installation if you have a 64-bit GNU/Linux operation system. The next command line detects if you are running on 64 bit version of GNU/Linux and conditionally installs '''ia64-libs'''. That library is needed if you'll install Xilinx WebPack software (Xilinx does not allow to use 64-bit programs in their free for download software and the provided installation script does not install 32-bit version on its own). There is [http://ubuntuforums.org/showthread.php?t=203459 another trick] you'll need to be aware of if you are using 32-bit Xilinx WebPack on a 64-bit GNU/Linux system.<br />
if [ `uname -m` = "x86_64" ] ; then sudo apt-get install ia32-libs ; fi<br />
<br />
==Installation of the source code of Elphel camera software==<br />
<br />
You may install Elphel source code by either of the two methods. Either from the CVS (the most current code) and form the tarball files. <br />
===Installation from the CVS===<br />
<br />
Get [http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz elphel353_80_install_from_cvs.sh] open archive that contains the shell script and execute it. It is recommended that you create subdirectory in your home directory, i.e. "elphel_projects", move and execute elphel353_80_install_from_cvs.sh script there. Directory "distfiles" will be created there and used as a cache for software archives that will be downloaded during installation.<br />
<br />
mkdir -p ~/elphel_projects; cd ~/elphel_projects<br />
wget "http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz"<br />
tar zxvf elphel353_80_install_from_cvs.sh.tar.gz<br />
./elphel353_80_install_from_cvs.sh<br />
<br />
===Installation from the tarball (release file)===<br />
http://sourceforge.net/projects/elphel<br />
<br />
* get one of the elphel353-8.0.* releases<br />
* decompress the archive<br />
* execute the ./install_elphel script<br />
./install_elphel<br />
<br />
There will be created a file build.log in the top installation directory. If you get any installation problems you can compress that file and email it to Elphel support.<br />
<br />
At the end of installation the script will generate a list of all the files in the target (camera) file system that are to be installed and compares it against the contents of the file ''target.list'' that is included in the distribution. If there are any differences -- they will be reported (there should be none). If there are some missing files it is likely that something failed to install correctly.<br />
<br />
After the installation will be completed successfully you may want to execute the following command in the top installation directory (the one that has apps, configure-files, ... subdirectories)<br />
./prep_kdevelop.php<br />
<br />
That will create ''elphel353.kdevelop'' - a project file for KDevelop IDE (version 3.5.x), you can use it as described here - [[KDevelop]]<br />
<br />
<br />
----<br />
<br />
== ImageJ and Elphel plugins for imageJ ==<br />
ImageJ is a powerful open source image processing package, written in Java. There are plugins to work with Elphel cameras, the most universal one allows opening JP46 files (stored on a file system or downloaded directly from the camera). This plugin reads meta data from the image and un-applies in-camera non-linear conversion resulting in the linearized image, where each pixel is represented by a floating point value proportional to the number of photons that were detected in that pixel.<br />
<br />
It is a very useful tool to do quantitative analysis of the camera images.<br />
<br />
===ImageJ installation ===<br />
You may download ImageJ bundled with Java from the [http://rsbweb.nih.gov/ij/download.html download page]:<br />
==== With 32-bit Java ==== <br />
cd ~/Download; wget "http://rsbweb.nih.gov/ij/download/linux/ij143-x86.tar.gz" ; tar zxvf ij143-x86.tar.gz<br />
==== With 64-bit Java ====<br />
cd ~/Download; wget "http://rsbweb.nih.gov/ij/download/linux/ij143-linux64.tar.gz" ; tar zxvf ij143-linux64.tar.gz<br />
http://rsbweb.nih.gov/ij/download/linux/ij143-linux64.tar.gz - 64-bit Java version<br />
===Running ImageJ ===<br />
There is "run" command the newly crated directory. You may start ImageJ with the following command:<br />
/Downloads/ImageJ/run<br />
That command allows Java to use 512M of system memory. If you need more you can change "512" to say "1024" in a single-line "run" script. If the run command is started from the command prompt, you'll be able to see some debug output - either from existent plugins or from your own ones. It is also very useful to see any error diagnostic output.<br />
<br />
=== Installation of Elphel plugins for ImageJ ===<br />
Elphel plugins are available in Elphel project page Git repository. To use it you first need to install git (if it was not already done):<br />
sudo apt-get install git-core<br />
<br />
Then clone the repository - directly to the ImageJ plugins directory. Provided you used the same directory for ImageJ as written above:<br />
cd ~/Downloads/ImageJ/plugins<br />
git clone git://elphel.git.sourceforge.net/gitroot/elphel/ImageJ-Elphel<br />
<br />
=== Updating Elphel plugins for ImageJ ===<br />
Later, when you'll need to update your files from the repository you will need another command:<br />
cd ~/Downloads/ImageJ/plugins/ImageJ-Elphel<br />
git pull<br />
=== Running Elphel plugin for ImageJ ===<br />
When you just install Elphel plugins you need to select<br />
~/Downloads/ImageJ/plugins/ImageJ-Elphel/JP46_Reader_camera.java<br />
That command will do exactly as it is named - first compile that source file to the Java bytecode, then execute it. Next time after you close and re-start ImageJ there will be a submenu in Plugins: Plugins->ImageJ-Elphel and JP46_Reader_camera command there,<br />
<br />
When you'll update the source files, you 'll need to re-run "Compile and run...". meanwhile just use the item in Plugins->ImageJ-Elphel menu.</div>Khluthttps://wiki.elphel.com/index.php?title=Elphel_Software_Kit_for_Ubuntu&diff=10043Elphel Software Kit for Ubuntu2011-04-30T07:14:22Z<p>Khlut: /* Temporary replacing current GCC (4.4.x) with the older one (gcc-4.2) to compile gcc-cris */</p>
<hr />
<div>=About=<br />
<br />
This page is a simple howto for running Elphel software on (K)Ubuntu GNU/Linux.<br />
<br />
Instructions below are updated for the [http://www.kubuntu.org Kubuntu 9.04] , should work with Ubuntu 9.04 also --[[User:Andrey.filippov|Andrey.filippov]] 02:52, 24 May 2009 (CDT)''<br />
<br />
You can download this GNU/Linux distribution freely from http://www.kubuntu.org/<br />
<br />
=If you are new to GNU / Linux=<br />
Many forums and wikis are available in many languages to help you to install and use Ubuntu. Ex: http://www.google.com/search?q=forum+ubuntu (you can add "&hl=fr" or any language code to the URL)<br />
<br />
Most instructions below are commands that you need to enter in the in the terminal window. For the lines that do not end with "\" sign you just copy them one-by-one and paste in the terminal window (in KDE it is Konsole in the "System" menu). For pasting you '''can not''' use <cntrl-V> - you need to '''right-click in the terminal window and select "Paste"''' from the drop-down context menu. Alternatively you can use '''the middle mouse button''' to both copy (drag while middle mouse pressed) and paste - click it in the console window.<br />
<br />
Character "'''\'''" at the end of the line means continuation, so you can copy the whole block of text where each line but the very last ends with "\" and paste them together.<br />
<br />
Many of the commands start with "'''sudo'''" - first time system will ask you for your user password that you enter without any starts (provided you have administrative privileges).<br />
<br />
If you get some problems it is very useful to copy the error message that system outputs (avoiding anything specific to your particular installation - like user directories names) and paste them into the search box of you browser.<br />
<br />
=User software=<br />
<br />
Some software need to be patched and recompiled even if they exist in Ubuntu software repositories, some softwares are not yet packaged in Ubuntu, so you have to compile them from sources also. We try to push our software patches to the mainstream applications, but it take time and is not always possible.<br />
<br />
<br />
==Mplayer==<br />
'''Kubuntu 9.10 includes MPlayer that is working with Elphel camera "out of the box"'''<br />
So for (K)Ubuntu 9.10 you just need to install<br />
sudo apt-get install mplayer-nogui mplayer gecko-mediaplayer<br />
<br />
===Mplayer - installation for (K)Ubuntu older than 9.10 release ===<br />
<br />
With the previous verions MPlayer has to be patched and recompiled, following instructions document how to do it on (K)Ubuntu or Debian based workstation.<br />
<br />
Install gecko-mediaplayer before compiling/installing MPlayer, if you do it later it will install non-patched version of MPlayer<br />
<br />
sudo apt-get gecko-mediaplayer<br />
<br />
<br />
First install some compilation dependencies, mainly libraries...<br />
<br />
<!-- sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \<br />
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev liblzo-dev gawk libjpeg62-dev libaudiofile-dev \<br />
libsmbclient-dev libxv-dev libpng3-dev libgif-dev libcdparanoia0-dev libxvidcore4-dev libdv-dev \<br />
liblivemedia-dev libfreetype6-dev em8300-headers libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \<br />
libglu-dev libartsc0-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \<br />
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev libaa1-dev libcaca-dev \<br />
libx264-dev libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \<br />
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev libmp3lame-dev<br />
<br />
'''If you are under Ubuntu 8.10 (Intrepid) replace liblame-dev at the end by libmp3lame-dev''' --><br />
<br />
sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \<br />
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev gawk libjpeg62-dev libaudiofile-dev \<br />
libsmbclient-dev libxv-dev libpng12-dev libgif-dev libcdparanoia-dev libdv4-dev \<br />
liblivemedia-dev libfreetype6-dev libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \<br />
libglu1-mesa-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \<br />
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev libaa1-dev libcaca-dev \<br />
libx264-dev libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \<br />
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev libmp3lame-dev<br />
<br />
<br />
<!--<br />
Get the MPlayer ubuntu source package:<br />
apt-get source mplayer<br />
<br />
patch the sources and compile:<br />
cd mplayer-1.0~rc2/<br />
sed s/\#define\ MAX_RTP_FRAME_SIZE\ 50000/\#define\ MAX_RTP_FRAME_SIZE\ 5000000/g \<br />
libmpdemux/demux_rtp.cpp > libmpdemux/demux_rtp.cpp_<br />
mv libmpdemux/demux_rtp.cpp_ libmpdemux/demux_rtp.cpp<br />
sudo dpkg-buildpackage <br />
cd ..<br />
<br />
install mplayer package:<br />
sudo dpkg --install mplayer_1.0~rc2-0ubuntu*.deb<br />
--><br />
Current MPlayer code is capable of working with full resolution video produced by Elphel cameras. That is not yet true for the MPlayer packages in Ubuntu repositories, so you'll have to obtain the source code from MPlayer recommended source - their Subversion (SVN) source. First you need to install Subversion itself:<br />
sudo apt-get install subversion<br />
Now create a download directory and get MPlayer source:<br />
mkdir download; cd download<br />
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer<br />
Configure, compile and prepare Debian package from that source (will take some time):<br />
cd mplayer<br />
sudo dpkg-buildpackage <br />
Occasionally dpkg-buildpackage fails to build, try the comon ./configure, make, make install way then.<br />
<br />
Now uninstall the default Ubuntu's mplayer and mencoder & install the created package:<br />
sudo apt-get remove mplayer mencoder mplayer-nogui<br />
cd ..<br />
sudo dpkg --install mplayer_1.0svn*.deb<br />
<br />
===MPlayer - testing with Elphel camera ===<br />
You should be able now to play videos with up to 5MB frames (highest quality 5MPix images are around 1 MB) as a multicast or unicast video stream. (the streamer in the camera should be ENABLED)<br />
mplayer rtsp://192.168.0.9:554 -vo x11 -fs -zoom<br />
<br />
''Update 10/09/2009: In (K)Ubuntu 9.10 (Karmic Koala) repository the '''50,000 bytes limit on the frame size''' is fixed, but unfortunately the [https://bugs.launchpad.net/ubuntu/+source/mplayer/+bug/296488 other one -'''frame width limit of 2048 pixels'''] (submitted to MPlayer SVN on May, 5, 2009) - is not''--[[User:Andrey.filippov|Andrey.filippov]] 19:03, 9 October 2009 (CDT)<br />
<br />
The first (50,000) makes you picture break after the first 50,000 bytes (only top is shown), the second (current for the 9.10) makes MPlayer to report fatal error. So you still have to use MPlayer SVN to have the full resolution from Elphel cameras.<br />
<br />
Additionally, to make MPlayer work inside the web page you need to specify video output as "x11" in the [http://howto.wikia.com/wiki/Howto_configure_MPlayer MPlayer config file] - add a line<br />
vo="x11"<br />
To ~/.mplayer/config file<br />
<br />
=For developers=<br />
''Following was written for (K)Ubuntu 9.10 and earlier, it also works with 10.04, please see revision-specific notes.''<br />
<br />
==Adding universe and multiverse sources==<br />
Please follow this howto for adding universe and multiverse sources. <br />
<br />
https://help.ubuntu.com/community/Repositories/Ubuntu<br />
<br />
or <br />
<br />
https://help.ubuntu.com/community/Repositories/Kubuntu<br />
<br />
==Install needed packages==<br />
Minimal packages:<br />
sudo apt-get install cvs build-essential autoconf flex byacc bison libglib2.0-dev tcl gettext libncurses5-dev patch zlib1g-dev nfs-kernel-server bash xutils-dev<br />
Suggested packages:<br />
sudo apt-get install kinfocenter minicom firefox graphviz doxygen ctags cervisia php5 php5-cli xchat ssh kompare git-core<br />
<br />
==Configure your NFS server==<br />
<br />
Let's say you want to configure an NFS server on your machine and your IP address is '''192.168.0.15'''.<br />
<br />
<!--Edit /etc/exports file with your favorite editor. Here I use nano.<br />
sudo nano -w /etc/exports<br />
alternatively you may edit the same file with kate<br />
Those who know how to use nano will figure that out themselves --[[User:Andrey.filippov|Andrey.filippov]] 18:09, 23 May 2009 (CDT)<br />
--><br />
Modify the configuration file:<br />
kdesudo kate /etc/exports<br />
Add at the end of the file:<br />
/nfs 192.168.0.0/255.255.0.0(rw,sync,no_root_squash)<br />
save the file.<br />
<br />
If it does not yet exist make /nfs directory and make it world writable to make it possible to write logs from the camera.<br />
sudo mkdir /nfs<br />
sudo chmod 777 -R /nfs<br />
<br />
And finally export the filesystem.<br />
sudo exportfs -a<br />
<br />
<br />
== Installation of GCC Compiler kit for Axis ETRAX processor ==<br />
==== Downloading and unpacking gcc-cris ====<br />
Download and install Cris-GCC compiler. It is needed to compile C and C++ programs for the CPU used in Elphel cameras - [http://en.wikipedia.org/wiki/ETRAX_CRIS Axis ETRAX FS] :<br />
mkdir -p ~/Downloads/axis ; cd ~/Downloads/axis<br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headers-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headersv32-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-glibc-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64.tar.gz<br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64-1--1.64-2.patch<br />
tar zxvf cris-dist-1.64.tar.gz<br />
cd cris-dist-1.64/<br />
tar zxvf ../cris-dist-linux-headers-1.64.tar.gz <br />
tar zxvf ../cris-dist-linux-headersv32-1.64.tar.gz <br />
tar zxvf ../cris-dist-glibc-1.64.tar.gz<br />
patch -p0 < ../cris-dist-1.64-1--1.64-2.patch<br />
<br />
==== Obsolette: Temporary replacing current GCC (4.4.x) with the older one (gcc-4.2) to compile gcc-cris ====<br />
<br />
Unfortunately CRIS compiler does not compile with GCC 4.3.x and the only know working solution would be to temporary downgrade the compiler. You'll rather upgrade it back to the current one after gcc-cris is built:<br />
<br />
sudo apt-get remove gcc<br />
See what other packages are removed as being dependent on GCC. You may copy that list an re-install them later with "sudo apt-get install ''list of removed packages''<br />
<br />
===== Additional step for (K)Ubuntu 10.04(Lucid) & 10.10(Maverick)=====<br />
There is no gcc-4.2 in Lucid/Maverick repository, you need to add older one to your /etc/apt/sources.list file (i.e. with "sudo kate /etc/apt/sources.list"): <br />
deb http://us.archive.ubuntu.com/ubuntu/ karmic main<br />
deb http://us.archive.ubuntu.com/ubuntu/ karmic universe<br />
and then run<br />
sudo apt-get update<br />
<br />
===== Installing gcc-4.2 (all versions) ===== <br />
<br />
sudo apt-get install gcc-4.2 g++-4.2<br />
<br />
And link them as default version:<br />
sudo ln -sf /usr/bin/gcc-4.2 /usr/bin/gcc<br />
sudo ln -sf /usr/bin/g++-4.2 /usr/bin/g++<br />
sudo ln -sf /usr/bin/gcc-4.2 /usr/bin/cc<br />
<br />
You may verify the current GCC version (make sure it is 4.2.x) with the following command:<br />
gcc --version<br />
<br />
==== Compiling gcc-cris ====<br />
Now you may proceed with compiling gcc-cris (takes some time):<br />
<br />
sudo ./install-cris-tools<br />
answer by default (enter, enter, ...)<br />
<br />
If everything finished OK you may reinstall the GCC back (and add other packages you may have removed):<br />
<br />
==== Re-installing current GCC and related packages ====<br />
<br />
sudo apt-get install build-essential g++ gcc<br />
<br />
<!--<br />
Don't forget to export the path to the cris-compiler - the defaul location is /usr/local/cris, as example<br />
<br />
tobias@MoonbaseAlphaOne:~$ export PATH=$PATH:/usr/local/cris/bin<br />
<br />
If everything worked out well, you can check the compiler version with<br />
<br />
gcc-cris --version<br />
<br />
Which should result in an output like this one (example, might vary with version)<br />
<br />
cris-axis-elf-gcc (GCC) 3.2.1 Axis release R64/1.64<br />
Copyright (C) 2002 Free Software Foundation, Inc.<br />
This is free software; see the source for copying conditions. There is NO<br />
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
--><br />
<br />
== Build Elphel Software==<br />
Get the [http://sourceforge.net/projects/elphel/files/elphel353-8/install-8.0-fromcvs/elphel353_80_install_from_cvs.sh.tar.gz/download script]. Unpack & Launch.<br />
<br />
<br />
== Installation of Kdevelop 3.5 ==<br />
''note: Newer KDevelop 4 does not work with Elphel software''<br />
==== pre (K)Ubuntu 9.10 ====<br />
sudo apt-get install kdevelop<br />
<br />
==== (K)Ubuntu 9.10 (Karmic), 10.4 (Lucid) ====<br />
see [[KDevelop#Installation_of_KDevelop_3.5_on_.28K.29Ubuntu_9.10|Installation of KDevelop 3.5 on (K)Ubuntu 9.10]]<br />
<br />
== Install Icarus Verilog and GTKWave ==<br />
(If you plan to develop FPGA code or at least look how it works)<br />
<br />
GTKWave is OK from repository:<br />
sudo apt-get install gtkwave<br />
<br />
But unfortunately Icarus Verilog (package verilog) is compiled without needed support for compressed output format, so you'll have to compile it<br />
cd ~/Downloads<br />
wget "ftp://ftp.icarus.com/pub/eda/verilog/v0.9/verilog-0.9.3.tar.gz"<br />
tar zxvf verilog-0.9.3.tar.gz<br />
cd verilog-0.9.3/<br />
./configure<br />
make<br />
sudo make install<br />
<br />
== Installing Xilinx WebPack (to be moved to a separate page, just a link here)==<br />
If you plan to compile the FPGA code from the source code you will need to install appropriate software from the FPGA manufacturer web site. This is proprietary (and non-free) software provided by [http://www.xilinx.com Xilinx] free of charge. This software is called the [http://www.xilinx.com/tools/webpack.htm ISE WebPACK] and you may download it (currently some 2.2GB) after registering at Xilinx web site. Currently tested version is 10.1.03, we'll try to update our code when Xilinx will release the new version of their software.<br />
<br />
You will also need that software if you would like to simulate the FPGA functionality. Elphel camera FPGA code (written in Verilog HDL) is licensed under GNU GPLv3, simulator and waveform viewer (see below) are also Free Software, but there are a few Verilog models of some primitives of Xilinx FPGA that are not and can be only obtained from Xilinx as a part of their unisims library. For simulation we use small subset of the unisims library components and only for functional simulation so it will probably make sense to re-write those primitives models so the 2.2 GB distribution will not be needed to extract just few kilobytes of required source code.<br />
<br />
Such independent re-implementation will help us to solve another problem - we have to patch the Xilinx library components to make them work correctly with our code and the simulator we use and currently each Xilinx library update breaks our patches.<br />
<br />
When you will build Elphel software (as described later) the installation script will try to locate Xilinx software on your computer and patch a copy of unisims library. If you'll install Xilinx WebPack after building the camera software - you'll need to navigate to ''fpga'' subdirectory of the source tree and execute<br />
make clean ; make<br />
It is described in file ''README.simulation'' in that subdirectory.<br />
<br />
<br />
There are additional steps required for the Xilinx WebPACK installation if you have a 64-bit GNU/Linux operation system. The next command line detects if you are running on 64 bit version of GNU/Linux and conditionally installs '''ia64-libs'''. That library is needed if you'll install Xilinx WebPack software (Xilinx does not allow to use 64-bit programs in their free for download software and the provided installation script does not install 32-bit version on its own). There is [http://ubuntuforums.org/showthread.php?t=203459 another trick] you'll need to be aware of if you are using 32-bit Xilinx WebPack on a 64-bit GNU/Linux system.<br />
if [ `uname -m` = "x86_64" ] ; then sudo apt-get install ia32-libs ; fi<br />
<br />
==Installation of the source code of Elphel camera software==<br />
<br />
You may install Elphel source code by either of the two methods. Either from the CVS (the most current code) and form the tarball files. <br />
===Installation from the CVS===<br />
<br />
Get [http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz elphel353_80_install_from_cvs.sh] open archive that contains the shell script and execute it. It is recommended that you create subdirectory in your home directory, i.e. "elphel_projects", move and execute elphel353_80_install_from_cvs.sh script there. Directory "distfiles" will be created there and used as a cache for software archives that will be downloaded during installation.<br />
<br />
mkdir -p ~/elphel_projects; cd ~/elphel_projects<br />
wget "http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz"<br />
tar zxvf elphel353_80_install_from_cvs.sh.tar.gz<br />
./elphel353_80_install_from_cvs.sh<br />
<br />
===Installation from the tarball (release file)===<br />
http://sourceforge.net/projects/elphel<br />
<br />
* get one of the elphel353-8.0.* releases<br />
* decompress the archive<br />
* execute the ./install_elphel script<br />
./install_elphel<br />
<br />
There will be created a file build.log in the top installation directory. If you get any installation problems you can compress that file and email it to Elphel support.<br />
<br />
At the end of installation the script will generate a list of all the files in the target (camera) file system that are to be installed and compares it against the contents of the file ''target.list'' that is included in the distribution. If there are any differences -- they will be reported (there should be none). If there are some missing files it is likely that something failed to install correctly.<br />
<br />
After the installation will be completed successfully you may want to execute the following command in the top installation directory (the one that has apps, configure-files, ... subdirectories)<br />
./prep_kdevelop.php<br />
<br />
That will create ''elphel353.kdevelop'' - a project file for KDevelop IDE (version 3.5.x), you can use it as described here - [[KDevelop]]<br />
<br />
<br />
----<br />
<br />
== ImageJ and Elphel plugins for imageJ ==<br />
ImageJ is a powerful open source image processing package, written in Java. There are plugins to work with Elphel cameras, the most universal one allows opening JP46 files (stored on a file system or downloaded directly from the camera). This plugin reads meta data from the image and un-applies in-camera non-linear conversion resulting in the linearized image, where each pixel is represented by a floating point value proportional to the number of photons that were detected in that pixel.<br />
<br />
It is a very useful tool to do quantitative analysis of the camera images.<br />
<br />
===ImageJ installation ===<br />
You may download ImageJ bundled with Java from the [http://rsbweb.nih.gov/ij/download.html download page]:<br />
==== With 32-bit Java ==== <br />
cd ~/Download; wget "http://rsbweb.nih.gov/ij/download/linux/ij143-x86.tar.gz" ; tar zxvf ij143-x86.tar.gz<br />
==== With 64-bit Java ====<br />
cd ~/Download; wget "http://rsbweb.nih.gov/ij/download/linux/ij143-linux64.tar.gz" ; tar zxvf ij143-linux64.tar.gz<br />
http://rsbweb.nih.gov/ij/download/linux/ij143-linux64.tar.gz - 64-bit Java version<br />
===Running ImageJ ===<br />
There is "run" command the newly crated directory. You may start ImageJ with the following command:<br />
/Downloads/ImageJ/run<br />
That command allows Java to use 512M of system memory. If you need more you can change "512" to say "1024" in a single-line "run" script. If the run command is started from the command prompt, you'll be able to see some debug output - either from existent plugins or from your own ones. It is also very useful to see any error diagnostic output.<br />
<br />
=== Installation of Elphel plugins for ImageJ ===<br />
Elphel plugins are available in Elphel project page Git repository. To use it you first need to install git (if it was not already done):<br />
sudo apt-get install git-core<br />
<br />
Then clone the repository - directly to the ImageJ plugins directory. Provided you used the same directory for ImageJ as written above:<br />
cd ~/Downloads/ImageJ/plugins<br />
git clone git://elphel.git.sourceforge.net/gitroot/elphel/ImageJ-Elphel<br />
<br />
=== Updating Elphel plugins for ImageJ ===<br />
Later, when you'll need to update your files from the repository you will need another command:<br />
cd ~/Downloads/ImageJ/plugins/ImageJ-Elphel<br />
git pull<br />
=== Running Elphel plugin for ImageJ ===<br />
When you just install Elphel plugins you need to select<br />
~/Downloads/ImageJ/plugins/ImageJ-Elphel/JP46_Reader_camera.java<br />
That command will do exactly as it is named - first compile that source file to the Java bytecode, then execute it. Next time after you close and re-start ImageJ there will be a submenu in Plugins: Plugins->ImageJ-Elphel and JP46_Reader_camera command there,<br />
<br />
When you'll update the source files, you 'll need to re-run "Compile and run...". meanwhile just use the item in Plugins->ImageJ-Elphel menu.</div>Khluthttps://wiki.elphel.com/index.php?title=Elphel_Software_Kit_for_Ubuntu&diff=10042Elphel Software Kit for Ubuntu2011-04-30T07:12:59Z<p>Khlut: /* Downloading and unpacking gcc-cris */</p>
<hr />
<div>=About=<br />
<br />
This page is a simple howto for running Elphel software on (K)Ubuntu GNU/Linux.<br />
<br />
Instructions below are updated for the [http://www.kubuntu.org Kubuntu 9.04] , should work with Ubuntu 9.04 also --[[User:Andrey.filippov|Andrey.filippov]] 02:52, 24 May 2009 (CDT)''<br />
<br />
You can download this GNU/Linux distribution freely from http://www.kubuntu.org/<br />
<br />
=If you are new to GNU / Linux=<br />
Many forums and wikis are available in many languages to help you to install and use Ubuntu. Ex: http://www.google.com/search?q=forum+ubuntu (you can add "&hl=fr" or any language code to the URL)<br />
<br />
Most instructions below are commands that you need to enter in the in the terminal window. For the lines that do not end with "\" sign you just copy them one-by-one and paste in the terminal window (in KDE it is Konsole in the "System" menu). For pasting you '''can not''' use <cntrl-V> - you need to '''right-click in the terminal window and select "Paste"''' from the drop-down context menu. Alternatively you can use '''the middle mouse button''' to both copy (drag while middle mouse pressed) and paste - click it in the console window.<br />
<br />
Character "'''\'''" at the end of the line means continuation, so you can copy the whole block of text where each line but the very last ends with "\" and paste them together.<br />
<br />
Many of the commands start with "'''sudo'''" - first time system will ask you for your user password that you enter without any starts (provided you have administrative privileges).<br />
<br />
If you get some problems it is very useful to copy the error message that system outputs (avoiding anything specific to your particular installation - like user directories names) and paste them into the search box of you browser.<br />
<br />
=User software=<br />
<br />
Some software need to be patched and recompiled even if they exist in Ubuntu software repositories, some softwares are not yet packaged in Ubuntu, so you have to compile them from sources also. We try to push our software patches to the mainstream applications, but it take time and is not always possible.<br />
<br />
<br />
==Mplayer==<br />
'''Kubuntu 9.10 includes MPlayer that is working with Elphel camera "out of the box"'''<br />
So for (K)Ubuntu 9.10 you just need to install<br />
sudo apt-get install mplayer-nogui mplayer gecko-mediaplayer<br />
<br />
===Mplayer - installation for (K)Ubuntu older than 9.10 release ===<br />
<br />
With the previous verions MPlayer has to be patched and recompiled, following instructions document how to do it on (K)Ubuntu or Debian based workstation.<br />
<br />
Install gecko-mediaplayer before compiling/installing MPlayer, if you do it later it will install non-patched version of MPlayer<br />
<br />
sudo apt-get gecko-mediaplayer<br />
<br />
<br />
First install some compilation dependencies, mainly libraries...<br />
<br />
<!-- sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \<br />
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev liblzo-dev gawk libjpeg62-dev libaudiofile-dev \<br />
libsmbclient-dev libxv-dev libpng3-dev libgif-dev libcdparanoia0-dev libxvidcore4-dev libdv-dev \<br />
liblivemedia-dev libfreetype6-dev em8300-headers libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \<br />
libglu-dev libartsc0-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \<br />
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev libaa1-dev libcaca-dev \<br />
libx264-dev libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \<br />
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev libmp3lame-dev<br />
<br />
'''If you are under Ubuntu 8.10 (Intrepid) replace liblame-dev at the end by libmp3lame-dev''' --><br />
<br />
sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \<br />
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev gawk libjpeg62-dev libaudiofile-dev \<br />
libsmbclient-dev libxv-dev libpng12-dev libgif-dev libcdparanoia-dev libdv4-dev \<br />
liblivemedia-dev libfreetype6-dev libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \<br />
libglu1-mesa-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \<br />
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev libaa1-dev libcaca-dev \<br />
libx264-dev libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \<br />
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev libmp3lame-dev<br />
<br />
<br />
<!--<br />
Get the MPlayer ubuntu source package:<br />
apt-get source mplayer<br />
<br />
patch the sources and compile:<br />
cd mplayer-1.0~rc2/<br />
sed s/\#define\ MAX_RTP_FRAME_SIZE\ 50000/\#define\ MAX_RTP_FRAME_SIZE\ 5000000/g \<br />
libmpdemux/demux_rtp.cpp > libmpdemux/demux_rtp.cpp_<br />
mv libmpdemux/demux_rtp.cpp_ libmpdemux/demux_rtp.cpp<br />
sudo dpkg-buildpackage <br />
cd ..<br />
<br />
install mplayer package:<br />
sudo dpkg --install mplayer_1.0~rc2-0ubuntu*.deb<br />
--><br />
Current MPlayer code is capable of working with full resolution video produced by Elphel cameras. That is not yet true for the MPlayer packages in Ubuntu repositories, so you'll have to obtain the source code from MPlayer recommended source - their Subversion (SVN) source. First you need to install Subversion itself:<br />
sudo apt-get install subversion<br />
Now create a download directory and get MPlayer source:<br />
mkdir download; cd download<br />
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer<br />
Configure, compile and prepare Debian package from that source (will take some time):<br />
cd mplayer<br />
sudo dpkg-buildpackage <br />
Occasionally dpkg-buildpackage fails to build, try the comon ./configure, make, make install way then.<br />
<br />
Now uninstall the default Ubuntu's mplayer and mencoder & install the created package:<br />
sudo apt-get remove mplayer mencoder mplayer-nogui<br />
cd ..<br />
sudo dpkg --install mplayer_1.0svn*.deb<br />
<br />
===MPlayer - testing with Elphel camera ===<br />
You should be able now to play videos with up to 5MB frames (highest quality 5MPix images are around 1 MB) as a multicast or unicast video stream. (the streamer in the camera should be ENABLED)<br />
mplayer rtsp://192.168.0.9:554 -vo x11 -fs -zoom<br />
<br />
''Update 10/09/2009: In (K)Ubuntu 9.10 (Karmic Koala) repository the '''50,000 bytes limit on the frame size''' is fixed, but unfortunately the [https://bugs.launchpad.net/ubuntu/+source/mplayer/+bug/296488 other one -'''frame width limit of 2048 pixels'''] (submitted to MPlayer SVN on May, 5, 2009) - is not''--[[User:Andrey.filippov|Andrey.filippov]] 19:03, 9 October 2009 (CDT)<br />
<br />
The first (50,000) makes you picture break after the first 50,000 bytes (only top is shown), the second (current for the 9.10) makes MPlayer to report fatal error. So you still have to use MPlayer SVN to have the full resolution from Elphel cameras.<br />
<br />
Additionally, to make MPlayer work inside the web page you need to specify video output as "x11" in the [http://howto.wikia.com/wiki/Howto_configure_MPlayer MPlayer config file] - add a line<br />
vo="x11"<br />
To ~/.mplayer/config file<br />
<br />
=For developers=<br />
''Following was written for (K)Ubuntu 9.10 and earlier, it also works with 10.04, please see revision-specific notes.''<br />
<br />
==Adding universe and multiverse sources==<br />
Please follow this howto for adding universe and multiverse sources. <br />
<br />
https://help.ubuntu.com/community/Repositories/Ubuntu<br />
<br />
or <br />
<br />
https://help.ubuntu.com/community/Repositories/Kubuntu<br />
<br />
==Install needed packages==<br />
Minimal packages:<br />
sudo apt-get install cvs build-essential autoconf flex byacc bison libglib2.0-dev tcl gettext libncurses5-dev patch zlib1g-dev nfs-kernel-server bash xutils-dev<br />
Suggested packages:<br />
sudo apt-get install kinfocenter minicom firefox graphviz doxygen ctags cervisia php5 php5-cli xchat ssh kompare git-core<br />
<br />
==Configure your NFS server==<br />
<br />
Let's say you want to configure an NFS server on your machine and your IP address is '''192.168.0.15'''.<br />
<br />
<!--Edit /etc/exports file with your favorite editor. Here I use nano.<br />
sudo nano -w /etc/exports<br />
alternatively you may edit the same file with kate<br />
Those who know how to use nano will figure that out themselves --[[User:Andrey.filippov|Andrey.filippov]] 18:09, 23 May 2009 (CDT)<br />
--><br />
Modify the configuration file:<br />
kdesudo kate /etc/exports<br />
Add at the end of the file:<br />
/nfs 192.168.0.0/255.255.0.0(rw,sync,no_root_squash)<br />
save the file.<br />
<br />
If it does not yet exist make /nfs directory and make it world writable to make it possible to write logs from the camera.<br />
sudo mkdir /nfs<br />
sudo chmod 777 -R /nfs<br />
<br />
And finally export the filesystem.<br />
sudo exportfs -a<br />
<br />
<br />
== Installation of GCC Compiler kit for Axis ETRAX processor ==<br />
==== Downloading and unpacking gcc-cris ====<br />
Download and install Cris-GCC compiler. It is needed to compile C and C++ programs for the CPU used in Elphel cameras - [http://en.wikipedia.org/wiki/ETRAX_CRIS Axis ETRAX FS] :<br />
mkdir -p ~/Downloads/axis ; cd ~/Downloads/axis<br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headers-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headersv32-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-glibc-1.64.tar.gz <br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64.tar.gz<br />
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64-1--1.64-2.patch<br />
tar zxvf cris-dist-1.64.tar.gz<br />
cd cris-dist-1.64/<br />
tar zxvf ../cris-dist-linux-headers-1.64.tar.gz <br />
tar zxvf ../cris-dist-linux-headersv32-1.64.tar.gz <br />
tar zxvf ../cris-dist-glibc-1.64.tar.gz<br />
patch -p0 < ../cris-dist-1.64-1--1.64-2.patch<br />
<br />
==== Temporary replacing current GCC (4.4.x) with the older one (gcc-4.2) to compile gcc-cris====<br />
<br />
Unfortunately CRIS compiler does not compile with GCC 4.3.x and the only know working solution would be to temporary downgrade the compiler. You'll rather upgrade it back to the current one after gcc-cris is built:<br />
<br />
sudo apt-get remove gcc<br />
See what other packages are removed as being dependent on GCC. You may copy that list an re-install them later with "sudo apt-get install ''list of removed packages''<br />
<br />
===== Additional step for (K)Ubuntu 10.04(Lucid) & 10.10(Maverick)=====<br />
There is no gcc-4.2 in Lucid/Maverick repository, you need to add older one to your /etc/apt/sources.list file (i.e. with "sudo kate /etc/apt/sources.list"): <br />
deb http://us.archive.ubuntu.com/ubuntu/ karmic main<br />
deb http://us.archive.ubuntu.com/ubuntu/ karmic universe<br />
and then run<br />
sudo apt-get update<br />
<br />
===== Installing gcc-4.2 (all versions) ===== <br />
<br />
sudo apt-get install gcc-4.2 g++-4.2<br />
<br />
And link them as default version:<br />
sudo ln -sf /usr/bin/gcc-4.2 /usr/bin/gcc<br />
sudo ln -sf /usr/bin/g++-4.2 /usr/bin/g++<br />
sudo ln -sf /usr/bin/gcc-4.2 /usr/bin/cc<br />
<br />
You may verify the current GCC version (make sure it is 4.2.x) with the following command:<br />
gcc --version<br />
==== Compiling gcc-cris ====<br />
Now you may proceed with compiling gcc-cris (takes some time):<br />
<br />
sudo ./install-cris-tools<br />
answer by default (enter, enter, ...)<br />
<br />
If everything finished OK you may reinstall the GCC back (and add other packages you may have removed):<br />
<br />
==== Re-installing current GCC and related packages ====<br />
<br />
sudo apt-get install build-essential g++ gcc<br />
<br />
<!--<br />
Don't forget to export the path to the cris-compiler - the defaul location is /usr/local/cris, as example<br />
<br />
tobias@MoonbaseAlphaOne:~$ export PATH=$PATH:/usr/local/cris/bin<br />
<br />
If everything worked out well, you can check the compiler version with<br />
<br />
gcc-cris --version<br />
<br />
Which should result in an output like this one (example, might vary with version)<br />
<br />
cris-axis-elf-gcc (GCC) 3.2.1 Axis release R64/1.64<br />
Copyright (C) 2002 Free Software Foundation, Inc.<br />
This is free software; see the source for copying conditions. There is NO<br />
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
--><br />
<br />
== Build Elphel Software==<br />
Get the [http://sourceforge.net/projects/elphel/files/elphel353-8/install-8.0-fromcvs/elphel353_80_install_from_cvs.sh.tar.gz/download script]. Unpack & Launch.<br />
<br />
<br />
== Installation of Kdevelop 3.5 ==<br />
''note: Newer KDevelop 4 does not work with Elphel software''<br />
==== pre (K)Ubuntu 9.10 ====<br />
sudo apt-get install kdevelop<br />
<br />
==== (K)Ubuntu 9.10 (Karmic), 10.4 (Lucid) ====<br />
see [[KDevelop#Installation_of_KDevelop_3.5_on_.28K.29Ubuntu_9.10|Installation of KDevelop 3.5 on (K)Ubuntu 9.10]]<br />
<br />
== Install Icarus Verilog and GTKWave ==<br />
(If you plan to develop FPGA code or at least look how it works)<br />
<br />
GTKWave is OK from repository:<br />
sudo apt-get install gtkwave<br />
<br />
But unfortunately Icarus Verilog (package verilog) is compiled without needed support for compressed output format, so you'll have to compile it<br />
cd ~/Downloads<br />
wget "ftp://ftp.icarus.com/pub/eda/verilog/v0.9/verilog-0.9.3.tar.gz"<br />
tar zxvf verilog-0.9.3.tar.gz<br />
cd verilog-0.9.3/<br />
./configure<br />
make<br />
sudo make install<br />
<br />
== Installing Xilinx WebPack (to be moved to a separate page, just a link here)==<br />
If you plan to compile the FPGA code from the source code you will need to install appropriate software from the FPGA manufacturer web site. This is proprietary (and non-free) software provided by [http://www.xilinx.com Xilinx] free of charge. This software is called the [http://www.xilinx.com/tools/webpack.htm ISE WebPACK] and you may download it (currently some 2.2GB) after registering at Xilinx web site. Currently tested version is 10.1.03, we'll try to update our code when Xilinx will release the new version of their software.<br />
<br />
You will also need that software if you would like to simulate the FPGA functionality. Elphel camera FPGA code (written in Verilog HDL) is licensed under GNU GPLv3, simulator and waveform viewer (see below) are also Free Software, but there are a few Verilog models of some primitives of Xilinx FPGA that are not and can be only obtained from Xilinx as a part of their unisims library. For simulation we use small subset of the unisims library components and only for functional simulation so it will probably make sense to re-write those primitives models so the 2.2 GB distribution will not be needed to extract just few kilobytes of required source code.<br />
<br />
Such independent re-implementation will help us to solve another problem - we have to patch the Xilinx library components to make them work correctly with our code and the simulator we use and currently each Xilinx library update breaks our patches.<br />
<br />
When you will build Elphel software (as described later) the installation script will try to locate Xilinx software on your computer and patch a copy of unisims library. If you'll install Xilinx WebPack after building the camera software - you'll need to navigate to ''fpga'' subdirectory of the source tree and execute<br />
make clean ; make<br />
It is described in file ''README.simulation'' in that subdirectory.<br />
<br />
<br />
There are additional steps required for the Xilinx WebPACK installation if you have a 64-bit GNU/Linux operation system. The next command line detects if you are running on 64 bit version of GNU/Linux and conditionally installs '''ia64-libs'''. That library is needed if you'll install Xilinx WebPack software (Xilinx does not allow to use 64-bit programs in their free for download software and the provided installation script does not install 32-bit version on its own). There is [http://ubuntuforums.org/showthread.php?t=203459 another trick] you'll need to be aware of if you are using 32-bit Xilinx WebPack on a 64-bit GNU/Linux system.<br />
if [ `uname -m` = "x86_64" ] ; then sudo apt-get install ia32-libs ; fi<br />
<br />
==Installation of the source code of Elphel camera software==<br />
<br />
You may install Elphel source code by either of the two methods. Either from the CVS (the most current code) and form the tarball files. <br />
===Installation from the CVS===<br />
<br />
Get [http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz elphel353_80_install_from_cvs.sh] open archive that contains the shell script and execute it. It is recommended that you create subdirectory in your home directory, i.e. "elphel_projects", move and execute elphel353_80_install_from_cvs.sh script there. Directory "distfiles" will be created there and used as a cache for software archives that will be downloaded during installation.<br />
<br />
mkdir -p ~/elphel_projects; cd ~/elphel_projects<br />
wget "http://downloads.sourceforge.net/elphel/elphel353_80_install_from_cvs.sh.tar.gz"<br />
tar zxvf elphel353_80_install_from_cvs.sh.tar.gz<br />
./elphel353_80_install_from_cvs.sh<br />
<br />
===Installation from the tarball (release file)===<br />
http://sourceforge.net/projects/elphel<br />
<br />
* get one of the elphel353-8.0.* releases<br />
* decompress the archive<br />
* execute the ./install_elphel script<br />
./install_elphel<br />
<br />
There will be created a file build.log in the top installation directory. If you get any installation problems you can compress that file and email it to Elphel support.<br />
<br />
At the end of installation the script will generate a list of all the files in the target (camera) file system that are to be installed and compares it against the contents of the file ''target.list'' that is included in the distribution. If there are any differences -- they will be reported (there should be none). If there are some missing files it is likely that something failed to install correctly.<br />
<br />
After the installation will be completed successfully you may want to execute the following command in the top installation directory (the one that has apps, configure-files, ... subdirectories)<br />
./prep_kdevelop.php<br />
<br />
That will create ''elphel353.kdevelop'' - a project file for KDevelop IDE (version 3.5.x), you can use it as described here - [[KDevelop]]<br />
<br />
<br />
----<br />
<br />
== ImageJ and Elphel plugins for imageJ ==<br />
ImageJ is a powerful open source image processing package, written in Java. There are plugins to work with Elphel cameras, the most universal one allows opening JP46 files (stored on a file system or downloaded directly from the camera). This plugin reads meta data from the image and un-applies in-camera non-linear conversion resulting in the linearized image, where each pixel is represented by a floating point value proportional to the number of photons that were detected in that pixel.<br />
<br />
It is a very useful tool to do quantitative analysis of the camera images.<br />
<br />
===ImageJ installation ===<br />
You may download ImageJ bundled with Java from the [http://rsbweb.nih.gov/ij/download.html download page]:<br />
==== With 32-bit Java ==== <br />
cd ~/Download; wget "http://rsbweb.nih.gov/ij/download/linux/ij143-x86.tar.gz" ; tar zxvf ij143-x86.tar.gz<br />
==== With 64-bit Java ====<br />
cd ~/Download; wget "http://rsbweb.nih.gov/ij/download/linux/ij143-linux64.tar.gz" ; tar zxvf ij143-linux64.tar.gz<br />
http://rsbweb.nih.gov/ij/download/linux/ij143-linux64.tar.gz - 64-bit Java version<br />
===Running ImageJ ===<br />
There is "run" command the newly crated directory. You may start ImageJ with the following command:<br />
/Downloads/ImageJ/run<br />
That command allows Java to use 512M of system memory. If you need more you can change "512" to say "1024" in a single-line "run" script. If the run command is started from the command prompt, you'll be able to see some debug output - either from existent plugins or from your own ones. It is also very useful to see any error diagnostic output.<br />
<br />
=== Installation of Elphel plugins for ImageJ ===<br />
Elphel plugins are available in Elphel project page Git repository. To use it you first need to install git (if it was not already done):<br />
sudo apt-get install git-core<br />
<br />
Then clone the repository - directly to the ImageJ plugins directory. Provided you used the same directory for ImageJ as written above:<br />
cd ~/Downloads/ImageJ/plugins<br />
git clone git://elphel.git.sourceforge.net/gitroot/elphel/ImageJ-Elphel<br />
<br />
=== Updating Elphel plugins for ImageJ ===<br />
Later, when you'll need to update your files from the repository you will need another command:<br />
cd ~/Downloads/ImageJ/plugins/ImageJ-Elphel<br />
git pull<br />
=== Running Elphel plugin for ImageJ ===<br />
When you just install Elphel plugins you need to select<br />
~/Downloads/ImageJ/plugins/ImageJ-Elphel/JP46_Reader_camera.java<br />
That command will do exactly as it is named - first compile that source file to the Java bytecode, then execute it. Next time after you close and re-start ImageJ there will be a submenu in Plugins: Plugins->ImageJ-Elphel and JP46_Reader_camera command there,<br />
<br />
When you'll update the source files, you 'll need to re-run "Compile and run...". meanwhile just use the item in Plugins->ImageJ-Elphel menu.</div>Khluthttps://wiki.elphel.com/index.php?title=333_prices&diff=3089333 prices2007-04-18T05:49:27Z<p>Khlut: Reverted edit of FnwX35, changed back to last version by Andrey.filippov</p>
<hr />
<div>{{Manual Header}}<br />
<br />
{| border="1" cellpadding="2"<br />
|+Elphel Model 333 price list (MSRP)<br />
|-<br />
| model number || Description || price, USD || Notes<br />
|-<br />
| NC333L || Network camera base || $650 || 1,7<br />
|-<br />
| NC333L-12 || Network camera base for battery operation - 12VDC input || $650 || 1,6,7<br />
|-<br />
| NC333L-24 || Network camera base for battery operation - 24VDC input || $650 || 1,6,7<br />
|-<br />
| SF318M1M || Sensor front end, monochrome 1280x1024 (1.3 MPix) with [http://www.micron.com/products/imaging/products/MT9M001.html Micron MT9M001] CMOS sensor || $150 || 2<br />
|-<br />
| SF318M1C || Sensor front end, color 1280x1024 with (1.3 MPix) with [http://www.micron.com/products/imaging/products/MT9M001.html Micron MT9M001] CMOS sensor || $150 || 2<br />
|-<br />
| SF318M2C || Sensor front end, color 1600x1200 with (2.0 MPix) Micron MT9D001 CMOS sensor || $150 || 2<br />
|-<br />
| SF318M3C || Sensor front end, color 2048x1536 with (3.0 MPix) with [http://www.micron.com/products/imaging/products/MT9T001.html Micron MT9T001] CMOS sensor || $150 || 2<br />
|-<br />
| PW-130 || Midspan power supply (by [http://www.aultinc.com/ Ault]) || $30 || 3<br />
|-<br />
| H3Z4512CS || Computar Varifocal Lens, 4.5-12.5mm F1.2 Manual Iris 1/2inch CS-Mount || $128 || 4<br />
|-<br />
| - || GNU/GPL Discount || -$100 || 5<br />
|}<br />
<br />
<br />
Notes<br />
# Camera base needs one of the sensor front ends<br />
# Sensor front ends have CS-mount thread and come with C/CS-mount adapters. Color sensor front ends come with IR cutoff filter installed. Detailed sensor specs are available for download at [http://www.micron.com/products/imaging/products/megapixel.html Micron] web site. We recommend using the 3&nbsp;MPix sensor front end - SF318M3C<br />
# Cameras are compatible with other standard IEEE802.3af midspan power supplies and powered switches<br />
# Sensors are slightly bigger than 1/2" format (nominal 6.4mm x4.8mm), you may use 1/2" or larger format other CS-mount or C-mount lenses, a large variety is available at [http://www.rmassa.com RMA Electronics Inc]. Most lenses, even "megapixel" do not provide full resolution for the 3MPix sensors with the full open iris, you will have to set it to 4.0-5.6 to get the full sensor resolution<br />
# We offer $100 per camera discount for those who plan to develop software code that will run in Elphel cameras or with them (on a client computer) where the code will be released under [http://www.gnu.org/licenses/gpl.html GNU GPL] or compatible license. This discount is valid with volume prices too. See [[FAQ]] about GNU GPL application to Elphel products.<br />
# For special applications, not IEEE802.3af compliant. We do not recommend this solution except special applications where the cameras are incorporated into other systems and the cabling is permanent as you can damage your other equipment (i.e. computer) if the powered cable with non-IEEE802.3af power is inserted into the nework port. If you want to run a camera in the car it is easier to use a standard 12VDC->115VAC (or 220VAC) converter and IEEE802.3af compliant power supply.<br />
# We usually have some cameras that we can provide to developers free of charge. If you have an interesting project in mind - try convincing us that it qualifies.<br />
<br />
<br />
----<br />
''Free Software and Open Hardware. Elphel, Inc., 2005''</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=3088GenReS2007-04-18T05:46:18Z<p>Khlut: Reverted edit of Ex1B3k, changed back to last version by Khlut</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
GenReS is a generic reconfigurable scriptable plugin for Mozilla based browsers. It allows to use external programs for EMBED and OBJECT HTML tags or to start them in browser full window.<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/files/?group=genres Download]<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output;<br />
;background={-1|0|1} :- object color while loadining: 0 - black, 1 - white, -1 - mozilla default (gray).<br />
<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- filename template filename;<br />
;out_file=template :- filename template filename for tags with parameter save=auto;<br />
;out_file_jpegs=template :- filename template for tags with thesaveformat=jpeg;<br />
;out_file_jpegs_auto=template :- same for save=auto and saveformat=jpeg;<br />
;vo={x11,xv} :- video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;not_ask_jpegs={1|0} :- same for saveformat=jpeg; <br />
;frames=number :- frames per file limit for recording (output will be splitted).<br />
<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved (only for rtp/mjpeg and ElphelOgm);<br />
;framedelay : a number of fully received frames delayed in the buffer (only for rtp/mjpeg and ElphelOgm);<br />
;rotate : the rotation angle of the image clockwise in degrees (0|90|180|240) <br />
;mirror : mirror-symmetry mapping relative to vertical axis (true|false) <br />
;flip : the same relative to horizontal (true|false); simultaneous setting of flip and mirror is equivalent to rotate=180<br />
;saveformat=jpeg|ogm|avi : format for video recording (jpeg, ogm is only for rtp/mjpeg and ElphelOgm)<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
*display from the packet ImageMagick - to demonstrate static images.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2834GenReS(плагин)2007-01-23T10:40:19Z<p>Khlut: /* Создание управляющих скриптов */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
GenReS - универсальный плагин для браузеров основанных на Mozilla.<br />
Он позволяет использовать внешние программы для отображения HTML-тэгов EMBED и OBJECT<br />
либо запускать их в полном окне браузера.<br />
<br />
Плагин вызывает скрипты-посредники которые запускают нужные программы-просмотрщики и позволяют управлять ими и контролировать состояние из JavaScript.<br />
Наборы функций и вызываемых программ могут быть изменены и дополнены путём изменения существующих и создания новых<br />
управляющих скриптов.<br />
<br />
Существующий набор скриптов позволяет демонстрировать электронные документы с помощью [http://www.openoffice.org OpenOffice.org], видео, аудио и статические изображения, используюя программы display из [http://www.imagemagick.org/ ImageMagick], [http://www.MPlayerHQ.hu/ mplayer, mencoder] и [[Camera software#ElphelOgm|ElphelOgm]].<br />
Изображения и видео можно масштабировать, зеркально отражать, и вращать.<br />
Для звуковых и видео файлов и потоков работают функции приостановки, продолжения, пошагового просмотра, позицирования,<br />
записи в виде набора файлов, а также другие описанные ниже.<br />
<br />
== Конфигурирование ==<br />
<br />
Конфигурационные файлы "~/.mozilla/genres/genres.conf" или "/etc/genres.conf" содержат основные настройки. Дополнительные настройки для для программ mplayer, mencoder и ElphelOgm содержатся в файле "~/.mozilla/genres/mplayer.conf", который используется управляющим скриптом mplayer.pl. Файлы могут содержать комментарии начинающиеся с # как в shell.<br />
<br />
=== Настройки в genres.conf ===<br />
<br />
;mozillastreams={1|0} : использовать или нет потоки (и кэш) браузера для протоколов, которые он поддерживает (http, https и ftp); <br />
;debuglevel={1|0} : включить/выключить вывод отладочной информации;<br />
;background={-1|0|1} : цвет объекта во аремя загрузки: 0 - чёрный, 1 - белый, -1 - по-умолчанию (серый).<br />
<br />
=== Настройки в mplayer.conf ===<br />
<br />
;out_file_once=шаблон : шаблон для имени фудио/видеофайла;<br />
;out_file_jpegs=шаблон : то же для сохранения видео по кадрам в виде отдельных картинок (saveformat=jpeg);<br />
;out_file=шаблон : шаблон для имени файла для тэгов с параметром save=auto;<br />
;out_file_jpegs_auto=шаблон : шаблон для комбинации saveformat=jpeg save=auto;<br />
;vo={x11, xv} : видео-драйверы (см. man mplayer о параметре -vo);<br />
;ao={arts, esd, alsa, oss} : аудио-драйверы (см. man mplayer о параметре -ao);<br />
;not_ask={1|0} : больше не спрашивать имя файла для сохранения для тэгов с параметром save=auto;<br />
;not_ask_jpegs={1|0} : то же для save=auto и saveformat=jpeg;<br />
;frames=число : максимальное количество кадров в одном файле при записи для разбития на несколько файлов.<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1 (только для rtp/mjpeg через ElphelOgm)<br />
;framedelay : количество полных кадров удерживаемых в буфере (только для rtp/mjpeg через ElphelOgm)<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
;saveformat=jpeg|ogm|avi : формат для записи видео (jpeg, ogm - только для rtp/mjpeg через ElphelOgm)<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить запись вместо показа;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок;<br />
* ooffice (OpenOffice.org) для показа документов.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http https ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http https ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|-<br />
|<br />
application/vnd.oasis.opendocument.chart<br />
application/vnd.oasis.opendocument.database<br />
application/vnd.oasis.opendocument.formula<br />
application/vnd.oasis.opendocument.graphics<br />
application/vnd.oasis.opendocument.graphics-template<br />
application/vnd.oasis.opendocument.image<br />
application/vnd.oasis.opendocument.presentation<br />
application/vnd.oasis.opendocument.presentation-template<br />
application/vnd.oasis.opendocument.spreadsheet<br />
application/vnd.oasis.opendocument.spreadsheet-template<br />
application/vnd.oasis.opendocument.text<br />
application/vnd.oasis.opendocument.text-master<br />
application/vnd.oasis.opendocument.text-template<br />
application/vnd.oasis.opendocument.text-web<br />
<br />
application/vnd.sun.xml.calc <br />
application/vnd.sun.xml.draw application/vnd.sun.xml.impress<br />
application/vnd.sun.xml.math<br />
application/vnd.sun.xml.writer<br />
application/vnd.sun.xml.draw.template application/vnd.sun.xml.calc.template application/vnd.sun.xml.impress.template<br />
application/vnd.sun.xml.writer.template<br />
application/vnd.sun.xml.writer.global<br />
<br />
text/rtf application/rtf<br />
application/x-msword<br />
application/msword<br />
application/vnd.ms-excel<br />
application/vnd.ms-powerpoint<br />
application/mspowerpoint<br />
|http ftp file||ooffice<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)<br />
<br />
== Создание управляющих скриптов ==<br />
<br />
Для каждого тэга плагин запускает отдельный процесс-посредник. Обмен данными осуществляется через трубы (стандартные для юникса неименованные каналы). Для процесса-посредника каналы присоединены к стандартным вводу и выводу. Стандартный вывод ошибок совпадает со стандартным выводом.<br />
Файловый дескриптор №3 открыт для ввода (так же через трубу) данных из файла, на который указывает параметр тэга SRC. (Этот параметр распознаётся браузером.) Если он содержит URL с поддерживаемым протоколом и включен параметр [[#Настройки в genres.conf|mozillastreams]], файл будет передаваться через эту трубу.<br />
Данные через стандартные ввод/вывод передаются в виде текстовых строк по одной команде в строке.<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Команды от плагина скрипту'''<br />
|имя=значение<br />
|переменной тэга было присвоено значение<br />
(фактически в javascript остаётся старое значение до ответа скрипта);<br />
|-<br />
|.<br />
|конец блока начальных значений параметров тэга;<br />
|-<br />
|PRINTEMBED<br />
|требуется напечатать страницу содержащую тэг, в ответ следует передать данные в формате postscript;<br />
|-<br />
|PRINTFULL<br />
|запрос печати для объекта в полном окне, все операции должен выполнить сам скрипт (включая диалоги);<br />
|-<br />
|EOF<br />
|конец файла переданного через дескриптор №3 (труба не закрывается для возможности повторной передачи по запросу).<br />
|}<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Команды от скрипта плагину'''<br />
|имя=значение<br />
|присвоить значение параметру тэга, после чего будет вызвана функция (если определена) '''onимя()''';<br />
|-<br />
|OPEN<br />
|послать с начала файл (через дескриптор №3), на который указывает параметр SRC;<br />
|-<br />
|CLOSE<br />
|закрыть трубу со стороны плагина (скрипт больше не сможет пользоваться дескриптором №3);<br />
|-<br />
|AUTOCLOSE<br />
|автоматически закрывать трубу при окончании файла данных;<br />
|-<br />
|DESTROY<br />
|закрыть поток файла данных браузера;<br />
|-<br />
|{javascript}<br />
|выполнить скрипт в контексте объекта тэга. <br />
|}</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2833GenReS(плагин)2007-01-23T09:03:50Z<p>Khlut: резюме</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
GenReS - универсальный плагин для браузеров основанных на Mozilla.<br />
Он позволяет использовать внешние программы для отображения HTML-тэгов EMBED и OBJECT<br />
либо запускать их в полном окне браузера.<br />
<br />
Плагин вызывает скрипты-посредники которые запускают нужные программы-просмотрщики и позволяют управлять ими и контролировать состояние из JavaScript.<br />
Наборы функций и вызываемых программ могут быть изменены и дополнены путём изменения существующих и создания новых<br />
управляющих скриптов.<br />
<br />
Существующий набор скриптов позволяет демонстрировать электронные документы с помощью [http://www.openoffice.org OpenOffice.org], видео, аудио и статические изображения, используюя программы display из [http://www.imagemagick.org/ ImageMagick], [http://www.MPlayerHQ.hu/ mplayer, mencoder] и [[Camera software#ElphelOgm|ElphelOgm]].<br />
Изображения и видео можно масштабировать, зеркально отражать, и вращать.<br />
Для звуковых и видео файлов и потоков работают функции приостановки, продолжения, пошагового просмотра, позицирования,<br />
записи в виде набора файлов, а также другие описанные ниже.<br />
<br />
== Конфигурирование ==<br />
<br />
Конфигурационные файлы "~/.mozilla/genres/genres.conf" или "/etc/genres.conf" содержат основные настройки. Дополнительные настройки для для программ mplayer, mencoder и ElphelOgm содержатся в файле "~/.mozilla/genres/mplayer.conf", который используется управляющим скриптом mplayer.pl. Файлы могут содержать комментарии начинающиеся с # как в shell.<br />
<br />
=== Настройки в genres.conf ===<br />
<br />
;mozillastreams={1|0} : использовать или нет потоки (и кэш) браузера для протоколов, которые он поддерживает (http, https и ftp); <br />
;debuglevel={1|0} : включить/выключить вывод отладочной информации;<br />
;background={-1|0|1} : цвет объекта во аремя загрузки: 0 - чёрный, 1 - белый, -1 - по-умолчанию (серый).<br />
<br />
=== Настройки в mplayer.conf ===<br />
<br />
;out_file_once=шаблон : шаблон для имени фудио/видеофайла;<br />
;out_file_jpegs=шаблон : то же для сохранения видео по кадрам в виде отдельных картинок (saveformat=jpeg);<br />
;out_file=шаблон : шаблон для имени файла для тэгов с параметром save=auto;<br />
;out_file_jpegs_auto=шаблон : шаблон для комбинации saveformat=jpeg save=auto;<br />
;vo={x11, xv} : видео-драйверы (см. man mplayer о параметре -vo);<br />
;ao={arts, esd, alsa, oss} : аудио-драйверы (см. man mplayer о параметре -ao);<br />
;not_ask={1|0} : больше не спрашивать имя файла для сохранения для тэгов с параметром save=auto;<br />
;not_ask_jpegs={1|0} : то же для save=auto и saveformat=jpeg;<br />
;frames=число : максимальное количество кадров в одном файле при записи для разбития на несколько файлов.<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1 (только для rtp/mjpeg через ElphelOgm)<br />
;framedelay : количество полных кадров удерживаемых в буфере (только для rtp/mjpeg через ElphelOgm)<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
;saveformat=jpeg|ogm|avi : формат для записи видео (jpeg, ogm - только для rtp/mjpeg через ElphelOgm)<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить запись вместо показа;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок;<br />
* ooffice (OpenOffice.org) для показа документов.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http https ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http https ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|-<br />
|<br />
application/vnd.oasis.opendocument.chart<br />
application/vnd.oasis.opendocument.database<br />
application/vnd.oasis.opendocument.formula<br />
application/vnd.oasis.opendocument.graphics<br />
application/vnd.oasis.opendocument.graphics-template<br />
application/vnd.oasis.opendocument.image<br />
application/vnd.oasis.opendocument.presentation<br />
application/vnd.oasis.opendocument.presentation-template<br />
application/vnd.oasis.opendocument.spreadsheet<br />
application/vnd.oasis.opendocument.spreadsheet-template<br />
application/vnd.oasis.opendocument.text<br />
application/vnd.oasis.opendocument.text-master<br />
application/vnd.oasis.opendocument.text-template<br />
application/vnd.oasis.opendocument.text-web<br />
<br />
application/vnd.sun.xml.calc <br />
application/vnd.sun.xml.draw application/vnd.sun.xml.impress<br />
application/vnd.sun.xml.math<br />
application/vnd.sun.xml.writer<br />
application/vnd.sun.xml.draw.template application/vnd.sun.xml.calc.template application/vnd.sun.xml.impress.template<br />
application/vnd.sun.xml.writer.template<br />
application/vnd.sun.xml.writer.global<br />
<br />
text/rtf application/rtf<br />
application/x-msword<br />
application/msword<br />
application/vnd.ms-excel<br />
application/vnd.ms-powerpoint<br />
application/mspowerpoint<br />
|http ftp file||ooffice<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2832GenReS(плагин)2007-01-17T10:09:24Z<p>Khlut: /* Back-end программы */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
GenReS - универсальный плагин для браузеров основанных на Mozilla.<br />
Он позволяет использовать внешние программы для отображения HTML-тэгов EMBED и OBJECT<br />
либо запускать их в полном окне браузера.<br />
<br />
Плагин вызывает Perl-скрипты-посредники которые запускают нужные программы-просмотрщики и позволяют управлять ими и контролировать состояние из JavaScript.<br />
Наборы функций и вызываемых программ могут быть изменены и дополнены путём изменения существующих и создания новых<br />
управляющих скриптов.<br />
<br />
Существующий набор скриптов позволяет демонстрировать видео, аудио и статические изображения, используюя программы display из imagemagick, mplayer, ElphelOgm и mencoder.<br />
Изображения и видео можно масштабировать, зеркально отражать, и вращать.<br />
Для звуковых и видео файлов и потоков работают функции приостановки, продолжения, пошагового просмотра, позицирования,<br />
записи в виде набора файлов, а также другие описанные ниже.<br />
<br />
== Конфигурирование ==<br />
<br />
Конфигурационные файлы "~/.mozilla/genres/genres.conf" или "/etc/genres.conf" содержат основные настройки. Дополнительные настройки для для программ mplayer, mencoder и ElphelOgm содержатся в файле "~/.mozilla/genres/mplayer.conf", который используется управляющим скриптом mplayer.pl. Файлы могут содержать комментарии начинающиеся с # как в shell.<br />
<br />
=== Настройки в genres.conf ===<br />
<br />
;mozillastreams={1|0} : использовать или нет потоки (и кэш) браузера для протоколов, которые он поддерживает (http, https и ftp); <br />
;debuglevel={1|0} : включить/выключить вывод отладочной информации;<br />
;background={-1|0|1} : цвет объекта во аремя загрузки: 0 - чёрный, 1 - белый, -1 - по-умолчанию (серый).<br />
<br />
=== Настройки в mplayer.conf ===<br />
<br />
;out_file_once=шаблон : шаблон для имени фудио/видеофайла;<br />
;out_file_jpegs=шаблон : то же для сохранения видео по кадрам в виде отдельных картинок (saveformat=jpeg);<br />
;out_file=шаблон : шаблон для имени файла для тэгов с параметром save=auto;<br />
;out_file_jpegs_auto=шаблон : шаблон для комбинации saveformat=jpeg save=auto;<br />
;vo={x11, xv} : видео-драйверы (см. man mplayer о параметре -vo);<br />
;ao={arts, esd, alsa, oss} : аудио-драйверы (см. man mplayer о параметре -ao);<br />
;not_ask={1|0} : больше не спрашивать имя файла для сохранения для тэгов с параметром save=auto;<br />
;not_ask_jpegs={1|0} : то же для save=auto и saveformat=jpeg;<br />
;frames=число : максимальное количество кадров в одном файле при записи для разбития на несколько файлов.<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1 (только для rtp/mjpeg через ElphelOgm)<br />
;framedelay : количество полных кадров удерживаемых в буфере (только для rtp/mjpeg через ElphelOgm)<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
;saveformat=jpeg|ogm|avi : формат для записи видео (jpeg, ogm - только для rtp/mjpeg через ElphelOgm)<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить запись вместо показа;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок;<br />
* ooffice (OpenOffice.org) для показа документов.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http https ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http https ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|-<br />
|<br />
application/vnd.oasis.opendocument.chart<br />
application/vnd.oasis.opendocument.database<br />
application/vnd.oasis.opendocument.formula<br />
application/vnd.oasis.opendocument.graphics<br />
application/vnd.oasis.opendocument.graphics-template<br />
application/vnd.oasis.opendocument.image<br />
application/vnd.oasis.opendocument.presentation<br />
application/vnd.oasis.opendocument.presentation-template<br />
application/vnd.oasis.opendocument.spreadsheet<br />
application/vnd.oasis.opendocument.spreadsheet-template<br />
application/vnd.oasis.opendocument.text<br />
application/vnd.oasis.opendocument.text-master<br />
application/vnd.oasis.opendocument.text-template<br />
application/vnd.oasis.opendocument.text-web<br />
<br />
application/vnd.sun.xml.calc <br />
application/vnd.sun.xml.draw application/vnd.sun.xml.impress<br />
application/vnd.sun.xml.math<br />
application/vnd.sun.xml.writer<br />
application/vnd.sun.xml.draw.template application/vnd.sun.xml.calc.template application/vnd.sun.xml.impress.template<br />
application/vnd.sun.xml.writer.template<br />
application/vnd.sun.xml.writer.global<br />
<br />
text/rtf application/rtf<br />
application/x-msword<br />
application/msword<br />
application/vnd.ms-excel<br />
application/vnd.ms-powerpoint<br />
application/mspowerpoint<br />
|http ftp file||ooffice<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2831GenReS(плагин)2007-01-16T08:34:21Z<p>Khlut: /* Настройки в mplayer.conf */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
GenReS - универсальный плагин для браузеров основанных на Mozilla.<br />
Он позволяет использовать внешние программы для отображения HTML-тэгов EMBED и OBJECT<br />
либо запускать их в полном окне браузера.<br />
<br />
Плагин вызывает Perl-скрипты-посредники которые запускают нужные программы-просмотрщики и позволяют управлять ими и контролировать состояние из JavaScript.<br />
Наборы функций и вызываемых программ могут быть изменены и дополнены путём изменения существующих и создания новых<br />
управляющих скриптов.<br />
<br />
Существующий набор скриптов позволяет демонстрировать видео, аудио и статические изображения, используюя программы display из imagemagick, mplayer, ElphelOgm и mencoder.<br />
Изображения и видео можно масштабировать, зеркально отражать, и вращать.<br />
Для звуковых и видео файлов и потоков работают функции приостановки, продолжения, пошагового просмотра, позицирования,<br />
записи в виде набора файлов, а также другие описанные ниже.<br />
<br />
== Конфигурирование ==<br />
<br />
Конфигурационные файлы "~/.mozilla/genres/genres.conf" или "/etc/genres.conf" содержат основные настройки. Дополнительные настройки для для программ mplayer, mencoder и ElphelOgm содержатся в файле "~/.mozilla/genres/mplayer.conf", который используется управляющим скриптом mplayer.pl. Файлы могут содержать комментарии начинающиеся с # как в shell.<br />
<br />
=== Настройки в genres.conf ===<br />
<br />
;mozillastreams={1|0} : использовать или нет потоки (и кэш) браузера для протоколов, которые он поддерживает (http, https и ftp); <br />
;debuglevel={1|0} : включить/выключить вывод отладочной информации;<br />
;background={-1|0|1} : цвет объекта во аремя загрузки: 0 - чёрный, 1 - белый, -1 - по-умолчанию (серый).<br />
<br />
=== Настройки в mplayer.conf ===<br />
<br />
;out_file_once=шаблон : шаблон для имени фудио/видеофайла;<br />
;out_file_jpegs=шаблон : то же для сохранения видео по кадрам в виде отдельных картинок (saveformat=jpeg);<br />
;out_file=шаблон : шаблон для имени файла для тэгов с параметром save=auto;<br />
;out_file_jpegs_auto=шаблон : шаблон для комбинации saveformat=jpeg save=auto;<br />
;vo={x11, xv} : видео-драйверы (см. man mplayer о параметре -vo);<br />
;ao={arts, esd, alsa, oss} : аудио-драйверы (см. man mplayer о параметре -ao);<br />
;not_ask={1|0} : больше не спрашивать имя файла для сохранения для тэгов с параметром save=auto;<br />
;not_ask_jpegs={1|0} : то же для save=auto и saveformat=jpeg;<br />
;frames=число : максимальное количество кадров в одном файле при записи для разбития на несколько файлов.<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1 (только для rtp/mjpeg через ElphelOgm)<br />
;framedelay : количество полных кадров удерживаемых в буфере (только для rtp/mjpeg через ElphelOgm)<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
;saveformat=jpeg|ogm|avi : формат для записи видео (jpeg, ogm - только для rtp/mjpeg через ElphelOgm)<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить запись вместо показа;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2830GenReS2007-01-16T08:32:03Z<p>Khlut: /* options in mplayer.conf */</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
GenReS is a generic reconfigurable scriptable plugin for Mozilla based browsers. It allows to use external programs for EMBED and OBJECT HTML tags or to start them in browser full window.<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/files/?group=genres Download]<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output;<br />
;background={-1|0|1} :- object color while loadining: 0 - black, 1 - white, -1 - mozilla default (gray).<br />
<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- filename template filename;<br />
;out_file=template :- filename template filename for tags with parameter save=auto;<br />
;out_file_jpegs=template :- filename template for tags with thesaveformat=jpeg;<br />
;out_file_jpegs_auto=template :- same for save=auto and saveformat=jpeg;<br />
;vo={x11,xv} :- video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;not_ask_jpegs={1|0} :- same for saveformat=jpeg; <br />
;frames=number :- frames per file limit for recording (output will be splitted).<br />
<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved (only for rtp/mjpeg and ElphelOgm);<br />
;framedelay : a number of fully received frames delayed in the buffer (only for rtp/mjpeg and ElphelOgm);<br />
;rotate : the rotation angle of the image clockwise in degrees (0|90|180|240) <br />
;mirror : mirror-symmetry mapping relative to vertical axis (true|false) <br />
;flip : the same relative to horizontal (true|false); simultaneous setting of flip and mirror is equivalent to rotate=180<br />
;saveformat=jpeg|ogm|avi : format for video recording (jpeg, ogm is only for rtp/mjpeg and ElphelOgm)<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
*display from the packet ImageMagick - to demonstrate static images.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2829GenReS2007-01-13T18:31:05Z<p>Khlut: /* options in genres.conf */</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
GenReS is a generic reconfigurable scriptable plugin for Mozilla based browsers. It allows to use external programs for EMBED and OBJECT HTML tags or to start them in browser full window.<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/files/?group=genres Download]<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output;<br />
;background={-1|0|1} :- object color while loadining: 0 - black, 1 - white, -1 - mozilla default (gray).<br />
<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved (only for rtp/mjpeg and ElphelOgm);<br />
;framedelay : a number of fully received frames delayed in the buffer (only for rtp/mjpeg and ElphelOgm);<br />
;rotate : the rotation angle of the image clockwise in degrees (0|90|180|240) <br />
;mirror : mirror-symmetry mapping relative to vertical axis (true|false) <br />
;flip : the same relative to horizontal (true|false); simultaneous setting of flip and mirror is equivalent to rotate=180<br />
;saveformat=jpeg|ogm|avi : format for video recording (jpeg, ogm is only for rtp/mjpeg and ElphelOgm)<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
*display from the packet ImageMagick - to demonstrate static images.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2828GenReS2007-01-13T18:30:36Z<p>Khlut: /* options in genres.conf */</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
GenReS is a generic reconfigurable scriptable plugin for Mozilla based browsers. It allows to use external programs for EMBED and OBJECT HTML tags or to start them in browser full window.<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/files/?group=genres Download]<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output;<br />
;background={-1|0|1} : object color while loadining: 0 - black, 1 - white, -1 - mozilla default (gray).<br />
<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved (only for rtp/mjpeg and ElphelOgm);<br />
;framedelay : a number of fully received frames delayed in the buffer (only for rtp/mjpeg and ElphelOgm);<br />
;rotate : the rotation angle of the image clockwise in degrees (0|90|180|240) <br />
;mirror : mirror-symmetry mapping relative to vertical axis (true|false) <br />
;flip : the same relative to horizontal (true|false); simultaneous setting of flip and mirror is equivalent to rotate=180<br />
;saveformat=jpeg|ogm|avi : format for video recording (jpeg, ogm is only for rtp/mjpeg and ElphelOgm)<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
*display from the packet ImageMagick - to demonstrate static images.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2827GenReS(плагин)2007-01-13T18:24:30Z<p>Khlut: /* Настройки в genres.conf */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
GenReS - универсальный плагин для браузеров основанных на Mozilla.<br />
Он позволяет использовать внешние программы для отображения HTML-тэгов EMBED и OBJECT<br />
либо запускать их в полном окне браузера.<br />
<br />
Плагин вызывает Perl-скрипты-посредники которые запускают нужные программы-просмотрщики и позволяют управлять ими и контролировать состояние из JavaScript.<br />
Наборы функций и вызываемых программ могут быть изменены и дополнены путём изменения существующих и создания новых<br />
управляющих скриптов.<br />
<br />
Существующий набор скриптов позволяет демонстрировать видео, аудио и статические изображения, используюя программы display из imagemagick, mplayer, ElphelOgm и mencoder.<br />
Изображения и видео можно масштабировать, зеркально отражать, и вращать.<br />
Для звуковых и видео файлов и потоков работают функции приостановки, продолжения, пошагового просмотра, позицирования,<br />
записи в виде набора файлов, а также другие описанные ниже.<br />
<br />
== Конфигурирование ==<br />
<br />
Конфигурационные файлы "~/.mozilla/genres/genres.conf" или "/etc/genres.conf" содержат основные настройки. Дополнительные настройки для для программ mplayer, mencoder и ElphelOgm содержатся в файле "~/.mozilla/genres/mplayer.conf", который используется управляющим скриптом mplayer.pl. Файлы могут содержать комментарии начинающиеся с # как в shell.<br />
<br />
=== Настройки в genres.conf ===<br />
<br />
;mozillastreams={1|0} : использовать или нет потоки (и кэш) браузера для протоколов, которые он поддерживает (http, https и ftp); <br />
;debuglevel={1|0} : включить/выключить вывод отладочной информации;<br />
;background={-1|0|1} : цвет объекта во аремя загрузки: 0 - чёрный, 1 - белый, -1 - по-умолчанию (серый).<br />
<br />
=== Настройки в mplayer.conf ===<br />
<br />
;out_file_once=template : шаблон для имени фудио/видеофайла;<br />
;out_file_jpegs : то же для сохранения видео по кадрам в виде отдельных картинок (saveformat=jpeg);<br />
;out_file=template : шаблон для имени файла для тэгов с параметром save=auto;<br />
;out_file_jpegs_auto : шаблон для комбинации saveformat=jpeg save=auto;<br />
;vo={x11, xv} : видео-драйверы (см. man mplayer о параметре -vo); <br />
;ao={arts, esd, alsa, oss} : аудио-драйверы (см. man mplayer о параметре -ao); <br />
;not_ask={1|0} : больше не спрашивать имя файла для сохранения для тэгов с параметром save=auto; <br />
;frames=number : максимальное количество кадров в одном файле при записи для разбития на несколько файлов.<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1 (только для rtp/mjpeg через ElphelOgm)<br />
;framedelay : количество полных кадров удерживаемых в буфере (только для rtp/mjpeg через ElphelOgm)<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
;saveformat=jpeg|ogm|avi : формат для записи видео (jpeg, ogm - только для rtp/mjpeg через ElphelOgm)<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить запись вместо показа;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=Talk:Roadmap&diff=2826Talk:Roadmap2007-01-10T16:11:30Z<p>Khlut: Reverted edit of Trepiringo, changed back to last version by 61.171.209.135</p>
<hr />
<div>High Performance Ethernet Camera Based on FOSS<br />
By Larry Liang from Elphel<br />
<br />
++++++++++++++<br />
Content of Presentation<br />
Introduction of Elphel’s Project.<br />
Why Elphel’s Camera?<br />
The Architecture of Elphel’s Camera<br />
RoadMap of Elphel’s Camera.<br />
Elphel’s Camera is An Open System.<br />
<br />
+++++++++++++++++<br />
Introduction of Elphel’s Project.(1)<br />
Elphel’s project focus on development of following:<br />
Hardware of high performance Ethernet camera, including electronic,mechanical and optical design.<br />
In-Camera Software Design, including video compressor, streamer …<br />
In-PC software design<br />
Advising on system based on Elphel’s camera<br />
<br />
+++++++++++++++++<br />
<br />
<br />
Introduction of Elphel’s Project.(2)<br />
Policy of Elphel’s Project<br />
All of software in Elphel’s camera based on FOSS.<br />
Software in Elphel’s camera is FOSS.<br />
Not only Software but also hardware is opening.<br />
++++++++++++++++<br />
<br />
Introduction of Elphel’s Project.(3)<br />
Where to find US?<br />
http://www.sourceforge.org/projects/elphel.<br />
<br />
<br />
+++++++++++++++<br />
Why Elphel’s Camera?<br />
Feature of Elphel’s camera.<br />
High Resolution<br />
High Frame Rate<br />
Better Image Quality<br />
Easy for modification<br />
Royalty free dynamic compressor (Theora Ogg)<br />
Lower cost<br />
+++++++++++++++<br />
<br />
Why Elphel’s Camera?<br />
Now,Elphel can provide camera with a resolution of 3Mega pixel. Higher Resolution means:<br />
More detail in the same view field.<br />
Larger view field in the same detail<br />
+++++++++++++++<br />
<br />
Why Elphel’s Camera?<br />
Now,Elphel can provide camera with a frame of 30FPS@1280*1024. Higher frame rate means:<br />
The video looks smoother<br />
Lower possibility to miss the key frame.<br />
Why Elphel’s Camera?<br />
Better Image Quality,Although a CMOS sensor is used , the noise level and sensitivity of Elphel’s camera still can be described as excellent, and thanks to a sophisticated color processing algorithm, the camera can reproduce the color accurately.<br />
++++++++++++++<br />
<br />
Why Elphel’s Camera?<br />
Easy for modification, With total knowledge of Elphel’s hardware and software, architecture and source code, customer can modify the camera easily.<br />
Why Elphel’s Camera?<br />
Royalty free dynamic compressor (Theora Ogg), You don’t need pay any money for coding and decoding process. <br />
<br />
++++++++++++++++++<br />
Why Elphel’s Camera?<br />
Lower cost, compared with other method of high performance imaging system. <br />
<br />
++++++++++++++++<br />
Architecture of Elphel’s Camera<br />
+++++++++++++<br />
Architecture of Elphel’s Camera<br />
<br />
Image of camera<br />
+++++++++++<br />
RoadMap of Elphel’s Camera.<br />
++++++++++<br />
Elphel’s Camera is An Open System.</div>Khluthttps://wiki.elphel.com/index.php?title=Talk:GenReS&diff=2824Talk:GenReS2006-12-25T11:43:00Z<p>Khlut: Reverted edit of GlassAboutGlass, changed back to last version by Khlut</p>
<hr />
<div>To be really useful for the vidoesecurity applications plugin needs to implement pan (without decoding all the throuwn-away data), not just zoom as we discussed a year ago :-). At least with a step of one macroblock (16x16 pixels with no decimation), and even with JPED DC coefficients are not independent (difference in scan-line order is encoded).<br />
<br />
Of course that will require getting inside the Mplayer to add the additionbal processing, but that is really needed for the multiple cameras applications.<br />
<br />
----<br />
lowres parameter is passed to mplayer as -lavdopts lowres=<value>.<br />
From man mplayer:<br />
lowres=<number>[,<w>]<br />
Decode at lower resolutions. Low resolution decoding is not supported by all codecs, and it will<br />
often result in ugly artifacts. This is not a bug, but a side effect of not decoding at full reso-<br />
lution.<br />
0: disabled<br />
1: 1/2 resolution<br />
2: 1/4 resolution<br />
3: 1/8 resolution<br />
I look that with mjpeg it works fine. Decoding with 1/8 resolution needs 1/2 of full decoding time. But 1/16 is not implemented in mplayer.<br />
--[[User:Khlut|Sergey Khlutchin]] 12:34, 20 November 2005 (CST)<br />
<br />
Yes, I understand that Mplayer does not have windowing feature that would allow faster decoding just a selected window from the full frame that is streamed. That will require to get into Mplayer itself - both pass the additional parameters for the window selection and actually implement windoiw processing. But I don't think it is too difficult and we definitely need it.<br />
<br />
Other parameter that we need to pass to plugin - drop specified number of frames (reduce on-screen frame rate) - show each N-th frame. This too will help us to have more active camera preview windows on the same computer. --[[User:Andrey.filippov|Andrey.filippov]] 20:47, 20 November 2005 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=Talk:GenReS&diff=2822Talk:GenReS2006-12-17T23:49:29Z<p>Khlut: Reverted edit of Grangranga, changed back to last version by Andrey.filippov</p>
<hr />
<div>To be really useful for the vidoesecurity applications plugin needs to implement pan (without decoding all the throuwn-away data), not just zoom as we discussed a year ago :-). At least with a step of one macroblock (16x16 pixels with no decimation), and even with JPED DC coefficients are not independent (difference in scan-line order is encoded).<br />
<br />
Of course that will require getting inside the Mplayer to add the additionbal processing, but that is really needed for the multiple cameras applications.<br />
<br />
----<br />
lowres parameter is passed to mplayer as -lavdopts lowres=<value>.<br />
From man mplayer:<br />
lowres=<number>[,<w>]<br />
Decode at lower resolutions. Low resolution decoding is not supported by all codecs, and it will<br />
often result in ugly artifacts. This is not a bug, but a side effect of not decoding at full reso-<br />
lution.<br />
0: disabled<br />
1: 1/2 resolution<br />
2: 1/4 resolution<br />
3: 1/8 resolution<br />
I look that with mjpeg it works fine. Decoding with 1/8 resolution needs 1/2 of full decoding time. But 1/16 is not implemented in mplayer.<br />
--[[User:Khlut|Sergey Khlutchin]] 12:34, 20 November 2005 (CST)<br />
<br />
Yes, I understand that Mplayer does not have windowing feature that would allow faster decoding just a selected window from the full frame that is streamed. That will require to get into Mplayer itself - both pass the additional parameters for the window selection and actually implement windoiw processing. But I don't think it is too difficult and we definitely need it.<br />
<br />
Other parameter that we need to pass to plugin - drop specified number of frames (reduce on-screen frame rate) - show each N-th frame. This too will help us to have more active camera preview windows on the same computer. --[[User:Andrey.filippov|Andrey.filippov]] 20:47, 20 November 2005 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2769GenReS(плагин)2006-10-21T08:25:20Z<p>Khlut: /* Конфигурирование */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
GenReS - универсальный плагин для браузеров основанных на Mozilla.<br />
Он позволяет использовать внешние программы для отображения HTML-тэгов EMBED и OBJECT<br />
либо запускать их в полном окне браузера.<br />
<br />
Плагин вызывает Perl-скрипты-посредники которые запускают нужные программы-просмотрщики и позволяют управлять ими и контролировать состояние из JavaScript.<br />
Наборы функций и вызываемых программ могут быть изменены и дополнены путём изменения существующих и создания новых<br />
управляющих скриптов.<br />
<br />
Существующий набор скриптов позволяет демонстрировать видео, аудио и статические изображения, используюя программы display из imagemagick, mplayer, ElphelOgm и mencoder.<br />
Изображения и видео можно масштабировать, зеркально отражать, и вращать.<br />
Для звуковых и видео файлов и потоков работают функции приостановки, продолжения, пошагового просмотра, позицирования,<br />
записи в виде набора файлов, а также другие описанные ниже.<br />
<br />
== Конфигурирование ==<br />
<br />
Конфигурационные файлы "~/.mozilla/genres/genres.conf" или "/etc/genres.conf" содержат основные настройки. Дополнительные настройки для для программ mplayer, mencoder и ElphelOgm содержатся в файле "~/.mozilla/genres/mplayer.conf", который используется управляющим скриптом mplayer.pl. Файлы могут содержать комментарии начинающиеся с # как в shell.<br />
<br />
=== Настройки в genres.conf ===<br />
<br />
;mozillastreams={1|0} : использовать или нет потоки (и кэш) браузера для протоколов, которые он поддерживает (http, https и ftp); <br />
;debuglevel={1|0} : включить/выключить вывод отладочной информации. <br />
<br />
=== Настройки в mplayer.conf ===<br />
<br />
;out_file_once=template : шаблон для имени фудио/видеофайла;<br />
;out_file_jpegs : то же для сохранения видео по кадрам в виде отдельных картинок (saveformat=jpeg);<br />
;out_file=template : шаблон для имени файла для тэгов с параметром save=auto;<br />
;out_file_jpegs_auto : шаблон для комбинации saveformat=jpeg save=auto;<br />
;vo={x11, xv} : видео-драйверы (см. man mplayer о параметре -vo); <br />
;ao={arts, esd, alsa, oss} : аудио-драйверы (см. man mplayer о параметре -ao); <br />
;not_ask={1|0} : больше не спрашивать имя файла для сохранения для тэгов с параметром save=auto; <br />
;frames=number : максимальное количество кадров в одном файле при записи для разбития на несколько файлов.<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1 (только для rtp/mjpeg через ElphelOgm)<br />
;framedelay : количество полных кадров удерживаемых в буфере (только для rtp/mjpeg через ElphelOgm)<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
;saveformat=jpeg|ogm|avi : формат для записи видео (jpeg, ogm - только для rtp/mjpeg через ElphelOgm)<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить запись вместо показа;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2764GenReS2006-09-19T05:27:52Z<p>Khlut: /* Project Pages */</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
GenReS is a generic reconfigurable scriptable plugin for Mozilla based browsers. It allows to use external programs for EMBED and OBJECT HTML tags or to start them in browser full window.<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/files/?group=genres Download]<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output.<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved (only for rtp/mjpeg and ElphelOgm);<br />
;framedelay : a number of fully received frames delayed in the buffer (only for rtp/mjpeg and ElphelOgm);<br />
;rotate : the rotation angle of the image clockwise in degrees (0|90|180|240) <br />
;mirror : mirror-symmetry mapping relative to vertical axis (true|false) <br />
;flip : the same relative to horizontal (true|false); simultaneous setting of flip and mirror is equivalent to rotate=180<br />
;saveformat=jpeg|ogm|avi : format for video recording (jpeg, ogm is only for rtp/mjpeg and ElphelOgm)<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
*display from the packet ImageMagick - to demonstrate static images.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2763GenReS(плагин)2006-09-17T12:13:46Z<p>Khlut: /* Динамически изменяемые переменные (можно указывать и как параметры тегов) */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
GenReS - универсальный плагин для браузеров основанных на Mozilla.<br />
Он позволяет использовать внешние программы для отображения HTML-тэгов EMBED и OBJECT<br />
либо запускать их в полном окне браузера.<br />
<br />
Плагин вызывает Perl-скрипты-посредники которые запускают нужные программы-просмотрщики и позволяют управлять ими и контролировать состояние из JavaScript.<br />
Наборы функций и вызываемых программ могут быть изменены и дополнены путём изменения существующих и создания новых<br />
управляющих скриптов.<br />
<br />
Существующий набор скриптов позволяет демонстрировать видео, аудио и статические изображения, используюя программы display из imagemagick, mplayer, ElphelOgm и mencoder.<br />
Изображения и видео можно масштабировать, зеркально отражать, и вращать.<br />
Для звуковых и видео файлов и потоков работают функции приостановки, продолжения, пошагового просмотра, позицирования,<br />
записи в виде набора файлов, а также другие описанные ниже.<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1 (только для rtp/mjpeg через ElphelOgm)<br />
;framedelay : количество полных кадров удерживаемых в буфере (только для rtp/mjpeg через ElphelOgm)<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
;saveformat=jpeg|ogm|avi : формат для записи видео (jpeg, ogm - только для rtp/mjpeg через ElphelOgm)<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить запись вместо показа;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2762GenReS(плагин)2006-09-13T19:42:21Z<p>Khlut: /* Динамически изменяемые переменные (можно указывать и как параметры тегов) */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
GenReS - универсальный плагин для браузеров основанных на Mozilla.<br />
Он позволяет использовать внешние программы для отображения HTML-тэгов EMBED и OBJECT<br />
либо запускать их в полном окне браузера.<br />
<br />
Плагин вызывает Perl-скрипты-посредники которые запускают нужные программы-просмотрщики и позволяют управлять ими и контролировать состояние из JavaScript.<br />
Наборы функций и вызываемых программ могут быть изменены и дополнены путём изменения существующих и создания новых<br />
управляющих скриптов.<br />
<br />
Существующий набор скриптов позволяет демонстрировать видео, аудио и статические изображения, используюя программы display из imagemagick, mplayer, ElphelOgm и mencoder.<br />
Изображения и видео можно масштабировать, зеркально отражать, и вращать.<br />
Для звуковых и видео файлов и потоков работают функции приостановки, продолжения, пошагового просмотра, позицирования,<br />
записи в виде набора файлов, а также другие описанные ниже.<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1 (только для rtp/mjpeg через ElphelOgm)<br />
;framedelay : количество полных кадров удерживаемых в буфере (только для rtp/mjpeg через ElphelOgm)<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
;saveformat=jpeg|ogm|avi : формат для записи видео (jpeg, ogm - только для rtp/mjpeg через ElphelOgm)<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить записи вместо показа;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2761GenReS2006-09-13T19:41:07Z<p>Khlut: /* Static tag parameters */</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
GenReS is a generic reconfigurable scriptable plugin for Mozilla based browsers. It allows to use external programs for EMBED and OBJECT HTML tags or to start them in browser full window.<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output.<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved (only for rtp/mjpeg and ElphelOgm);<br />
;framedelay : a number of fully received frames delayed in the buffer (only for rtp/mjpeg and ElphelOgm);<br />
;rotate : the rotation angle of the image clockwise in degrees (0|90|180|240) <br />
;mirror : mirror-symmetry mapping relative to vertical axis (true|false) <br />
;flip : the same relative to horizontal (true|false); simultaneous setting of flip and mirror is equivalent to rotate=180<br />
;saveformat=jpeg|ogm|avi : format for video recording (jpeg, ogm is only for rtp/mjpeg and ElphelOgm)<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
*display from the packet ImageMagick - to demonstrate static images.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2760GenReS2006-09-13T19:33:24Z<p>Khlut: </p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
GenReS is a generic reconfigurable scriptable plugin for Mozilla based browsers. It allows to use external programs for EMBED and OBJECT HTML tags or to start them in browser full window.<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output.<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
;rotate : the rotation angle of the image clockwise in degrees (0|90|180|240) <br />
;mirror : mirror-symmetry mapping relative to vertical axis (true|false) <br />
;flip : the same relative to horizontal (true|false); simultaneous setting of flip and mirror is equivalent to rotate=180<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
*display from the packet ImageMagick - to demonstrate static images.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2759GenReS2006-09-13T19:32:27Z<p>Khlut: annotation</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
GenReS is a generic reconfigurable scriptable plugin for Mozilla based browsers. It allows to use external programs for EMBED and OBJECT HTNL tags or to start them in browser full window.<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output.<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
;rotate : the rotation angle of the image clockwise in degrees (0|90|180|240) <br />
;mirror : mirror-symmetry mapping relative to vertical axis (true|false) <br />
;flip : the same relative to horizontal (true|false); simultaneous setting of flip and mirror is equivalent to rotate=180<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
*display from the packet ImageMagick - to demonstrate static images.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2758GenReS(плагин)2006-09-13T19:14:00Z<p>Khlut: /* Cтатические параметры тегов */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
GenReS - универсальный плагин для браузеров основанных на Mozilla.<br />
Он позволяет использовать внешние программы для отображения HTML-тэгов EMBED и OBJECT<br />
либо запускать их в полном окне браузера.<br />
<br />
Плагин вызывает Perl-скрипты-посредники которые запускают нужные программы-просмотрщики и позволяют управлять ими и контролировать состояние из JavaScript.<br />
Наборы функций и вызываемых программ могут быть изменены и дополнены путём изменения существующих и создания новых<br />
управляющих скриптов.<br />
<br />
Существующий набор скриптов позволяет демонстрировать видео, аудио и статические изображения, используюя программы display из imagemagick, mplayer, ElphelOgm и mencoder.<br />
Изображения и видео можно масштабировать, зеркально отражать, и вращать.<br />
Для звуковых и видео файлов и потоков работают функции приостановки, продолжения, пошагового просмотра, позицирования,<br />
записи в виде набора файлов, а также другие описанные ниже.<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1 (только для rtp/mjpeg через ElphelOgm)<br />
;framedelay : количество полных кадров удерживаемых в буфере (только для rtp/mjpeg через ElphelOgm)<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
;saveformat=jpeg|ogm|avi : формат для записи видео (jpeg, ogm - только для rtp/mjpeg через ElphelOgm)<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить mencoder вместо mplayer;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2757GenReS(плагин)2006-09-13T10:01:24Z<p>Khlut: аннотация</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
GenReS - универсальный плагин для браузеров основанных на Mozilla.<br />
Он позволяет использовать внешние программы для отображения HTML-тэгов EMBED и OBJECT<br />
либо запускать их в полном окне браузера.<br />
<br />
Плагин вызывает Perl-скрипты-посредники которые запускают нужные программы-просмотрщики и позволяют управлять ими и контролировать состояние из JavaScript.<br />
Наборы функций и вызываемых программ могут быть изменены и дополнены путём изменения существующих и создания новых<br />
управляющих скриптов.<br />
<br />
Существующий набор скриптов позволяет демонстрировать видео, аудио и статические изображения, используюя программы display из imagemagick, mplayer, ElphelOgm и mencoder.<br />
Изображения и видео можно масштабировать, зеркально отражать, и вращать.<br />
Для звуковых и видео файлов и потоков работают функции приостановки, продолжения, пошагового просмотра, позицирования,<br />
записи в виде набора файлов, а также другие описанные ниже.<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить mencoder вместо mplayer;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2756GenReS(плагин)2006-08-26T19:18:39Z<p>Khlut: /* Back-end программы */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить mencoder вместо mplayer;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
{| border="2" cellpadding="6" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"<br />
|+ '''Поддерживаемые MIME-типы и вызываемые программы'''<br />
!MIME-тип!!Протокол||Приложение<br />
|-<br />
|<br />
application/x-display<br />
image/tiff<br />
image/x-tiff<br />
image/x-tif<br />
image/sun-raster<br />
image/x-sun-raster<br />
image/x-rgb<br />
image/x-portable-pixmap<br />
image/x-portable-graymap<br />
image/x-portable-bitmap<br />
image/x-portable-anymap<br />
application/photoshop<br />
application/x-photoshop<br />
image/x-xcf<br />
image/xcf<br />
application/x-gimp<br />
application/gimp<br />
|http ftp file||display<br />
|-<br />
|<br />
video/ogg video/x-ogg application/x-elphel-ogm<br />
video/x-theora video/theora<br />
video/mpeg video/mjpeg<br />
video/x-mpeg video/x-mpeg2<br />
video/quicktime video/x-quicktime application/x-quicktimeplayer<br />
video/msvideo video/x-msvideo<br />
application/x-drm-v2<br />
application/x-mplayer2<br />
video/x-ms-asf<br />
video/x-ms-wm<br />
video/x-ms-wmv<br />
video/x-ms-wvx<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/dl<br />
video/x-dl<br />
video/sgi-movie<br />
video/x-sgi-movie<br />
video/anim<br />
video/x-anim<br />
video/fli<br />
video/x-fli<br />
<br />
audio/mp3 audio/x-mp3<br />
audio/mpeg2 audio/x-mpeg2<br />
audio/mpeg3 audio/x-mpeg3<br />
audio/mpeg audio/x-mpeg<br />
application/ogg application/x-ogg<br />
audio/ogg audio/x-ogg<br />
audio/x-ms-wax<br />
audio/wav audio/x-wav<br />
audio/x-pn-wav audio/x-pn-windows-acm<br />
<br />
|http ftp file||mplayer mencoder<br />
|-<br />
|<br />
application/x-elphel-ogm<br />
video/mjpeg<br />
|rtp||mplayer ElphelOgm<br />
|}<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=MediaWiki:Sidebar&diff=2755MediaWiki:Sidebar2006-08-26T18:29:42Z<p>Khlut: </p>
<hr />
<div>* navigation<br />
** mainpage|mainpage<br />
** currentevents-url|currentevents<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** portal-url|portal<br />
** helppage|help<br />
** http://www.elphel.com/|Elphel, Inc</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2743GenReS(плагин)2006-08-26T15:45:56Z<p>Khlut: /* Переменные статуса */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить mencoder вместо mplayer;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
информация о статических картинках (от display)<br />
<br />
;imgtype : формат (JPEG, TIFF и т.д.)<br />
;imgsize : размер картинки (например 800x600)<br />
;filelength : длина файла (например 89kb)<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2742GenReS2006-08-26T15:25:05Z<p>Khlut: /* Back-end programs */</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output.<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
;rotate : the rotation angle of the image clockwise in degrees (0|90|180|240) <br />
;mirror : mirror-symmetry mapping relative to vertical axis (true|false) <br />
;flip : the same relative to horizontal (true|false); simultaneous setting of flip and mirror is equivalent to rotate=180<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
*display from the packet ImageMagick - to demonstrate static images.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2741GenReS(плагин)2006-08-26T15:06:10Z<p>Khlut: /* Back-end программы */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить mencoder вместо mplayer;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555);<br />
* mencoder из пакета mplayer;<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp;<br />
* display из пакета ImageMagick - для показа статических картинок.<br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2740GenReS2006-08-22T18:07:35Z<p>Khlut: /* Static tag parameters */</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output.<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
;rotate : the rotation angle of the image clockwise in degrees (0|90|180|240) <br />
;mirror : mirror-symmetry mapping relative to vertical axis (true|false) <br />
;flip : the same relative to horizontal (true|false); simultaneous setting of flip and mirror is equivalent to rotate=180<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2739GenReS(плагин)2006-08-22T18:02:24Z<p>Khlut: /* Back-end программы */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить mencoder вместо mplayer;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555)<br />
* mencoder из пакета mplayer<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp. <br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно принимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать<br />
udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS(%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD)&diff=2738GenReS(плагин)2006-08-22T17:55:06Z<p>Khlut: /* Cтатические параметры тегов */</p>
<hr />
<div>{{ru|en=GenReS|cn=GenReS_cn}}<br />
<br />
== Cтатические параметры тегов ==<br />
<br />
;lowres : параметр прореживания для ускоренного DCT [0-3], 0-полное разрешение, 3-1/8<br />
;width : ширина окна<br />
;loop : повтор проигрывания (0 или не указано - бесконечно)<br />
;fps : частота кадров<br />
;frameskip : пропуск n кадров из каждых n+1<br />
;rotate : угол поворота изображения по часовой стрелке в градусах (0|90|180|270)<br />
;mirror : зеркальносимметричное отображение относительно вертикальной оси (true|false)<br />
;flip : то же относительно горизонтали (true|false); установка flip и mirror одновременно эквивалентна rotate=180<br />
<br />
== Динамически изменяемые переменные (можно указывать и как параметры тегов) ==<br />
<br />
;href : url файла или потока;<br />
;src : пока просто другое имя для href;<br />
;pause=1 или play=0 : приостановить проигрывание;<br />
;pause=0 или play=1 : продолжить проигрывание;<br />
;filepos=sec : переместиться на указанное время от начала в секундах или в процентах, может не работать, если mplayer по этому файлу не перемещается;<br />
;framestep=что-нибудь : показать следующий кадр и остановиться (пошаговый просмотр);<br />
;run=1 : запустить плеер если он прекратил работу (по ошибке или концу файла);<br />
;run=0 : завершить плеер;<br />
;save : запустить mencoder вместо mplayer;<br />
:;save=ask : всегда спрашивать имя файла для записи;<br />
:;save=auto : не спрашивать если пользователь укажет в диалоге.<br />
<br />
== Переменные статуса ==<br />
Это то что выдаёт mplayer или mencoder, в настоящий момент стороки просто разделяются на две части по первому из символов '=' или ':'.<br />
То что слева - имя переменной (пробелы и нелатинские буквы удаляются), справа - значение.<br />
<br />
;frame : сообщение плеера/рекордера о последнем кадре<br />
;error : последнее сообщение об ошибке<br />
<br />
Возможны другие но они пока не используются.<br />
<br />
;run : особая переменная - состояние плеера 0 - незапущен, 1 - запущен, для режима записи становится в 0 когда пользователь отказался указать файл;<br />
;pause, play : аналогично - состояние приостановки проигрывания, в том числе и по framestep.<br />
<br />
== Callback функции ==<br />
<br />
По приходу данных от плеера они передаются в переменные объекта и<br />
становятся доступны из javascript. При этом если задана соответствующая<br />
функция с именем "on&lt;имя переменной&gt;", она будет вызвана.<br><br />
<br />
;onrun:вызывается по запуску и остановке видеоплеера или процесса записи<br />
;onerror:по приходу сообщения об ошибке<br />
;onframe:при очередном кадре<br />
;onmousedown и др стандартные callback функции:уже предоставлены браузером и не нуждаются в какой-то обработке внутри плагина<br />
<br />
== Back-end программы ==<br />
<br />
В настоящий момент задействованы:<br />
<br />
* mplayer (компилировать с live555)<br />
* mencoder из пакета mplayer<br />
* ElphelOgm - для получения mjpeg видео по чистому multicast или unicast rtp. <br />
<br />
Чтобы задействовать ElphelOgm, должен быть установлен mime-type начинающийся с video/m<br />
и URL должен быть вида: rtp://ip:port/ , где:<br />
<br />
;ip -: multicast ip потока<br />
;port -: multicast port <br />
<br />
Unicast тоже можно ринимать, для этого указывается адрес и порт получателя, и сервер также должен быть сконфигурирован чтобы постоянно слать<br />
udp видеопоток на этот адрес и порт. Динамическое изменение URL не поддерживается для RTP.<br />
Вместо этого используйте последовательность команд: obj.run=0; obj.src=...; obj.run=1;<br />
<br />
== Диагностика ошибок установки ==<br />
Запустите скрипт mplayer.pl из командной строки. Он находится в /usr/lib/genres. Если все необходимые perl модули установлены,<br />
он должен напечатать несколько строк вида: "переменная=значение" и ожидать ввода.<br />
Если вместо этого вы получите сообщение "Can't locate Gtk2.pm in @INC" значит необходимо установить этот модуль из вашего дистрибутива или<br />
с [http://cpan.org CPAN].<br />
Другие ссылки: [http://gtk2-perl.sourceforge.net/ проект gtk2-perl], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl на CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl на freshmeat].<br />
<br />
Введите параметры как они представлены в HTML теге, но только по одному на строке и в конце добавьте run=1. Например:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
Если MPlayer запустился, то эта часть работает, попробуйте посмотреть страницу примера входящую в состав пакета genres с помощью браузера mozilla или firefox. Если вместо окна с видео вы видите серый прямоугольник, значит возможно надо исправить URL на доступный.<br />
<br />
Проверьте список установленных плагинов: <strong>about:plugins</strong> если GenReS отсутствует, возможно genres.so лежит не втом месте.<br />
<br />
Плагин выдаёт много отладочной информации. Для её сбора запустите firefox из командной строки с перенаправлением вывода в файл.<br />
Mozilla надо запускать с ключом -debug:<br />
mozilla -debug >& moz.log<br />
Если причина не ясна, сожмите файл с помощью Gzip или bzip2 и отправьте мне на изучение.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 15:49, 11 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=Ccam.cgi&diff=2726Ccam.cgi2006-06-24T18:19:01Z<p>Khlut: /* below is yet unedited text from ccam.c comments */ garbage deleted</p>
<hr />
<div>== overview ==<br />
The interface described below and all the links are for the Model 333 camera, interface for the 313 is approximately (but not completely) the same.<br />
<br />
ccam.cgi (source - [http://cvs.sourceforge.net/viewcvs.py/elphel/camera333mjpeg/333/apps/ccam/ccam.c?view=markup ccam.c]) is currently the main interface to the camera functionality that uses GET method to pass parameters and receive the data back, so you may call it as<br />
<nowiki>http://<camera-ip-address>/admin-bin/ccam.cgi?parameter1=value1&parameter2=value2&...</nowiki><br />
Most parameters are persistent, so if the value is not specified it will be assumed to remain the same.<br />
These parameters are approximately related to the pairs of parameters passed to the main camera driver [http://cvs.sourceforge.net/viewcvs.py/elphel/camera333mjpeg/os/linux/arch/cris/drivers/cc333.c?view=markup cc333.c] that uses specific sensor driver (for [http://www.micron.com/products/imaging/products/MT9T001.html Micron sensors] - [http://cvs.sourceforge.net/viewcvs.py/elphel/camera333mjpeg/os/linux/arch/cris/drivers/mt9x001.c?view=markup mt9x001.c]) from the user space to the driver with IOCTL. The list of these 63 driver parameters is defined in [http://cvs.sourceforge.net/viewcvs.py/elphel/camera333mjpeg/os/linux/include/asm-cris/c313a.h?view=markup c313a.h] (names staring with "P_"), most of the values come in pairs desired and actual:<br />
ioctl(devfd, _CCCMD(CCAM_WPARS , P_''name''), ''desired_value''); //set new value of the parameter <br />
''current_actual_value''=ioctl(devfd, _CCCMD(CCAM_RPARS , P_''name'' ), 0); // read current actual value - driver modifies the set value if needed to match the valid range.<br />
<br />
Writing these parameters will not cause immediate action, additional write needs to be performed to make driver process the new values. Some parameters can be updated without interrupting the sensor operation and the video stream output if active (i.e. exposure time, panning without window resizing, analog gains, color saturation). Changes in other parameters (such as window size or decimation) will not be applied until the sensor is stopped.<br />
<br />
ioctl(devfd, _CCCMD(CCAM_WPARS , P_UPDATE ), 3); // "on the fly"<br />
ioctl(devfd, _CCCMD(CCAM_WPARS , P_UPDATE ), 1); // stop the sensor if needed, write new parameters, start sensor and wait sensor-dependent (usually 2) petentially "bad" frames before sending images through the FPGA compressor.<br />
<br />
It is possible to read the current values of CCAM_RPARS using special request to ccam.cgi as HTML table, set of javascript assignments or xml data<br />
<br />
There is only one copy of these kernel-space variables - they reflect current state of a single sensor and single compressor. <br />
<!-- http://192.168.0.44/admin-bin/ccam.cgi?opt=vhcxy&dv=1&dh=1&iq=70&kga=63&kgm=6&gr=17&gg=14&ggb=14&gb=17&csb=200&csr=200&bit=8&gam=57&pxl=10&pxh=254&e=25&ww=2048&wh=1536&wl=0&wt=0&fps=0&_time=1127851252626 --><br />
<br />
== ccam.cgi parameters ==<br />
Not all of the parameters are applicable to all sensors/camears, some are obsolete.<br />
=== opt ===<br />
opt value is an unordered string of characters:<br />
{| border="1" cellpadding="2"<br />
|-<br />
| character || Description || Working?<br />
|-<br />
| h || Use hardware compression || Y<br />
|-<br />
| c || Consider sensor to be the color one, if not - skip Bayer color filters processing || Y<br />
|-<br />
| x || Flip (mirror) image horizontally (uses in-sensor capabilities) || Y<br />
|-<br />
| y || Flip (mirror) image vertically (uses in-sensor capabilities) || Y<br />
|-<br />
| p || test pattern (ramp) instead of an image (for Micron sensors - same as "f" below) || Y<br />
|-<br />
| f || test pattern (ramp) generated in FPGA || Y<br />
|-<br />
| b || buffer file || N?<br />
|-<br />
| m || restart exposure after sending || N?<br />
|-<br />
| s || software trigger (for image intensifiers) - trigger if sum of pixels in a line > threshold || N?<br />
|-<br />
| t || external trigger - wait for external trigger input || N?<br />
|-<br />
| v || video mode - currently only means that it is not a reload from memory || Y<br />
|-<br />
| g || use background image || N?<br />
|-<br />
| q || return a quicktime movie clip || Y<br />
|-<br />
| u || updates (some) parameters "on the fly", returns 1x1 pix dummy image || Y<br />
|-<br />
| * || ignore lock file, recover from "camera in use" || Y<br />
|-<br />
|}<br />
<br />
----<br />
=== Frame size and resolution ===<br />
{| border="1" cellpadding="2"<br />
|-<br />
| Key || Value range (3MPix sensor)|| Description || Working? ||"on the fly"? ||Notes<br />
|-<br />
| ww || 2..2048 || Sensor active window width (before decimation) || Y || N ||1<br />
|-<br />
| wh || 2..1536 || Sensor active window height (before decimation) || Y || N ||1<br />
|-<br />
| wl || 0..(2047-ww) || Sensor active window left margin (before decimation) || Y || Y || 2<br />
|-<br />
| wt || 0..(1535-wh) || Sensor active window top margin (before decimation) || Y || Y || 2<br />
|-<br />
| dh || 1..8 || Horizontal decimation (resoulution/image size reduction) || Y || N || 3<br />
|-<br />
| dv || 1..8 || Vertical decimation (resoulution/image size reduction) || Y || N || 3<br />
|-<br />
|}<br />
<br />
Notes:<br />
# Has to be (or will be truncated to) multiple of a macroblock (16x16 pixels) after the decimation<br />
# Even value<br />
# Decimation for MT9T001 3MPix sensor can be any integer from 1 to 8, for most other sensors - only 1/2/4/8. Because of the Bayer color filter mosaic, pixels are decimated in pairs, so decimation "4" means that for each pair of pixels used 6 pixels are skipped.<br />
<br />
=== Exposure controls ===<br />
There are multiple factors that influence image pixel values for the same lighting conditions, one is exposure time.<br />
<br />
Most CMOS image sensors (including Micron sensors used in Elphel camears) use [[Electronic Rolling Shutter]]. <br />
<br />
<br />
{| border="1" cellpadding="2"<br />
|-<br />
| Key || Value range (3MPix sensor)|| Description || Working? ||"on the fly"? ||Notes<br />
|-<br />
| e || 0..600000 || exposure time (0.1 msec step) || Y || Y || 1<br />
|-<br />
| vw || ? || virtual frame width || Y || ? || 2<br />
|-<br />
| vh || ? || virtual frame height || Y || ? || 3<br />
|-<br />
| fps= || xx.xx || desired frame rate || Y || ? || 4<br />
|-<br />
| sclk= || 6..48 || sensor clock (in MHz) || Y || N || 5<br />
|-<br />
| fclk= || 0..127 || FPGA clock (in MHz) || Y || N || 6<br />
|-<br />
| xtra= || 0..?? || extra frame time || Y || N || 7<br />
|-<br />
<br />
|}<br />
Notes:<br />
# Sensor driver will calculate the number of lines of exposure, will increase virtual frame height (vertical blanking) if needed (but currently - not the virtual frame width - horizontal blanking). For longer exposures you may want to do that manually or decrease the sensor clock frequency. ''Update'' - for the MT9T001 sensor that might not be needed - I'll fix the driver --[[User:Andrey.filippov|Andrey.filippov]] 12:39, 29 September 2005 (MDT). '''Done in version 6.4.9''' - now the frame time (for MT9T001 only) can be as long as 0xfffff (approximately 1 millilon) scan lines - nearly a full minute with the full frame and 48MHz clock.--[[User:Andrey.filippov|Andrey.filippov]] 11:27, 11 October 2005 (MDT)<br />
# It is possible to extend line readout time, but is not normally needed/used.<br />
# Explicitly specified virtual frame height - this parameter (if present) overwrites exposure setting. Not normally needed.<br />
# Driver will try to reduce frame rate by adding vertical blanking - limited by the maximal blanking time<br />
# Sensor clock, may be used with 1.3 and 2 MPix sensors to make longer exposure time (not needed with MT9T001 with rev. 6.4.9 or later), It also can make sense to reduce the frequency when the maximal frame rate is not needed to reduce sensor noise visible as horizontal lines in early revisions of MT9T001 sensor. You may read the sensor chip ID (revision/type) from telnet as "hello -IR ba 0" ("hello -IR" will read all the sensor registers). Current FPGA code uses the sensor clock to synchronize sensor power supply. And so the sensor power can be lost if this clock is too low, 6MHz is safe to use. On the upper side 48MHz is the maximal clock frequency for these sensors, driver limits this value.<br />
# FPGA clock frequency (drives compressor and frame buffer memory. For the model 313 practical limit was about 95MHz and you could easily change it "on the fly". Model 333 cameras uses DDR SDRAM and the implemented FPGA inteface to DDR SDRAM needs clock phase adjustment for the memory when you change the frequency. Currently it can be done manually through telnet as "fpcf -phase 0 200". Initial value for the sensor and FPGA clock frequencies might be set in the [http://cvs.sourceforge.net/viewcvs.py/elphel/camera333mjpeg/packages/initscripts/333/fpga?view=markup /etc/init.d/fpga] initialization script of the camera.<br />
# For debugging purposes (probably needed only for the model 313 camera) frame period might be increased by the specified number of pixel clock periods. It was inteded to fine-tune the frame period (that depends on multiple sensor settings) and make sure it is not shorter than compressor could handle (333 compressor is faster).<br />
<br />
===Binning ===<br />
<br />
Binning allows effectively to increase the sensor sensitivity when it is operating with reduced resolution (decimation). Decimation still determins the resolution, binning defines how many pixel pairs are added together.<br />
{| border="1" cellpadding="2"<br />
|-<br />
| Key || Value range (3MPix sensor)|| Description || Working? ||"on the fly"? ||Notes<br />
|-<br />
| bh || 1..dh || Horizontal binning (sensitivity for lower resolution) || Y || Y || 1<br />
|-<br />
| bv || 1..dv || Vertical binning (sensitivity for lower resolution) || Y || Y || 1<br />
|-<br />
|}<br />
Notes:<br />
# Currently for MT9T001 sensor only, works for all vertical binning values, but not all of the horizontal (some have no effect, others - produce vertical lines). I would expect this glitches will be fixed in newer sensors by Micron. <br />
<br />
Here are two examples:<br />
<br />
1. Full frame with decimation by 4 in each direction will result in image of 512*384 pixels, pixel values the same as for the full resolution (only 2x2 pixels for each 8x8 are used, others are discarded)<br />
ww=2048&wh=1536&wl=0&wt=0&dl=4&dh=4&bh=1&bv=1<br />
2. Full frame with decimation by 4 in each direction will result in image of 512*384 pixels, pixel values are 16 times higher than for the full resolution (all 8x8 pixels are used, values are added together following the bayer RG/GB mosaic - reds with reds, greens with greens, blues with blues)<br />
ww=2048&wh=1536&wl=0&wt=0&dv=4&dh=4&bh=4&bv=4<br />
<br />
=== Analog Gains ===<br />
<br />
Most sensors have some controls for the analog signal gains before the pixel data is digitized. Some sensors (as now discontinued Kodak KAC-1310) have individual color gains and separate global gain, others (as Micron ones) - only color. Usually there are two "green" gains as with Bayer mosaic filters there are two green pixels in each 2x2 pixek cell (RG/GB).<br />
Gain values can be far from linear, too low gain setting might be not enough to saturate pixel value to 1023 (usually 255 after conversion) even with the very bright light.<br />
<br />
{| border="1" cellpadding="2"<br />
|-<br />
| Key || Value range (3MPix sensor)|| Description || Working? ||"on the fly"? ||Notes<br />
|-<br />
| gr || 0..63 || analog gain RED (or mono) || Y || Y || <br />
|-<br />
| gg || 0..63 || analog gain GREEN (or green in "red" line) || Y || Y || <br />
|-<br />
| gb || 0..63 || analog gain BLUE || Y || Y ||<br />
|-<br />
| ggb || 0..63 || analog gain GREEN in "blue" line) || Y || Y ||<br />
|-<br />
| kga || 63 || Kodak KAC1310 analog gain Y (all colors) || Y || Y || 1<br />
|-<br />
| kgb || ? || Kodak KAC1310 analog gain ? (all colors) || ? || Y || 1<br />
|-<br />
| kgm || 6 || Kodak KAC1310 mode || Y || Y || 1<br />
|-<br />
|}<br />
# Used in Kodak KAC-1310 (now obsolete) sensors. For MT9?001 sensors driver just multiplies gr, gg, gb and ggb by kga/63. It is better to keep it 63 (or do not use at all) for this family of sensors.<br />
<br />
=== Image Quality, Gamma correction, Color Saturation ===<br />
<br />
{| border="1" cellpadding="2"<br />
|-<br />
| Key || Value range (3MPix sensor)|| Description || Working? ||"on the fly"? ||Notes<br />
|-<br />
| iq || 1..99 || JPEG Quality (%) || Y || ? || 1<br />
|-<br />
| gam || 0.13 .. 10 || Gamma correction value (%) || Y || Y || 2<br />
|-<br />
| pxl || 0..255 || Black level || Y || Y || 3<br />
|-<br />
| pxh || 0..255 || White level || Y || Y || 3<br />
|-<br />
| csb || 0..710 || Color Saturation (%), Blue || Y || Y || 4<br />
|-<br />
| csr || 0..562 || Color Saturation (%), Red || Y || Y || 4<br />
|-<br />
|}<br />
# Standard JPEG compression quality in (%). Earlier negative values were used (in software compression mode only) to generate BMP images, then"-1" meant BMP non-compressed and "-2" - BMP RLE compressed. The code is likely rotten by now.<br />
# Camera implements virtually arbitrary table-based conversions from e.g. 10-bit sensor data to 8-bit used for compression. You may think of it as 256-entry tables of single-byte values that are used to convert 10 (or more) bit sensor data to 8-bit foramt using linear interpolation between entries. There is four such tables T: one for each color including 2 greens - RG/GB. The interpolation is done as follows:<br />
<br />
Y= T[C][x]+ (((T[C][x+1]-T[C][x]) * (X & ((1<<D)-1))) >> D)<br />
where<br />
X - W-bit input (sensor) data,<br />
Y - 8-bit output<br />
x - X (input) truncated to 8 bits: x = X>>(W-8)<br />
D = W-8 (number of bits to be truncated, i.e. 2 for a 10-bit sensor) <br />
C - color (0..3)<br />
and T is a 4 x 256 byte table (one for each color).<br />
<br />
for 10 bits it will be<br />
Y= T[C][x]+ (((T[C][(x)+1]-T[C][x]) * (X & 3)) >> 2)<br />
<br />
An implementation detail: (T[C][(X>>2)+1]-T[color][X>>2]) is calculated by software in advance and stored in a separate table. For practical reasons this table is combined with the main one as 16-bit values. The 8 MSB stores the difference T[C][x+1]-T[C][x] and the 8 LSB stores the T[C][x] value. So written to the table is (R[C][x]<<8)+T[C][X].<br />
The 8 bit imposes a restriction on the granularity of the table. Difference between consecutive entries needs to be in the range -128..127 (this is enough).<br />
All this could change in the future (use the source Luke) --[[User:Andrey.filippov|Andrey.filippov]] 17:18, 11 October 2005 (MDT)) <br />
<br />
(How about adding dither before the final truncate? Or maybe the signal has noise enough already to make dither unecessary/harmful? --[[User:Pfavr|Pfavr]] 15:58, 27 October 2005 (CDT))<br />
<br />
Model 313 camera had a single table for all colors, Model 333 FPGA has room for bigger tables so each color has each own 256-entry table. Currently for the simplicity of the web-interface ccam.cgi only calculate a single table from a gamma value (100 - linear, 47 - standard gamma setting for video cameras) and 2 of the values (pxl and pxh) below. Together they make something like "levels" in image manipulation programs (such as [http://www.gimp.org/ GIMP]), but camera hardware (FPGA code) allows more flexible "curves" control.<br />
<br />
# values for the 8 MSBs of the sensor data that map to total black (0x00) and total white (0xff) of the output signal. Sensors have different modes of auto-zero, and with default settings MT9T001 sensor adjusts black level so in the complete darkness each pixel would output 0x18 (8 MSBs are 0x0a or 10 decimal), other sensors have different values, it is also possible to reprogram sensors to change the "hardware" black value if needed.<br />
# Color saturation values for blue (B-G) and red (R-G) color components, in (%). In linear mode (gam=100) the true colors will be produced with color saturations of 1.0 (100), but for lower gamma setting the color saturation should be increased to compensate for the lowering contrast of the image - with the mosaic color filter pattern lower relative difference between the pixels will be decoded as less intense color.<br />
<br />
Verilog code that implements such conversion is [http://cvs.sourceforge.net/viewcvs.py/elphel/camera333mjpeg/fpga/x3x3/sensorpix333.v?view=markup here].<br />
<br />
=== Histograms ===<br />
<br />
Model 333 camera calculates histograms (individually for each of 4 colors (including 2 greens). Histograms are calculated inside a specified window - the following parameters are written directly to FPGA - now shadows in kernel space yet (so no way to read back the current values). As the sensors use 2x2 pixel mosaic, these 4 values are made even (by truncating LSB).<br />
{| border="1" cellpadding="2"<br />
|-<br />
| Key || Value range (3MPix sensor)|| Description || Working? ||"on the fly"? ||Notes<br />
|-<br />
| hl || 0..2046 || Histogram window left margin || Y || Y ||<br />
|-<br />
| ht || 0..1534 || Histogram window top margin || Y || Y ||<br />
|-<br />
| hw || 0..2048 || Histogram window width || Y || Y ||<br />
|-<br />
| hh || 0..1536 || Histogram window height || Y || Y ||<br />
|-<br />
|}<br />
<br />
hl= distance from the left active window boarder to the left of histogram calculation window, default=0<br />
<br />
ht= distance from the top active window boarder to the top of histogram calculation window, default=0<br />
<br />
hw= histogram calculation window width , default=0xffe (will extend to the bottom right corner)<br />
<br />
hh= histogram calculation window height , default=0xffe (will extend to the bottom right corner)<br />
<br />
Currently position and size of the histogram window is truncated to even values (LSB ignored).<br />
<br />
Histogram calculation is always on when the sensor is running (normally it is even if no stream is output), FPGA uses<br />
two pages of internal memory and switches between them when ready. For each frame it first writes zero to each histogram<br />
value (4x256) and then adds pixels (after converting from 10 bits sensor data to 8 bit using "curves" tables), limiting<br />
the value by 2^18-1 (hardware limitation). If you read histogram table asynchronously it is likely that the sum will<br />
differ from the total number of pixels as FPGA could switch pages while you were reading. But it switches only at<br />
the end of frame, so there will be no partial sums read out.<br />
<br />
There are two ways to read the histogram table now:<br />
<br />
* manually (through telnet) using "fpcf -histogram" - it will print data as hex values or<br />
* read binary file (4*256*32bits=4KB) /dev/histogram or through a symlink at <nowiki>http://<camera_ip>/histogram</nowiki><br />
<br />
The four (as number of color filters in Bayer mosaic) tables will be read out in the following order:<br />
<br />
R (256 values), Gr (green in the "red" row - 256 values), Gb (green in the "blue" row - 256 values), B (256 values)<br />
<br />
It is the same order how now the "curves" tables are written to the FPGA. Now ccam.cgi only can fill these table from<br />
the gamma value, all colors the same. But you can experiment with it by creating a text file with 1024 hex values -<br />
(ccam.c shows how to build it), copy it to the camera file system and use "fpcf -table 400 <path_to_table>"<br />
to transfer it to FPGA. If you then reacquire image without changing gamma value ccam.cgi will not overwrite<br />
the table you've just downloaded.<br />
<br />
It seems that colors work correctly with all image orientations and decimations for all Micron sensors. If not -<br />
let me now, you can temporary compensate wrong colors by adding "&byr=<0..3>" (bayer phase shift) to the image URL - it reassigns<br />
RG/GB mosaic in different ways, but the sequence of the colors R,Gr,Gb,B in the FPGA tables ("curves", histogram)<br />
will still correspond to the colors in the JPEG output.<br />
<br />
=== HTML, XML or VRML ===<br />
<br />
ccam.cgi can send html, xml or vrml (code broken needs to be restored) files, not just images if any of html, htmlr, htmll or htmlj parameters are present in the url.<br />
<br />
{| border="1" cellpadding="2"<br />
|-<br />
| Key || Value range (3MPix sensor)|| Description || Working? ||"on the fly"? ||Notes<br />
|-<br />
| html || 0 || no output || Y || Y ||<br />
|-<br />
| || 1 || all sensor parameters as javaScript || Y || Y || 1, 4<br />
|-<br />
| || 2 || all sensor parameters as html || Y || Y || 2, 4<br />
|-<br />
| || 3 || beam data as javaScript || Y || Y || 1, 8<br />
|-<br />
| || 4 || beam data as html || Y || Y || 2, 8<br />
|-<br />
| || 5 || state (5 -picture ready) as javaScript || Y || Y || 1,5<br />
|-<br />
| || 6 || state (5 -picture ready) as html || Y || Y || 2,5<br />
|-<br />
| || 7 || start image acquisition (option "s" or "t" should be present) || ? || Y || 6<br />
|-<br />
| || 8 || reset waiting for trigger || ? || Y || 7<br />
|-<br />
| || 10 || all sensor parameters as XML || Y || Y || 3<br />
|-<br />
| || 11 || beam data as XML || Y || Y || 3,8<br />
|-<br />
| || 12 || state (5 -picture ready) as XML || Y || Y || 3, 5<br />
|-<br />
| || 13 || start image acquisition (option "s" or "t" should be present), return XML || Y || Y || 3, 6<br />
|-<br />
| || 14 || reset waiting for trigger, return XML || Y || Y || 3,7<br />
|-<br />
| htmlr || n || Refresh each n seconds || Y || Y || 9<br />
|-<br />
| htmll || escaped string || command to be executed onLoad in <nowiki><body></nowiki> tag || Y || Y || 10<br />
|-<br />
| htmlj || escaped string || include javaScript file || Y || Y || 11<br />
|-<br />
<br />
<br />
|}<br />
<br />
Notes:<br />
# Head section of the html output file will have javascrips assingments "document.''variable_name''=value;" for each parameter. No visible elements in the file - it was intended to be used in a frame set before XMLHttpRequest was supported in most browsers.<br />
# Parameters are output as a two-column html table (first column - name, second - value).<br />
# Parameters and their values are output as XML file.<br />
# Sensor-related parameters are output<br />
# Only sensor/compressor state is output. State 7 - sensor is running, constant compression is off (single frame mode), state 8 - compressor is in constant compression mode (such as during streaming), static images can not be acquired, some acquisition parameters can not be changed withowt stopping the compression.<br />
# This was designed for sensors with asynchronous reset (such as now obsolete now Zoran ones). Don't remember what it will do (or how to use it) with Micron ones.<br />
# Reset waiting for an external trigger (not sure if it still works)<br />
# Output beam parameters (center of gravity, half width in x, y, etc.). This code is broken now, but might be repaired.<br />
# Instruct the html page to refresh itself each specified number of seconds.<br />
# Value is an "escaped" string that contains javaScript command to be executed whenn the page is loaded (body onLoad).<br />
# Value is an "escaped" string that has the path of the external javaScriptg file to be included inside the <nowiki><head></nowiki> tag of the page<br />
<br />
<br />
== below is yet unedited text from ccam.c comments ==<br />
<br />
<br />
<br />
<br />
* vrmld - decimation to make a grid (>=8 for full frame) (default = 16)<br />
* vrmlb - number of individual blocks in each x/y (default=2)<br />
* vrmlm - maximal pixel. 1023 - full scale, less - increase contrast, 0 - automatic (default =1023)<br />
<br />
* vrmli - indentation (default=1)<br />
* vrmlf - format - 0 - integer, 1 - one digit after "." (default 0)<br />
* vrmll - number of countours to build (default = 32)<br />
* vrmlo - options for isolines - e - elevated, f - flat (default=ef)<br />
* vrmlz - 0..9 output (gzip) compression level (0 - none, 1 - fastest, default - 6, best -9)<br />
<br />
* hist=n - read frame from "history" applies only to rereading from memory after acquisition of a clip<br />
n<=0 - from the end of clip (0 - last), n>0 - from the start (1 - first)<br />
<br />
<br />
<br />
* pfh - photofinish mode strip height (0 - normal mode, not photofinish). In this mode each frame will consist of multiple<br />
pfh-high horizontal (camera should be oriented 90 deg. to make vertical) strips, and no extra lines will be added to the frames<br />
for demosaic<br />
for now: +65536 - timestamp for normal frames, +131072 - timestamps for photo-finish mode<br />
* ts - time stamp mode: 0 - none, 1 - in upper-left corner, 2 - added to the right of the image (photo-finish mode) <br />
* fsd - frame sync delay (in lines) from the beginning of a frame (needed in photofinish mode - 3 lines?)<br />
<br />
<br />
<br />
* _time=t (ms) will try to set current system time (if it was not set already. _stime - will always set)<br />
<br />
<br />
<br />
<br />
<br />
<br />
* fpns - 0..3 fpga background subtraction:<br />
* 0 - none,<br />
* 1 (fine) - subtract 8-bit FPN from 10-bit pixel<br />
* 2 - multiply FPN by 2 before subtracting<br />
* 3 - multiply FPN by 4 before subtracting (full scale)<br />
* note: negative result is replaced by 0, decrease FPN data before applying for "fat 0"<br />
* fpnm - muliply by inverse sensitivity (sensitivity correction) mode:<br />
* 0 - no correction<br />
* 1 - fine (+/- 12.5%)<br />
* 2 - medium (+/- 25%)<br />
* 3 - maximal (+/- 50%)<br />
* pc - pseudo color string. Applies to monochrome images and vrml<br />
<br />
* any of vrml* specified - vrml instead of a picture/html<br />
*<br />
* background measurement/subtraction will (now) work only with 10-bit images<br />
* gd = "digital gain" 0..5 (software)<br />
* byr =0..3 Overwite Bayer phase shift, =4 - use calculated by driver.<br />
<br />
* bit - pixel depth (10/4/8)<br />
* shl - shift left (FPGA in 8 and 4-bit modes) - obsolete<br />
* clk - MCLK divisor - 80MHz/(2..129) - obsolete?<br />
<br />
<br />
* bg = n - calculate background 1-2-4..16 times (does not need option s/t/v)<br />
* parameters for "instant on" quicktime<br />
* qfr = n - number of frames to send in a quicktime clip<br />
* qpad = % to leave for the frame size to grow (initial size 1-st frame * (100- 1.5*qpad)/100<br />
* qdur = frame duration in 1/600 of a second<br />
* parameters for quicktime clips (send after shooting)<br />
* qsz = n - clip size in KB (w/o headers) (<=0 will use "instant on") - will be obsolete<br />
* qcmd= (mandatory for videoclip)<br />
1 - start constant compression of all acquired frames<br />
2 - stop constant compression.<br />
3 - acquire the whole buffer and stop<br />
4 - read movie from buffer<br />
6 (and 5?) - stop, then read<br />
7 - acquire buffer, then read<br />
<br />
* qts = t - playback time/real time</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2721GenReS2006-04-30T19:47:26Z<p>Khlut: </p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output.<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2720GenReS2006-04-30T19:45:16Z<p>Khlut: Reverted edit of Khlut, changed back to last version by 87.74.87.152</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
== Static tag parameters ==<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
<br />
== Dynamic variables (can also be used as the parameters of tags) ==<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
== Status variables ==<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
== Callback functions ==<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
<br />
For ElphelOgm to be used, the mime-type must begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code></div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2719GenReS2006-04-30T19:41:31Z<p>Khlut: /* options in genres.conf */</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams {1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel {1|0} :- enable or disable the debug output.<br />
<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2718GenReS2006-04-30T19:40:56Z<p>Khlut: /* Configuration */ new section</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
== Configuration ==<br />
The plugin uses "~/.mozilla/genres/genres.conf" or "/etc/genres.conf" as main config file.<br />
Options for mplayer, mencoder and ElphelOgm are stored in the config file "~/.mozilla/genres/mplayer.conf", which is used by mplayer.pl control script.<br />
The files can contain shell-like comments.<br />
=== options in genres.conf ===<br />
;mozillastreams={1|0} :- use or not mozilla streams (and cache) for http, https and ftp;<br />
;debuglevel={1|0} :- enable or disable the debug output.<br />
=== options in mplayer.conf ===<br />
;out_file_once=template :- template for filename;<br />
;out_file=template :- template for filename for tags with parameter save=auto;<br />
;vo={x11,xv} :- Video output driver (see man mplayer about -vo option);<br />
;ao={arts,esd,alsa,oss} :- Audio output driver (see man mplayer about -ao option);<br />
;not_ask={1|0} :- not show file save dialog for tags with save=auto parameter;<br />
;frames=number :- Frames per file limit for recording (output will be splitted).<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2709GenReS2006-04-02T06:18:09Z<p>Khlut: </p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
<br />
=== Dynamic variables (can also be used as the parameters of tags) ===<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
=== Status variables ===<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
=== Callback functions ===<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2708GenReS2006-04-02T06:17:12Z<p>Khlut: sections are reorganized</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
== Usage in Javascript ==<br />
=== Static tag parameters ===<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
<br />
== Dynamic variables (can also be used as the parameters of tags) ==<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
== Status variables ==<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
== Callback functions ==<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=Current_events&diff=2707Current events2006-03-31T09:11:00Z<p>Khlut: /* 2005-10-23 */</p>
<hr />
<div>= 2006-03-31 =<br />
Due to spam it is forbidden to edit articles anonymously --[[User:Khlut|Sergey Khlutchin]] 03:11, 31 March 2006 (CST)<br />
<br />
= 2005-10-23 =<br />
<br />
== GenReS plugin for Mozilla v 0.6 released ==<br />
Added support for recording with mencoder. Video splits to files with specifed number of frames.<br />
New feature will be used in HTML video surveillance system.<br />
<br />
= 2005-10-20 =<br />
<br />
ElphelWiki is now hosted at [http://www.siteground.com SiteGround]<br />
<br />
= 2005-10-19 =<br />
<br />
Wiki will be moved to the new location shortly <br />
<br />
= 2005-10-15 =<br />
== GenReS v0.5 Released ==<br />
Bugfix release.<br />
Several issues with tag parameters were fixed. The SRC tag parameter can now be used as an alias for HREF.<br />
[http://sourceforge.net/projects/genres/ GenReS] plugin for Mozilla/Firefox used in our [[HTML Video Surveillance]].<br />
<br />
= 2005-09-24 =<br />
== Live.com was renamed ==<br />
Ross Finlayson informs:<br />
Live.com was renamed to [http://Live555.com Live555.com]<br />
<br />
= 2005-09-23 =<br />
== New Video Surveillance System is written on HTML ==<br />
See [[HTML Video Surveillance]].<br />
== Quick RTSP server ==<br />
Added to old CVS repository<br />
The rtsp server (qrtsp) is written in C and much quicker than old rtsp server which was a shell script.<br />
With new server used with rtp streamers mplayer starts in less than one second.<br />
Program will be added to new branches.<br />
<br />
== GenReS v0.4.1 Released ==<br />
[http://sourceforge.net/projects/genres/ GenReS] plugin for Mozilla/Firefox used in our [[HTML Video Surveillance]].<br />
Fixed bug in the player watchdog.</div>Khluthttps://wiki.elphel.com/index.php?title=333_prices&diff=2691333 prices2006-03-28T08:18:52Z<p>Khlut: Reverted edit of 83.117.80.252, changed back to last version by Andrey.filippov</p>
<hr />
<div>{{Manual Header}}<br />
<br />
{| border="1" cellpadding="2"<br />
|+Elphel Model 333 price list (MSRP)<br />
|-<br />
| model number || Description || price, USD || Notes<br />
|-<br />
| NC333L || Network camera base || $650 || 1,7<br />
|-<br />
| NC333L-12 || Network camera base for battery operation - 12VDC input || $650 || 1,6,7<br />
|-<br />
| NC333L-24 || Network camera base for battery operation - 24VDC input || $650 || 1,6,7<br />
|-<br />
| SF318M1M || Sensor front end, monochrome 1280x1024 (1.3 MPix) with [http://www.micron.com/products/imaging/products/MT9M001.html Micron MT9M001] CMOS sensor || $150 || 2<br />
|-<br />
| SF318M1C || Sensor front end, color 1280x1024 with (1.3 MPix) with [http://www.micron.com/products/imaging/products/MT9M001.html Micron MT9M001] CMOS sensor || $150 || 2<br />
|-<br />
| SF318M2C || Sensor front end, color 1600x1200 with (2.0 MPix) Micron MT9D001 CMOS sensor || $150 || 2<br />
|-<br />
| SF318M3C || Sensor front end, color 2048x1536 with (3.0 MPix) with [http://www.micron.com/products/imaging/products/MT9T001.html Micron MT9T001] CMOS sensor || $150 || 2<br />
|-<br />
| PW-130 || Midspan power supply (by [http://www.aultinc.com/ Ault]) || $30 || 3<br />
|-<br />
| H3Z4512CS || Computar Varifocal Lens, 4.5-12.5mm F1.2 Manual Iris 1/2inch CS-Mount || $128 || 4<br />
|-<br />
| - || GNU/GPL Discount || -$100 || 5<br />
|}<br />
<br />
<br />
Notes<br />
# Camera base needs one of the sensor front ends<br />
# Sensor front ends have CS-mount thread and come with C/CS-mount adapters. Color sensor front ends come with IR cutoff filter installed. Detailed sensor specs are available for download at [http://www.micron.com/products/imaging/products/megapixel.html Micron] web site. We recommend using the 3&nbsp;MPix sensor front end - SF318M3C<br />
# Cameras are compatible with other standard IEEE802.3af midspan power supplies and powered switches<br />
# Sensors are slightly bigger than 1/2" format (nominal 6.4mm x4.8mm), you may use 1/2" or larger format other CS-mount or C-mount lenses, a large variety is available at [http://www.rmassa.com RMA Electronics Inc]. Most lenses, even "megapixel" do not provide full resolution for the 3MPix sensors with the full open iris, you will have to set it to 4.0-5.6 to get the full sensor resolution<br />
# We offer $100 per camera discount for those who plan to develop software code that will run in Elphel cameras or with them (on a client computer) where the code will be released under [http://www.gnu.org/licenses/gpl.html GNU/GPL] or compatible license. This discount is valid with volume prices too.<br />
# For special applications, not IEEE802.3af compliant.<br />
# We usually have some cameras that we can provide to developers free of charge. If you have an interesting project in mind - try convincing us that it qualifies.<br />
<br />
<br />
----<br />
''Free Software and Open Hardware. Elphel, Inc., 2005''</div>Khluthttps://wiki.elphel.com/index.php?title=Talk:Main_Page&diff=2690Talk:Main Page2006-03-28T08:15:00Z<p>Khlut: Reverted edit of 83.117.80.252, changed back to last version by Khlut</p>
<hr />
<div>Ilya, that seems correct. We should probably remove 10331/332/334, RTC from user docs - it is for debvelopers now. When there will be lens control and USB we will make user documentation for these features.<br />
<br />
User documentattion should probably target needs of a camera _user_ - how to operate it (with ...) How to upgrade software? How to install client software on ... What to do if you see no image, distorted image. Why camera does not respond etc.<br />
<br />
Andrey<br />
----<br />
OK, I will correct the pages you say about.<br />
<br />
Ilya<br />
----<br />
<br />
Roadmap is not for developers only.<br />
It can contain an information about future of the user interface too.<br />
<br />
Sergey<br />
----<br />
<br />
Sure, not only for developers and curious users are welcome to read that section too. I was just suggesting to keep [[User Documentation]] exactly as a prototype for the static pages to be included with the cameras.<br />
<br />
[[User:Andrey.filippov|Andrey.filippov]] 01:58, 24 September 2005 (MDT)<br />
<br />
<br />
----<br />
<br />
Ups, I don't know the delete page procedure. How I can do it?<br />
<br />
Ilya<br />
<br />
----<br />
<br />
Me too - need to read documentation. Or just remove links to it, mark it on top as deleted and leave it there - maybe we will later use it (at list the name).<br />
BTW - there is a "signature" button above the text area field that inserts you login name and timestamp.<br />
--[[User:Andrey.filippov|Andrey.filippov]] 11:50, 24 September 2005 (MDT)<br />
<br />
<br />
----<br />
<br />
I read documentation, but I not find the information about that.<br />
<br />
P.S. Signature test.<br />
<br />
But I'm stupid, I don't understand the applicability, sorry ;)<br />
<br />
OK, I did it ;)<br />
<br />
--[[User:Ilya|Ilya]] 05:39, 4 October 2005 (MDT)</div>Khluthttps://wiki.elphel.com/index.php?title=Current_events&diff=2675Current events2006-03-27T19:02:03Z<p>Khlut: Reverted edit of 201.55.104.165, changed back to last version by Khlut</p>
<hr />
<div>= 2005-10-23 =<br />
<br />
== GenReS plugin for Mozilla v 0.6 released ==<br />
Added support for recording with mencoder. Video splits to files with specifed number of frames.<br />
New feature will be used in HTML video surveillance system.<br />
<br />
= 2005-10-20 =<br />
<br />
ElphelWiki is now hosted at [http://www.siteground.com SiteGround]<br />
<br />
= 2005-10-19 =<br />
<br />
Wiki will be moved to the new location shortly <br />
<br />
= 2005-10-15 =<br />
== GenReS v0.5 Released ==<br />
Bugfix release.<br />
Several issues with tag parameters were fixed. The SRC tag parameter can now be used as an alias for HREF.<br />
[http://sourceforge.net/projects/genres/ GenReS] plugin for Mozilla/Firefox used in our [[HTML Video Surveillance]].<br />
<br />
= 2005-09-24 =<br />
== Live.com was renamed ==<br />
Ross Finlayson informs:<br />
Live.com was renamed to [http://Live555.com Live555.com]<br />
<br />
= 2005-09-23 =<br />
== New Video Surveillance System is written on HTML ==<br />
See [[HTML Video Surveillance]].<br />
== Quick RTSP server ==<br />
Added to old CVS repository<br />
The rtsp server (qrtsp) is written in C and much quicker than old rtsp server which was a shell script.<br />
With new server used with rtp streamers mplayer starts in less than one second.<br />
Program will be added to new branches.<br />
<br />
== GenReS v0.4.1 Released ==<br />
[http://sourceforge.net/projects/genres/ GenReS] plugin for Mozilla/Firefox used in our [[HTML Video Surveillance]].<br />
Fixed bug in the player watchdog.</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2667GenReS2006-03-26T17:33:25Z<p>Khlut: /* Status variables */</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
== Static tag parameters ==<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
<br />
== Dynamic variables (can also be used as the parameters of tags) ==<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
== Status variables ==<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
;FATAL: fatal error message from mplayer;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
== Callback functions ==<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=GenReS&diff=2666GenReS2006-03-26T17:27:42Z<p>Khlut: /* Dynamic variables (can also be used as the parameters of tags) */</p>
<hr />
<div>{{en|ru=GenReS(плагин)|cn=GenReS_cn}}<br />
<br />
== Project Pages ==<br />
*[https://savannah.nongnu.org/projects/genres Development]<br />
*[http://freshmeat.net/projects/genres/ Subscribe for news]<br />
*[http://sourceforge.net/projects/genres/ Mirror]<br />
== Static tag parameters ==<br />
;lowres: decimation for accelerated DCT (0-3);<br />
;width: width of the object window;<br />
;loop: number of iterations of the playback (0 or nothing is infinite);<br />
;fps: frame frequency;<br />
;frameskip : skip n frames after one saved;<br />
<br />
== Dynamic variables (can also be used as the parameters of tags) ==<br />
;href: url of the file or stream;<br />
;src: as yet simply another name for href.<br />
;pause=1 or play=0: to pause player;<br />
;pause=0 or play=1: to continue playback;<br />
;filepos=sec : go to time or percent specifed, maybe not works if mplayer is not support seeking for the current file;<br />
;framestep=anything : show next frame and pause (for step-by-step view);<br />
;run=1: to start player again if it was terminated (by error or end of file);<br />
;run=0: to terminate player;<br />
;save: to run mencoder or ElphelOgm as recorder instead of mplayer;<br />
:;save=ask: to always ask the file name for recording;<br />
:;save=auto: not to ask if user sets it in dialog<br />
<br />
== Status variables ==<br />
This the output from mplayer or mencoder.<br />
Now strings simply are split into two parts on the first of the symbols '=' or ':'.<br />
The left part becomes a name of the variable (gaps and nonlatin letters are removed) and the right part is a value.<br />
;frame: the message from mplayer/mencoder about the last frame;<br />
;error: last error message;<br />
Other variables are possible but they are not used as yet.<br />
;run: special variable, the state of player process: 0 - not running, 1 - running;<br />
;pause, play: it is analogous - the pause state.<br />
<br />
== Callback functions ==<br />
On the arrival of data from a player it is transferred to the object variables and it becomes accessible from javascript.<br />
In this case if it is assigned the function with the corresponding name "on&lt;variable_name&gt;" will be called. <br />
;onrun: will be called on starting and stopping of playing or recording processes;<br />
;onerror: on error message;<br />
;onframe: on each frame playing.<br />
;onmousedown and other standard callbacks: are given already by the browser and do not need extra code inside the plugin.<br />
<br />
== Back-end programs ==<br />
Currently used:<br />
*mplayer (compiled with live555)<br />
*mencoder from mplayer package<br />
*ElphelOgm - for receiving pure multicast or unicast rtp with mjpeg video.<br />
<br />
For ElphelOgm to be used, the mime-type must be <strong>application/x-elphel-ogm</strong> or begin with <strong>video/m</strong> and the URL must be specifed as:<br />
<strong>rtp://ip:port/</strong> ,<br />
where:<br />
;ip -: the stream multicast ip <br />
;port -: the stream multicast port<br />
For a unicast the destination i.e. client ip:port must be specifed<br />
and a stream server must be programmed to continuously send the stream to this address and port.<br />
Dynamic changing of the URL is not yet supported for RTP. Instead use the sequence: <code>obj.run=0; obj.src=...; obj.run=1;</code><br />
<br />
== Trouble shooting ==<br />
Run the script <strong>mplayer.pl</strong> from a command line. It is located in /usr/lib/genres.<br />
If all necessary perl modules are installed, it must print several strings in the form: "variable=value" and wait input.<br />
If you see message "Can't locate Gtk2.pm in @INC" this mean that need to install this module from your distro or from [http://cpan.org CPAN].<br />
Other links: [http://gtk2-perl.sourceforge.net/ gtk2-perl home page], [http://cpan.org/modules/by-category/08_User_Interfaces/Gtk2/ gtk2-perl on CPAN], [http://freshmeat.net/projects/gtk2-perl/ gtk2-perl on freshmeat].<br />
<br />
Enter parameters as they presented in the html tag, but by one in line and add run=1 at the end. For example:<br />
type=video/mjpeg<br />
url=rtp://232.168.0.9:20000/<br />
run=1<br />
If MPlayer is running then this part works, try to see example html page in the browser (mozilla or firefox).<br />
If you don't see video in the browser, but instead see a gray rectangle, maybe the page has wrong url.<br />
<br />
See the list of installed plugins with url: <strong>about:plugins</strong> and if there is no GenReS, maybe genres.so is in a wrong place.<br />
<br />
The plugin produce debug output. Start mozilla or firefox with redirection to a file:<br />
mozilla -debug >& moz.log<br />
For firefox <strong>-debug</strong> is not need.<br />
Gzip and send this file to me to research.<br />
<br />
--[[User:Khlut|Sergey Khlutchin]] 01:55, 8 February 2006 (CST)</div>Khluthttps://wiki.elphel.com/index.php?title=Talk:Main_Page&diff=2663Talk:Main Page2006-03-25T16:35:39Z<p>Khlut: Reverted edit of 213.255.252.7, changed back to last version by Khlut</p>
<hr />
<div>Ilya, that seems correct. We should probably remove 10331/332/334, RTC from user docs - it is for debvelopers now. When there will be lens control and USB we will make user documentation for these features.<br />
<br />
User documentattion should probably target needs of a camera _user_ - how to operate it (with ...) How to upgrade software? How to install client software on ... What to do if you see no image, distorted image. Why camera does not respond etc.<br />
<br />
Andrey<br />
----<br />
OK, I will correct the pages you say about.<br />
<br />
Ilya<br />
----<br />
<br />
Roadmap is not for developers only.<br />
It can contain an information about future of the user interface too.<br />
<br />
Sergey<br />
----<br />
<br />
Sure, not only for developers and curious users are welcome to read that section too. I was just suggesting to keep [[User Documentation]] exactly as a prototype for the static pages to be included with the cameras.<br />
<br />
[[User:Andrey.filippov|Andrey.filippov]] 01:58, 24 September 2005 (MDT)<br />
<br />
<br />
----<br />
<br />
Ups, I don't know the delete page procedure. How I can do it?<br />
<br />
Ilya<br />
<br />
----<br />
<br />
Me too - need to read documentation. Or just remove links to it, mark it on top as deleted and leave it there - maybe we will later use it (at list the name).<br />
BTW - there is a "signature" button above the text area field that inserts you login name and timestamp.<br />
--[[User:Andrey.filippov|Andrey.filippov]] 11:50, 24 September 2005 (MDT)<br />
<br />
<br />
----<br />
<br />
I read documentation, but I not find the information about that.<br />
<br />
P.S. Signature test.<br />
<br />
But I'm stupid, I don't understand the applicability, sorry ;)<br />
<br />
OK, I did it ;)<br />
<br />
--[[User:Ilya|Ilya]] 05:39, 4 October 2005 (MDT)</div>Khlut