Re: Convert video to FLV like youtube

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/10/18 Ryan S <genphp@xxxxxxxxx>:> Hey!>> Been googleing for a way to convert video to flv just like youtube and came accross the flv SDK kit, unfortunately it seems to only support C++, Delphi and C#>>> Have any of you guys come accross a php script that does this? any links, pointers and code would be appreciated.>
Here is the script that I use to convert videos to flash for use onhttp://dotancohen.com my personal website:
hardy2@hardy2-laptop:~$ cat .bin/video-flv_png#!/bin/bashfilename="$@"filename=${filename%.*}ffmpeg -sameq -i "$@" -s 640x480 -ar 44100 -r 25 $filename.flv -pass 2ffmpeg  -itsoffset -0  -i "$@" -vcodec png -vframes 1 -an -f rawvideo-s 640x480 $filename.1.pngffmpeg  -itsoffset -0.5  -i "$@" -vcodec png -vframes 1 -an -frawvideo -s 640x480 $filename.2.pngffmpeg  -itsoffset -1  -i "$@" -vcodec png -vframes 1 -an -f rawvideo-s 640x480 $filename.3.png


In addition to the video it creates three png files, from the firstfew frames of the video. I choose one of these pngs (rm the other two)and use it as the thumbnail for the video in the flash-based player.Feel free to check out my site for example code.
-- Dotan Cohen
http://what-is-what.comhttp://gibberish.co.ilא-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת;
ä-ö-ü-ß-Ä-Ö-Ü

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux