2011년 12월 29일 목요일

how to install ffmpeg to share screen capturing and recording ?

Firstly, if you want to use sharing screen, you need to install Open JDK(for Linux) or JRE(for Windows) to run Java File like ***.jnlp.

2. If you want to use recording function on OpenMeetings, you should install ffmpeg manually.
This is manual how to install ffmpeg;


http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289


Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04 LTS

Install the Dependencies
1. Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following (you can usually paste into a terminal with shift+ctrl+v). Copy and paste the whole code box for each step.
Code:
sudo apt-get remove ffmpeg x264 libx264-dev yasm
2. Get all of the packages you will need to install FFmpeg and x264 (you may need to enable the universe and multiverse repositories):
Code:
sudo apt-get update
sudo apt-get install build-essential git-core checkinstall texi2html libfaac-dev \
    libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \
    libvorbis-dev libx11-dev libxfixes-dev zlib1g-dev

Install Yasm
3. Yasm is required for x264:
Code:
cd
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure
make
sudo checkinstall --pkgname=yasm --pkgversion="1.2.0" --backup=no --deldoc=yes --default

Install x264
4. Get the current source files, compile, and install. (See using snapshots if you are having connection issues with the Git server.)
Code:
cd
git clone git://git.videolan.org/x264
cd x264
./configure --enable-static
make
sudo checkinstall --pkgname=x264 --default --pkgversion="3:$(./version.sh | \
    awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes

Install LAME
5. This is used to encode mp3 audio.
Code:
sudo apt-get remove libmp3lame-dev
sudo apt-get install nasm
cd
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz
tar xzvf lame-3.99.tar.gz
cd lame-3.99
./configure --enable-nasm --disable-shared
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.99" --backup=no --default \
    --deldoc=yes

Install libvpx
6. This is used to encode VP8 video.
Code:
cd
git clone http://git.chromium.org/webm/libvpx.git
cd libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \
    --default --deldoc=yes

Install FFmpeg
7. Get the most current source files, compile, and install. Run "./configure --help" to see what other features you can enable/disable. Nightly FFmpeg snapshots are also available.
Code:
cd
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
    --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx \
    --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \
    --deldoc=yes --default
hash x264 ffmpeg ffplay ffprobe
Installation is now complete. You can stop here if all you wanted to do is compile and install FFmpeg. The rest of the guide has additional information on updating and removing the packages you just compiled.

Install qt-faststart (optional)
This is a useful tool included with FFmpeg that rearranges a file with H.264 video, "such that the moov atom is in front of the data, thus facilitating network streaming". Basically, it allows web movies to start playing before they are completely downloaded. Usage: qt-faststart input.foo output.foo.
Code:
cd ~/ffmpeg
make tools/qt-faststart
sudo checkinstall --pkgname=qt-faststart --pkgversion="$(./version.sh)" --backup=no \
    --deldoc=yes --default install -Dm755 tools/qt-faststart /usr/local/bin/qt-faststart

Updating FFmpeg and x264
Development of FFmpeg and x264 is active and an occasional update can give you new features and bug fixes. To update FFmpeg and x264 you will need to remove the packages, make distclean, update the source, recompile, and install. To update x264:
Code:
sudo apt-get remove ffmpeg x264 libx264-dev libvpx
cd ~/x264
make distclean
git pull
Now compile x264 as shown earlier in the guide starting with the x264 ./configure line. You can update libvpx if you installed that too:
Code:
cd ~/libvpx
make clean
git pull
Now continue with the installation starting with the libvpx ./configure line. Now update FFmpeg:
Code:
cd ~/ffmpeg
make distclean
git pull
Finish the installation starting with the FFmpeg ./configure line.


Reverting Changes Made by This Guide
To remove FFmpeg/x264 and other packages added for this guide:
Code:
sudo apt-get remove x264 ffmpeg qt-faststart build-essential git-core checkinstall \
    nasm yasm texi2html libfaac-dev lame-ffmpeg libsdl1.2-dev libtheora-dev libvorbis-dev \
    libx11-dev libxfixes-dev zlib1g-dev
Lastly, delete the ffmpegx264lame, and libvpx directories in your home folder.

2011년 12월 14일 수요일

how to install Openmeetings on Ubuntu

1. Download files of Openmeetings.
http://code.google.com/p/openmeetings/wiki/InstallationOpenMeetings

2. To install Java, you need to edit /etc/apt/source.list file

