Friday, December 19, 2008

conversion avi to 3gp from ffmpeg

ffmpeg is an excellent application on video conversion. It supports most of the file formats.
ffmpeg [[infile options][-i infile]]… {[outfile options] outfile}…
Convert from MPG to 3GPffmpeg -i video_clip.mpg -s qcif -vcodec h263 -acodec mp3 -ac 1 -ar 8000 -ab 32 -y clip.3gp
ffmpeg -i inputfile.mpg -s qcif -vcodec h263 -acodec aac -ac 1 -ar 8000 -r 25 -ab 32 -y outputfile.3gp
Convert from AVI to 3GPffmpeg -i video_clip.avi-s qcif -vcodec h263 -acodec mp3 -ac 1 -ar 8000 -r 25 -ab 32 -y clip.3gp
ffmpeg -i inputfile.avi -s qcif -vcodec h263 -acodec aac -ac 1 -ar 8000 -r 25 -ab 32 -y outputfile.3gp
Convert from 3GP to AVIffmpeg -i clip.3gp -f avi -vcodec xvid -acodec mp3 -ar 22050 file.avi
you need to install the codecs previously. All the xvid,mp3,avi,3gp codecs can be updated very easily in the debian based distros. All other disros also having the codecs in their own repositories.
There are other media conversion utilities also there as mencoder,transcode and there are a lot of GUI tools for this like drip, k9copy etc.

Monday, December 8, 2008

Fck Editor embed in tpl style architechture

It is very easy to use FCKeditor in your PHP web pages. All theintegration files are available in the official distributed package.Just follow these steps.Step 1Suppose that the editor is installed in the /FCKeditor/ path of yourweb site.

The first thing to do is to include the "PHP IntegrationModule" file in the top of your page, just like this:include("FCKeditor/fckeditor.php");?>
Step 2

Now the FCKeditor is available and ready to use. So, just insert thefollowing code in your page to create an instance of the editor(usually inside a FORM):
$oFCKeditor = new FCKeditor('FCKeditor1');
$oFCKeditor->BasePath = '/FCKeditor/';
$oFCKeditor->Value = 'Default text in editor';
$oFCKeditor->Create();
?>
"FCKeditor1" is the name used to post the editor data on forms.
Step 3
The editor is now ready to be used. Just open the page in your browserto see it at work.The complete sampleinclude("FCKeditor/fckeditor.php") ;?>

$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '/FCKeditor/';$oFCKeditor->Value = 'Default text in editor';
$oFCKeditor->Create() ;?>

Handling the posted dataThe editor instance just created will behave like a normal field in a form. It will use the name you've used when creating it (inthe above sample, "FCKeditor1").So, to retrieve its value you can do something like this:

$sValue = stripslashes( $_POST['FCKeditor1'] ) ;

SamplesYou can find some samples on how to use the editor in the "_samples/php" directory of the distributed package.Other infoIf you want to retrieve the resulting HTML instead of outputting itdirectly to the browser (for example if you're using it in a templateengine such as Smarty), you can call the "CreateHtml" method instead:

$output = $oFCKeditor->CreateHtml() ;*