CodeIgniter Forums
how to convert video type mp4 to flv ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: how to convert video type mp4 to flv ? (/showthread.php?tid=27095)



how to convert video type mp4 to flv ? - El Forum - 02-01-2010

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


how to convert video type mp4 to flv ? - El Forum - 02-01-2010

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


how to convert video type mp4 to flv ? - El Forum - 02-01-2010

[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);



how to convert video type mp4 to flv ? - El Forum - 02-01-2010

[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 ?


how to convert video type mp4 to flv ? - El Forum - 02-01-2010

[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.


how to convert video type mp4 to flv ? - El Forum - 04-26-2010

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


how to convert video type mp4 to flv ? - El Forum - 04-26-2010

[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 !