Golfreeze.packetlove.com: Life style of Golfreeze Canon400D Family kammtan.com Jazz Freebsd Unix Linux System Admin guitar Music
All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server => all application on unix knowledges by golfreeze => Topic started by: golfreeze on มกราคม 24, 2011, 12:00:20 pm
-
Packetlove.com
==== Web Hosting support ffmpeg ====
เริ่มต้น ก็
#tar zxf video_packetlove.tar.gz
#cd cgi-bin
#mv * ../cgi-bin
#แก้ไข cgi-bin/configs/uu_default_config.pm ไฟล์ที่เป็น config รอง
#vi uu_default_config.pm
#แก้ไข file config หลักที่ใช้แสดง ไฟล์ video ใน
#vi include/config.php
#แก้ไข file ที่ติดต่อ db
#vi include/dbconfig.php
ทำการ chown ให้ถูกต้อง
ทำการ chmod 777 กับ folder
video
flvideo
chimg
tmp
thumb
templates
templates_c
photo
images
เรียบร้อย วิธีลง ffmpeg สไตล์ golfreeze@packetlove.com
-
ถ้าไฟล์ ที่อัฟแล้ว ทำการ loading....
ค้างไป เป็นเพราะ ว่า ตัว convert.php ใช้ command อีกตัวครับ
แก้เป็น
exec("$config[metainject] -Uv $config[flvdodir]/".$vid."x.flv
$config[flvdodir]/".$vid.".flv");
-----------------------------------------------------
#webcam chat ท่าน ซอล
http://www.camchat.in.th/chat.php
-
วิธี ลง เครื่อง ffmpeq ครับ
Installing FFMPEG
howto for installing.
List to be installed:
* FFmpeg (http://ffmpeg.mplayerhq.hu (http://ffmpeg.mplayerhq.hu))
* FFmpeg-PHP (http://ffmpeg-php.sourceforge.net (http://ffmpeg-php.sourceforge.net))
* Mplayer + Mencoder (mencoder is now built into the mplayer svn release )
(http://www.mplayerhq.hu/design7/dload.html (http://www.mplayerhq.hu/design7/dload.html))
* flv2tool ****REQUIRES RUBY ON RAILS**** (http://inlet-media.de/flvtool2 (http://inlet-media.de/flvtool2))
* LAME MP3 Encoder (http://lame.sourceforge.net (http://lame.sourceforge.net))
* Libogg + Libvorbis (http://www.xiph.org/downloads (http://www.xiph.org/downloads))
Login to your server as root, then:
# cd /usr/local/src
Download the sources to your server:
#wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2 (http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2)
#wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz (http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz)
#wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz (http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz)
#wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2 (http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2)
#wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz (http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz)
#wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz (http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz)
Extract all sources:
# tar -xzf flvtool2_1.0.5_rc6.tgz
# tar -xzf lame-3.97.tar.gz
# tar -xzf libogg-1.1.3.tar.gz
# tar -xzf libvorbis-1.1.2.tar.gz
# tar -xjf essential-20061022.tar.bz2
# tar -xjf ffmpeg-php-0.5.0.tbz2
Create new directory:
# mkdir /usr/local/lib/codecs/
We need to install SVN and Ruby On Rails:
# up2date -i subversion
# up2date -i ruby
# svn checkoutsvn://svn.mplayerhq.hu/ffmpeg/trunkffmpeg
# svn checkoutsvn://svn.mplayerhq.hu/mplayer/trunkmplayer
# cd /usr/local/src/mplayer
# svn update
Copy Codecs for MPlayer:
# mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
# chmod -R 755 /usr/local/lib/codecs/
Secure folder TMP:
# mkdir /usr/local/src/tmp
# chmod 777 /usr/local/src/tmp
# export TMPDIR=/usr/local/src/tmp
Lame:
# cd /usr/local/src/lame-3.97
# ./configure
# make && make install
LibOgg:
# cd /usr/local/src/libogg-1.1.3
# ./configure && make && make install
LibVorbis:
# cd /usr/local/src/libvorbis-1.1.2
# ./configure && make && make install
FlvTool2:
# cd /usr/local/src/flvtool2_1.0.5_rc6/
# ruby setup.rb config
# ruby setup.rb setup
# ruby setup.rb install
MPlayer:
# cd /usr/local/src/mplayer
# ./configure && make && make install
FFMpeg:
# cd /usr/local/src/ffmpeg/
# ./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared
# echo ‘#define HAVE_LRINTF 1 ‘>>config.h
# make
# make install
# ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
# ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
# ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
# ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
# ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
# cd /usr/local/src/
FFMpeg-PHP:
# cd /usr/local/src/ffmpeg-php-0.5.0/
# phpize
# ./configure
# make
# make install
Notice: Make sure this is the correct php.ini for the box!!
# echo ‘extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so’ >>
/usr/local/Zend/etc/php.ini
# service httpd restart
Done!
======
http://ffmpeg-php.sourceforge.net/ (http://ffmpeg-php.sourceforge.net/)
svn cohttps://svn.sourceforge.net/svnroot/ffmpeg-php/trunk/ffmpeg-php
Change to the ffmpeg-php extension directory and run phpize (included with your PHP installation) to
build configuration files.
1. cd ffmpeg-php
2. phpize
Configure and build the extension.
1. ./configure && make
Install the shared extension.
1. make install (as root)
If everything went as planned, ffmpeg-php is now installed as a shared extension
===============================================================================
OR
===============================================================================.
A few people have asked for this to be done so heres a howto for installing:
FFmpeg
FFmpeg-PHP
Mplayer + Mencoder (mencoder is now built into the mplayer svn release )
flv2tool ****REQUIRES RUBY ON RAILS****
LAME MP3 Encoder
Libogg
Libvorbis
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++
CODE
cd /usr/local/src
GET CRAP:
wgethttp://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2( UPDATED 20070308
)
wgethttp://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
wgethttp://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wgethttp://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2
wgethttp://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wgethttp://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
EXTRACT THE CRAP:
tar zxvf flvtool2_1.0.5_rc6.tgz
tar zxvf lame-3.97.tar.gz
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz
tar zxvf flvtool2_1.0.5_rc6.tgz
tar jxvf essential-20061022.tar.bz2 ( UPDATED 20070308 )
tar jxvf ffmpeg-php-0.5.0.tbz2
WE NEED A DIR MADE:
mkdir /usr/local/lib/codecs/
WE NEED TO INSTALL SVN + ROR:
up2date -i subversion
up2date -i ruby
up2date -i ncurses-devel
svn checkoutsvn://svn.mplayerhq.hu/ffmpeg/trunkffmpeg
svn checkoutsvn://svn.mplayerhq.hu/mplayer/trunkmplayer
cd /usr/local/src/mplayer
svn update
cd /usr/local/src
COPY CODECS FOR MPLAYER:
mv /usr/local/src/essential-20060611/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
SECURE TMP IS A PAIN AT TIMES Wink
mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp
LAME:
cd /usr/local/src/lame-3.97
./configure
make && make install
cd /usr/local/src/
LIBOGG:
cd /usr/local/src/libogg-1.1.3
./configure && make && make install
cd /usr/local/src/
LIBVORBIS:
cd /usr/local/src/libvorbis-1.1.2
./configure && make && make install
cd /usr/local/src/
FLVTOOL2:
cd /usr/local/src/flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
cd /usr/local/src/
cd /usr/local/src/mplayer
./configure && make && make install
cd /usr/local/src/
FFMPEG:
cd /usr/local/src/ffmpeg/
./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared
######### IGNORE THIS ECHO LINE The dev's fixed the issue in svn. Im only leaveing it here in
case it comes up again ###############
echo '#define HAVE_LRINTF 1 '>>config.h
################################################################################
##############################
make
make install
ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51
cd /usr/local/src/
FFMPEG-PHP:
cd /usr/local/src/ffmpeg-php-0.5.0/
phpize
./configure
make
make install
NOTICE: Make sure this is the correct php.ini for the box!!
echo 'extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so' >>
/usr/local/Zend/etc/php.ini
NOTICE: Make sure this is the correct php.ini for the box!!
service httpd restart
=================
=================
open egress svn port 3090 :
iptables -t filter -I OUTPUT -p tcp --dport 3090 -j ACCEPT
---------------------------------=
=====================
OGG not found while configuring libvorbis-1.1.2
yum install vorbis-tools
=========================================
./configure libogg-1.1.3 : c++ complier error
yum install gcc-c++
========================================
./configure lame-3.97 c complier error
yum install gcc
linuxengineers2 says:
phpize not found while Compile FFMPEG-PHP
To check Php-devel for phpize command
rpm -q php-devel
rpm -ql php-devel | grep phpize
You'll have to make sure the at least the following packages are installed:
automake
autoconf
make
gcc
libtool
-
### หลังจากทำการ อัฟไฟล์ แล้วที่
http://video.kammatan.com
ให้ทำการ copy file ใน folder "video" ไปที่ "flvideo" ด้วย
แก้ไข โดยการทำ soft link โดย
#ln -s video flvideo
#chmod 777 flvideo
;)