Re: Convert video to FLV like youtube

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

 



On Sat, 2008-10-18 at 23:23 +0200, Nitsan Bin-Nun wrote:
> 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
 <> א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
> >
> > ä-ö-ü-ß-Ä-Ö-Ü
> >
I've done a similar thing for a system at work, but I have noticed that
it sometimes creates buggy FLVs from WMV clips. It might just be the way
that the encodings differ, and despite working for a media company, I
still have no idea about all the differing rates (frames, video, audio)
inside of one clip, so I think it may just be my bad understanding of
it.


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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