If you want to convert other video format to FLV (sorenson codec), everybody will suggest using FFmpeg. In fact, only FFmpeg is not enough for successfully create a server-side command line conversion environment to create FLV with video and audio, plus the FLV 1.1 metadata information. I have stroked for a whole day to setup my Linux server (Fedora Core 3), so I wrote down my note here for other people and myself as a reference.
Purely install FFmpeg is not enough, the FLV converted has no audio, because FLV audio codec is mp3, so you need LAME support. Moreover, the FLV converted has no metadata, you cannot know the dimension, duration such important information for a FLV player swf. Therefore, you need another free tool: FLVTool2, which is written in Ruby, so I have to install Ruby in my server, too.
Overall installation order: LAME->FFmpeg->Ruby->FLVTool2, if you want to access video info through FFmpeg in php, you can install ffmpeg-php, too.
Please login as root first:
Install LAME
Download from LAME site, type the following command to compile and install it:
./configure --enable-shared --prefix=/usr
make
make install
enable-shared to make sure FFmpeg can use LAME later. Type lame in command line to see help after install succeed.
Note: you can also use yum to install FFmpeg, it will install dependency LAME, too, so you can skip this step.
yum install ffmpeg
Install FFmpeg
Download from FFmpeg site through CVS, type the following command to get the latest copies from CVS and save to your $home (currenly path after login into consule) with folder name “ffmpeg”:cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
To compile and install it, type the following command:
./configure --enable-gpl --enable-mp3lame --enable-shared --prefix=/usr
make clean && make
make install
enable-shared to make sure ffmpeg-php can use FFmpeg later (if you do not use ffmpeg-php, you do not need –enable-shared –prefix=/usr). Type ffmpeg in command line to see help after install succeed.
Note: you can also use yum to install FFmpeg:
yum install ffmpeg
Install Ruby
Download from Ruby site, type the following command to compile and install it:
./configure
make
make install
Install FLVTool2
Download from FLVTool2 site, type the following command to compile and install it:
ruby setup.rb config
ruby setup.rb setup
sudo ruby setup.rb install
Type flvtool2 in command line to see help after install succeed.
Installation is completed here. If you want to access video infomation easily in php, there is a ffmpeg-php you can try. You can follow the instruction inside the package to install it. I installed it as a Shared Extension and did not edit php.ini to add extension=ffmpeg.so
When I try its test_ffmpeg.php to verfiy the installation. I saw an error:Unable to load dynamic library './ffmpeg.so' - ./ffmpeg.so: cannot open shared object file: No such file or directory
You have to copy ffmpeg.so to your php extension folder, or like me, I just copy the file to the same folder of the php script is located.
Follow up
Other Reference
- FFMpeg compiled Windows exe
- Video and Audio Streaming with Flash and Open Source Tools
- libflv – creating FLV video streams
- FLV2MP3 (Make FlashCom recorded FLV conversion possible ?!)
- Flash 视频(FLV)编码,转换,录制,播放方案一网打尽
- 幾套各種影片轉FLV影音檔工具
- How To: Convert audio to another format on a web page (with installation guide, php code sample)
Hey Kay-Rules, thanks for the info! It helped me as I too was having Kim’s problem.
Thanks again.
Did anyone reply to bobpang425?
I need answer for the same question
Thanks for the step by step guide.
Like others even I am having the audio problem. ffmpeg converts my video files to flv but without sound. I also tried to install with ./congifure –enable-libmp3lame but no success.
Does any one have a solution for this.
Cheers,
Sudar
Nice one mate. I only used the section to get ffmpeg working for flv and sound! And it worked a treat. Big thank you!
Can somebody help me to convert m$ wmv with J-type picture? How can I do it with good quality? Thanks.
i installed cvs from this location…….. http://home.wanadoo.nl/cwdegier/cvs.html
i create username and passwd as,
[root@ksangam /]# htpasswd -d /home/cvsroot/passwd henk
New password:(henk)
Re-type new password:(henk)
Updating password for user henk
[root@ksangam /]# cvs login
[root@ksangam /]# export CVSROOT=:pserver:henk@ksangam:/home/cvsroot
[root@ksangam /]# cvs login
Logging in to :pserver:henk@ksangam:2401/home/cvsroot
CVS password:(henk)
Fatal error, aborting.
henk: no such user….
its giving error, what to do? plz
i try converting files to FLv , few files get converted and few do not, what can be the problem?
Thank you for your site. I have found here much useful information…g
Finally I found a site where everything is explained in a way that I can understand.
Thanks!
I cann’t agree totally, i am engaing in exactly the server-side command line conversion to creat FLV with video, and audio.
However, i didn’t directly go to FFmpeg, i’ve tried and tested several versions, command line, desktop applications, or SDK,finding a SDK works excellently. It is called Flash Video MX SDK V2, which indeed works for me quite well.
Not only this but thumbnail picture grabbing, video trimming, cropping, and batch conversion are all available
Well, i trust it will give you a pleasant impression. Anyway, try and see:
http://www.flvsoft.com/flv_encoder_sdk/
================
If you want to convert other video format to FLV (sorenson codec), everybody will suggest using FFmpeg. In fact, only FFmpeg is not enough for successfully create a server-side command line conversion environment to create FLV with video and audio, plus the FLV 1.1 metadata information. I have stroked for a whole day to setup my Linux server (Fedora Core 3), so I wrote down my note here for other people and myself as a reference
To Mandar
this flv to video converter may help you, and convert video to swf is also possible with it.
flash video mx pro
http://www.flash-video-mx.com
I have created wmv file from bitmaps using ffmpeg,but i could not have to control duration of the created wmv,I want to control it,but i have no idea,please help me..
in order to include sound in the flv on linux
use the option -acodec libmp3lame -ar 22050
(libmp3lame must also be enabled at compilation of ffmpeg)
I want to upload an audio by splitting it into two parts, I mean to say that the output audio file must be of less duration compared to orginal one.
Nothing works. From step one, all I get is ‘command not found’.
What could I be doing wrong. Especially if Im typing everything directly as written in tutorial.
Help is very important.
question on how to add 3gp/3gp2/mp4 to convert to flv. any ideas on how to configure properly?
thanks
Great Site! I really love VCasmo.
Email me, I might have another opportunity for if you are interested.
Great description!
Is it possible to install the converter on a windows server?
i am using ffmpeg.exe tool to convert any video file format to .flv file it is working in localhost correctly but it is not working
in the server…..
any one help me…
Cool!.. Nice work…i
Hi. I followed all the steps above and tried to execute ffmpeg, ffserver.
But, I got error message for
ffmpeg –>
ffmpeg : error while loading shared libraries : libavdevice.so.52: cannot open shared object file : no such file or directory
ffserver –>
ffserver : error while loading shared libraries : libavformat.so.52: cannot open shared object file : no such file or directory
Thanks.
Why you don’t try fflib.net? See http://www.intuitive.sk/fflib/ 🙂
I know a Server-side FLV conversion for Linux,
If you want a try, here:
http://www.flash-video-soft.com/flash-video-sdk/
Cheers
Whenever I try to burn a music CD on iTunes it makes this odd clicking sound and doesn’t end up burning the CD.
I tried using the regular drag and drop onto the DVDRW burning folder itself and it still makes this odd clicking noise.
I’m using esperanza DVD and they worked fine when I first got them then all of a sudden it’s doing this.
I’ve tried another brand of disk (noname) and it’s still making the same noise…
Any advice anyone?
_________________
Best fapturbo
If you have yum, then try to install the libraries “libavdevice”
yum install libavdevice.so