remove the # sign in those lines,
#deb http://archive.ubuntu.com/ubuntu/ lucid main partner
#deb-src http://archive.ubuntu.com/ubuntu/ lucid main partner

We need to do it following commands;

#sudo apt-get reinstall python
       - when add-apt-repository is not working.


Install Open Office Service on Debian/(K)Ubuntu (versions > 2.3)

  1. Install OpenOffice-Headless as root (through su, sudo, etc.):
  2. sudo apt-get install openoffice.org-headless
  3. Create and edit a file named openoffice.sh (for example) with you favorite editor over /etc/init.d:
  4. vi /etc/init.d/openoffice.sh
    #!/bin/bash
    # openoffice.org  headless server script
    #
    # chkconfig: 2345 80 30
    # description: headless openoffice server script
    # processname: openoffice
    # 
    # Author: Vic Vijayakumar
    # Modified by Federico Ch. Tomasczik
    #
    OOo_HOME=/usr/bin
    SOFFICE_PATH=$OOo_HOME/soffice
    PIDFILE=/var/run/openoffice-server.pid
    set -e
    case "$1" in
        start)
        if [ -f $PIDFILE ]; then
          echo "OpenOffice headless server has already started."
          sleep 5
          exit
        fi
          echo "Starting OpenOffice headless server"
          $SOFFICE_PATH -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
          touch $PIDFILE
        ;;
        stop)
        if [ -f $PIDFILE ]; then
          echo "Stopping OpenOffice headless server."
          killall -9 soffice && killall -9 soffice.bin
          rm -f $PIDFILE
          exit
        fi
          echo "Openoffice headless server is not running."
          exit
        ;;
        *)
        echo "Usage: $0 {start|stop}"
        exit 1
    esac
    exit 0
  5. Change the permssions to this file:
  6. chmod 0755 /etc/init.d/openoffice.sh
  7. Install openoffice.sh init script links:
  8. update-rc.d openoffice.sh defaults
  9. Start the service:
  10. /etc/init.d/./openoffice.sh start
  11. You can see if openofice is running with this command:
  12. netstat -nap | grep office



 UbuntuLucidLTS 
Updated Aug 28, 2011 by shouldbe...@gmail.com
#Installation of openmeetings on Ubuntu 10.04.

Introduction

Details

