installing ffmpeg , flvtool2 , mencoder ,ffmpeg-php is very easy now , you can follow these commands given below to complete ffmpeg setip in minutes and with minimal effort ok to get started startup “putty” and ssh your login data then step by step enter each comman given below :
(my server environment is centos 5.xxxx with access to ssh and putty console only )
cd /usr/src/
wget http://mirror.ffmpeginstaller.com/old/scripts/ffmpeg3/ffmpeginstall.3.2.1.tar.gz
tar -xzvf ffmpeginstall.3.2.1.tar.gz
cd ffmpeginstall.3.2.1
./install.sh (here it will ask you to enter your php.ini file location adress checkout the data provided by console and type as it is )
after these steps restart the server , and then to verify the installation RUN
php -m | grep ffmpeg
ls -lah /usr/local/cpffmpeg/bin/
thats it !
enjoy HD streaming !!
few days back i coded a small script to show stock ups and downs ticker , script fetches data from yahoo finance and scrolls the ticker , you can use this script on on Joomla (tested on joomla 1.5) and all versions of wordpress .
How to use the script
<marquee id=”m1″ onmouseover=”this.stop();” onmouseout=”this.start();” truespeed=”" scrollamount=”2.4″ scrolldelay=”50″ direction=”left” loop=”repeat” width=”70%”>
<?phpfunction getStockSite($stockLink){
if ($fp = fopen($stockLink, ‘r’)) {
$content = ”;while ($line = fread($fp, 1024)) {
$content .= $line;
}
}return $content;
}function processStockSite($wurl){
$wrss = getStockSite($wurl);
$name = ‘-’;
$price = ”;
$diff = ”;if (strlen($wrss)>100){
$spos = 0;// Get text
$spos = strpos($wrss,’</span>:’,$spos)+3;
$spos = strpos($wrss,’<big>’,$spos);
$epos = strpos($wrss,’</div><h1>’,$spos);
if ($epos>$spos){
$text = substr($wrss,$spos,$epos-$spos);
} else {
$text = ‘-’;
}$spos = $epos + 10;
// Get company name
$epos = strpos($wrss,’<’,$spos);
if ($epos>$spos){
$name = substr($wrss,$spos,$epos-$spos);
}
// Get actual price
$spos = strpos($wrss,’yfs_l10′)+strlen(’yfs_l10′);
$spos = strpos($wrss,’>’,$spos)+1;
$epos = strpos($wrss,’<’,$spos);
if ($epos>$spos){
$price = substr($wrss,$spos,$epos-$spos);
} else {
$price = ‘-’;
}// Get direction
$spos = strpos($wrss,’alt’,$epos)+strlen(’alt’)+2;
$epos = strpos($wrss,’”‘,$spos);
if ($epos>$spos){
$dir = strtolower(substr($wrss,$spos,$epos-$spos));
}// Get difference
$spos = strpos($wrss,’>’,$epos+3)+1;
$epos = strpos($wrss,’<’,$spos);
if ($epos>$spos){
$diff = substr($wrss,$spos,$epos-$spos);
}}
$result['name'] = $name;
$result['value'] = $price;
$result['diff'] = $diff;
$result['direction'] = $dir;
$result['text'] = $text;return $result;
}
?>
<?
// Get stock data
//$data = processStockSite(’ttp://finance.yahoo.com’); // Google
$data = processStockSite(’http://finance.yahoo.com/q?s=GOOG’); // Google
?><html>
<style type=”text/css”>
<!–
.unnamed1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
background-color: #000000;
}
–>
</style>
<body class=”unnamed1″>
<?php echo $data['name']; ?>$
<?php
echo $data['text'];
//echo $data['value'].’ ‘;
//if ($data['direction'] == ‘up’) echo ‘<span class=”up”> +’.$data['diff'].’</span>’;
//else echo ‘<span class=”down”> -’.$data['diff'].’</span>’; ?>
</body>
</html>
<?php
$data = processStockSite(’http://finance.yahoo.com/q?s=MSFT’); // Microsoft
?><?php echo $data['name']; ?>$
<?php
echo $data['text'];
//echo $data['value'].’ ‘;
//if ($data['direction'] == ‘up’) echo ‘<span class=”up”> +’.$data['diff'].’</span>’;
//else echo ‘<span class=”down”> -’.$data['diff'].’</span>’; ?>
<?php
$data = processStockSite(’http://finance.yahoo.com/q?s=AAPL’); // Apple
echo $data['name'];
echo $data['text'];
$data = processStockSite(’http://finance.yahoo.com/q?s=GE’); // GE
echo $data['name'];
echo $data['text'];
$data = processStockSite(’http://finance.yahoo.com/q?s=BELFA’);//Bel Fuse Inc
echo $data['name'];
echo $data['text'];
$data = processStockSite(’http://finance.yahoo.com/q?s=BIOD’);//Bio Del
echo $data['name'];
echo $data['text'];
?><!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “DTD/xhtml1-transitional.dtd”>
<html>
<body>
<?php echo $data['name']; ?>$
<?php
echo $data['text'];
//echo $data['value'].’ ‘;
//if ($data['direction'] == ‘up’) echo ‘<span class=”up”> +’.$data['diff'].’</span>’;
//else echo ‘<span class=”down”> -’.$data['diff'].’</span>’; ?>
</body>
</html>
</marquee>
For Joomla
Download and install Joomla PHP component “Jumi” from here : http://extensions.joomla.org/extensions … ntent/1023
create new “Jumi “ module and paste this script and save the module . thats it !
For Wordpress
download this plugin :http://wordpress.org/extend/plugins/exec-php/
and paste the above script , it will work !
you can replace or add stock values i.e http://finance.yahoo.com/q?s=AAPL ( for apple ) with any values by refering to yahoo finance .