• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to convert video type mp4 to flv ?

#1
[eluser]deepydee[/eluser]
how to convert video type mp4 to flv use function exec?

#2
[eluser]Colin Williams[/eluser]
http://ffmpeg.org/

#3
[eluser]Joshua Logsdon[/eluser]
Yep. And so you may end up with something like this to play around with:
Code:
$tmp = exec( 'MY_LOCATION_TO\ffmpeg -i MY_LOCATION_TO\sample_mpeg4.mp4 -y -acodec copy -ar 22050 -ab 64k -ac 1 MY_LOCATION_TO\sample_mpeg4.flv', $output, $return_var );

echo var_dump($output);
echo var_dump($return_var);

#4
[eluser]deepydee[/eluser]
thanks for the response, I've tried in CMD, but I get error like this

" unsupported codec (id=86018) for input stream #0.0 "

why ? what is wrong ?

#5
[eluser]bretticus[/eluser]
[quote author="deepydee" date="1265103480"]
" unsupported codec (id=86018) for input stream #0.0 "[/quote]

Not really a CodeIgniter/PHP error here. I suggest you ask this question on a forum for your OS and/or ffmpeg.

FYI, there is a ffmpeg extension for PHP now (may be useful.)

EDIT. ixnay on the php extension. Looking over the docs briefly, it doesn't really seem to do anything in the way of converting video formats.

#6
[eluser]Unknown[/eluser]
Usually I prefer use the program Flash to Video PRO, it's very simplr tool for me.

#7
[eluser]Zeeshan Rasool[/eluser]
Hi, Just try this simple line. Also put ffmpeg on root or in any folder on root. Make sure, you have enabled ffmpeg extensin installed on your server. Check this by printing phpinfo().

Code:
exec("ffmpeg -i UPLOADED_FILE_PATH_WITH_FILENAME -metadata title='my title' YOUR_DESTINATION_PATH/out.flv");

Good Luck !


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.