php - How do i convert videos uploaded by user to .swf? -


I am creating a website that is able to log in and post blogs and ideas and media such as pictures and videos. But we know that users can upload any type of video but the browser can not run them, so I thought I could convert them in some form. Play them using SWF and a flash player. I tried to use ffmpeg-php but it did not work. My code was:

  shell_exec ('ffmpeg -i in.mp4 out.swf');   

It does not show any error, neither does it out.swf . So, I thought I could get your help.

Please! help me.

To check things:

  1. Does the in.mp4 file actually exist on the server and is it in the right temporary folder?

  2. Check the boundaries of that file size ( upload_max_filesize PHP settings) are not hit.

  3. Does the ffmpeg command work from Shell Promiti as a user running as a webserver ? (Use this verbose logging option to check the errors

  4. ( Capture all the output from shell_exec and check for errors. Try to use system or exec , where you can also capture the return value of ffmpeg , which can then be used to check the error

    Finally, I will specify the actual directory name for input and output files. This can reduce problems as you know which folders to look for exactly results, you can also adjust permissions if needed < / html>

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -