Re: Convert video to FLV like youtube

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

 



Straightforward and useful, I have added it to the "videos conversion"
snippets directory ;)

Sokot Sameh,
Nitsan Bin-Nun

On Sat, Oct 18, 2008 at 10:45 PM, Dotan Cohen <dotancohen@xxxxxxxxx> wrote:

> 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 on
> http://dotancohen.com my personal website:
>
> hardy2@hardy2-laptop:~$ cat .bin/video-flv_png
> #!/bin/bash
> filename="$@"
> filename=${filename%.*}
> ffmpeg -sameq -i "$@" -s 640x480 -ar 44100 -r 25 $filename.flv -pass 2
> ffmpeg  -itsoffset -0  -i "$@" -vcodec png -vframes 1 -an -f rawvideo
> -s 640x480 $filename.1.png
> ffmpeg  -itsoffset -0.5  -i "$@" -vcodec png -vframes 1 -an -f
> rawvideo -s 640x480 $filename.2.png
> ffmpeg  -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 first
> few 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.com
> http://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