tags:

views:

130

answers:

2

hello all, i want to convert flv video(downloaded from you tube) to any other format, i had search a lot, but every script changed any other format into flv while i need flv to any other format. please suggest me any link or php script that convert flv to any other format.

one more question :why flv is preferred for video??

thanks.

+2  A: 

Apart from using a 3rd party web service (I don't think there are free ones), there is no pure PHP solution for this. If you have web space / a web server with access to the commandline, try ffmpeg .

You can invoke ffmpeg using exec(), but there are also wrapper classes for PHP, e.g. here. There is also a PHP extension providing an interface to ffmpeg but that has to be installed on the server.

One reason to use the flv format at the moment is because (to my knowledge) it's the only video format supported by Flash players before Version 10, some of which are still around when users don't update frequently. The 10.x player generation supports the better H.264 format.

Pekka
ffmpeg only convert other video format into flv format, but i m already having video in flv format, i just want to change it(.flv) to .mpeg or .avi format
diEcho
@I like I'm pretty sure ffmpeg can read flv and write to mpeg.
Pekka
A: 

I suppose your could use ffmpeg to do that kind of conversion, calling it via exec() or an equivalent.
(I've seen quite a couple of questions/answers on SO that use ffmpeg to do some kind of video-conversion)


To answer the question about "why flv is preferred for video ?" : I suppose it's because :

  • Almost everyone has flash player installed in their browser
  • while not everyone has a video-player -- especially when you think about the multitude of exiting codecs
  • and using flash probably allows for better embedding of the videos in the browser

Well, at least, this is for now -- we'll see in some time, with HTML 5, if this still stands ^^

Pascal MARTIN
ffmpeg only convert video to flv format, but i m already getting vudeo in flv format, i just want to change it to .mpeg or .avi format
diEcho