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:  
 -   Does the  in.mp4  file actually exist on the server and is it in the right temporary folder?   -   Check the boundaries of that file size ( upload_max_filesize  PHP settings) are not hit.  -   Does the  ffmpeg  command work from Shell Promiti  as a user running as a webserver ?  (Use this verbose logging option to check the errors   -   ( 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
Post a Comment