Wednesday, December 08, 2010
Lighttpd FasCGI PHP, MySQL chroot jail installation under Debian Linux
Found this HOWTO on secure lighttpd web server
Friday, January 01, 2010
Batch Convert mov files to flv files
adopted from here Using FFMpeg to Convert mpg or mov to flv
I am using the code mentioned in the article to batch convert the mov files I took with my HD Camcorder to flv for streaming it online.
Here is the modified code to suit my needs:
I change the display ratio to half of the 720P.
I am using the code mentioned in the article to batch convert the mov files I took with my HD Camcorder to flv for streaming it online.
Here is the modified code to suit my needs:
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && strpos($file, "MOV") !== false) {
$new_filename = str_replace(" ", "_", strtolower(str_replace("MOV", "flv", $file)));
$file = str_replace(" ", "\ ", $file);
exec("ffmpeg -i $file -s 640x360 -deinterlace -ar 44100 -r 25 -qmin 3 -qmax 8 $new_filename");
}
}
closedir($handle);
}
?>
I change the display ratio to half of the 720P.
Subscribe to:
Posts (Atom)