CodeIgniter Forums
codeigniter video upload - 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: codeigniter video upload (/showthread.php?tid=11215)



codeigniter video upload - El Forum - 08-30-2008

[eluser]PHP Programmer[/eluser]
I am trying to upload a video file ie .avi, .mpeg formats and want to convert them in .flv format.
I have put the following code in mime.php:
AddType video/x-flv .flv
AddType video/mp4 .mp4

But my code didn't work....

Is there any code available to do the video uploading and converting into .flv format in CodeIgniter? Please suggest.

TIA


codeigniter video upload - El Forum - 08-30-2008

[eluser]Bramme[/eluser]
I don't think PHP supports video conversion. You'll probably have to use some sort of cgi script for that... As for your mime types, I believe somebody posted a big list in the ignited code board a while back. You should try searching for that one as I've never had to add mimetypes and can't help you there.


codeigniter video upload - El Forum - 08-30-2008

[eluser]Colin Williams[/eluser]
[url="http://ffmpeg.mplayerhq.hu/"]Converter[/url]


codeigniter video upload - El Forum - 08-30-2008

[eluser]Bramme[/eluser]
Yeah, but can you run it online?


codeigniter video upload - El Forum - 08-30-2008

[eluser]Colin Williams[/eluser]
[url="http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#SEC5"]It runs on the server.[/url] You run it from the command line.

Code:
exec('ffmpeg -y -i /path/to/avi/12.avi -acodec mp3 -ar 22050 -f flv /path/to/flv/14.flv')

Don't know it in and out, but it's sort of the defacto standard for video sites, so far as I know.

It would be nice if someone wrote a CI Lib for ffmpeg, exposing its most common features. Actually, I'd imagine there's already a PHP class out there for it, so it might already be done.


codeigniter video upload - El Forum - 08-30-2008

[eluser]Colin Williams[/eluser]
[url="http://www.phpclasses.org/browse/package/3747.html"]This one looks good[/url]