Tuesday, 15 January 2013

php - FFMPEG is not working centos linux server -


I am using FFMPEG to create video thumbnails,

I have FFMPEG (ffmpeg-2.4 .2) has been downloaded in .tar.bz2) and has been installed in the server.

/ usr / bin / ffmpeg

and is used in the code below:

  if ($ extension === 'mp4' or $ extension == 'mp34') {$ video = $ timestamp $ Imagename; $ Videoname = substr ($ imagename, 0, -4). $ Timestamp; $ Image = "sites / default / files / content_images / {$ videoname} -thumb.jpg"; Var_dump ($ video); $ Cmd = "/ usr / bin / ffmpeg -i /opt/lampp/htdocs/mydashboard/sites/default/files/content_videos/".$video." -SS 00: 00: 14.435 -f Image 2-WeFrame 1 / Opt /lampp/htdocs/mydashboard/sites/default/files/content_images/$videoname-thumb.jpg "; $ CMDst = $ CMD; $ Locale = 'en_IN.UTF-8'; SettleCell (LC_OL, $ locale); Putenv ('LC_ALL =' $ locale.); Ako App ($ CMD);  

But this command is not working.

  $ cmd = "/ usr / bin / ffmpeg -i / opt / lampp / htdocs / Mydashboard / sites / default / files / content_videos /".$ video "-SS 00: 00: 14.435 -f image2 -vframes 1 / opt / lampp / htdocs / mydashboard / sites / default / files / content_images / $ videoname-thumbs .jpg";  

"post-text" itemprop = "text" >

Contrasting the variable at the end of your CMD definition is wrong Try with:

  [...] les / content_images / V. Videonam "- thumb.jpg";  

Appendix: What are the rights on the output directory? Your CMD will be run with your webserver user (www-data, RH, etc. on Debian System ...) Make sure that the directory ownership and / or rights are set correctly


No comments:

Post a Comment