Edit the sources to include partner so that the sun-jre will install
sudo apt-get install sun-java6-bin sun-java6-jdk sun-java6-jre sun-java6-fonts mysql-server imagemagick gs-gpl libt1-5 zip unzip subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev libogg-dev sox libvorbis-dev libgsm1 libgsm1-dev libfaad2 flvtool2 lame gcc-multilib autoconf automake1.9 libtool ffmpeg automake
and now the openoffice bits
sudo apt-get install openoffice.org-writer openoffice.org-calc openoffice.org-impress openoffice.org-draw openoffice.org-math openoffice.org-gcj openoffice.org-filter-binfilter openoffice.org-java-common
now the prerequisites for swftools http://www.swftools.org need to be installed
Starting with freetype, get the latest from here http://download.savannah.gnu.org/releases/freetype/
mkdir freetype
cd freetype
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.5.tar.gz
tar -zxvf freetype-2.4.5.tar.gz
cd freetype-2.4.5
./configure
make
sudo make install
now jpeglib
sudo apt-get install libjpeg-progs libjpeg62 libjpeg62-dev  
and some more
sudo apt-get install libgif-dev libgif4 
now we can progress with swftools
get the latest from here http://www.swftools.org/download.html
mkdir swftools
cd swftools
wget http://www.swftools.org/swftools-2011-01-23-1815.tar.gz
tar -zxvf swftools-2011-01-23-1815.tar.gz
cd swftools-2011-01-23-1815
because of some missing items from later versions of libjpeg, xpdf needs to be put into the build
get the latest from ftp://ftp.foolabs.com/pub/xpdf/
cd ./lib/pdf
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.03.tar.gz
now we can get on with the build
cd ../..
./configure
make
sudo make install
With all pre-reqs now installed, we can get on with openmeetings, get the latest version fromhttp://code.google.com/p/openmeetings/downloads/list
mkdir openmeetings
cd openmeetings
wget http://openmeetings.googlecode.com/files/openmeetings_1_7_0_r3822.zip
sudo mkdir /opt/red5
sudo cp openmeetings_1_7_0_r3822.zip /opt/red5
cd /opt/red5
sudo unzip openmeetings_1_7_0_r3822.zip
sudo rm openmeetings_1_7_0_r3822.zip
now make the scripts executable and change the ownership.
sudo chmod +x /opt/red5/*.sh
sudo chmod +x /opt/red5/webapps/openmeetings/jod/*.sh
sudo chown -R nobody\: /opt/red5
now you need to create a red5 startup script
sudo nano /etc/init.d/red5
#! /bin/sh
#
# red5 red5 initscript
#
# Author: Simon Eisenmann .
#
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="Red5 flash streaming server"
NAME=red5
RED5_HOME=/opt/red5
DAEMON=$RED5_HOME/$NAME.sh
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
# Read config file if it is present.
if [ -r /etc/default/$NAME ]
then
            . /etc/default/$NAMEfi
#
# Function that starts the daemon/service.
#
d_start() {
            start-stop-daemon --start -c nobody --pidfile $PIDFILE --chdir $RED5_HOME --background --make-pidfile --exec $DAEMON}
#
# Function that stops the daemon/service.
#
d_stop() {
            start-stop-daemon --stop --quiet --pidfile $PIDFILE --name java
            rm -f $PIDFILE}
case "$1" in
            start)
   echo -n "Starting $DESC: $NAME"
   d_start
   echo "."
            ;;
            stop)
   echo -n "Stopping $DESC: $NAME"
            d_stop
   echo "."
            ;;

            restart|force-reload)
   echo -n "Restarting $DESC: $NAME"
   d_stop
   sleep 1
   d_start
   echo "."
            ;;

            *)
   echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
   exit 1
            ;;
esac
exit 0
exit 0
now make it executable and set to autostart
sudo chmod +x /etc/init.d/red5
sudo update-rc.d red5 defaults
the database needs to be configured
echo "CREATE USER openmeetings@localhost;" | mysql -u root -p
echo "CREATE DATABASE openmeetings DEFAULT CHARACTER SET 'utf8';" | mysql -u root -p
echo "GRANT ALL PRIVILEGES ON openmeetings.* TO 'openmeetings'@'localhost' IDENTIFIED BY '<password>' WITH GRANT OPTION;" | mysql -u root -p
echo "FLUSH PRIVILEGES;" | mysql -u root -p


There is a MySQL sample config: mysql_persistance.xml that ships with every release of OpenMeetings.

Before you start

  • Make sure that you have set utf8 as default/server-character-set in your MySQL configuration (my.cnf) before you start the installation process of OpenMeetings!
  • make sure MySQL is listening on TCP/IP connections!
To verify if MySQL connection is working: OpenMeetings will automatically create all tables in the database and all tables should have utf8 as encoding/collation!
  • If you encounter issues, you can drop the db again and delete the file $red5/webapps/openmeetings/conf/install.xml and then run the web based installer again

Steps todo

  1. Rename $red5/webapps/openmeetings/WEB-INF/classes/META-INF/mysql_persistence.xml to $red5/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml
  2. Prepare Database Settings - go to openmeetings_version_no_xx/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml
  3. MySQL-Database-Users: Alter following config values in persistance.xml $DB_HOST $USER_NAME $USER_PASS with your values
    <property name="openjpa.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver, Url=jdbc:mysql://$DB_HOST:3306/openmeetings?autoReconnect=true&amp;useUnicode=true&amp;createDatabaseIfNotExist=true&amp;characterEncoding=utf-8&amp;connectionCollation=utf8_general_ci&amp;cachePrepStmts=true&amp;cacheCallableStatements=true&amp;cacheServerConfiguration=true&amp;useLocalSessionState=true&amp;elideSetAutoCommits=true&amp;alwaysSendSetIsolation=false&amp;enableQueryTimeouts=false&amp;prepStmtCacheSize=3000&amp;prepStmtCacheSqlLimit=1000, MaxActive=100, MaxWait=10000, TestOnBorrow=true,  poolPreparedStatements=true,  Username=$USER_NAME, Password=$USER_PASS"/>
            
  4. Run red5-service and goto the web-based installer: http://localhost:5080/openmeetings/install
where
<password>
is the password that you used when configuring MySQL
Go to a browser and go to http://f.q.d.n:5080/openmeetings/install to complete the install
After install sun-java6-jdk, we need to select another java with following command;
sudo update-alternatives --config java