Welcome Guest, Not a member yet? Register   Sign In
codeigniter video upload

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


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.

[eluser]Colin Williams[/eluser]

Yeah, but can you run it online?

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

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.

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

Theme © iAndrew 2016 - Forum software by © MyBB