denoteone Posted April 7, 2010 Share Posted April 7, 2010 Trying to convert an avi into a flv using a phpscript and ffmpeg. Below is the most important part of my code but I am not able to convert yet. $newname = myvideo.avi define('FFMPEG_LIBRARY', '/usr/bin/ffmpeg '); $exec_string = FFMPEG_LIBRARY.' -i /var/www/html/site/videos/day/upload/$newname /var/www/html/site/videos/day/upload/outputfile.flv'; exec($exec_string); I have a video portal running so I am sure that I have ffmpeg installed correctly. Any help would be great. Link to comment https://forums.phpfreaks.com/topic/197887-running-a-exec-from-php/ Share on other sites More sharing options...
denoteone Posted April 7, 2010 Author Share Posted April 7, 2010 caught one of my own mistakes in the $exec_string variable. define('FFMPEG_LIBRARY', '/usr/bin/ffmpeg '); $exec_string = FFMPEG_LIBRARY.' -i '. $newname .' -ab 56 -ar 44100 -b 200 -r 15 -s 320x240 -f flv video_finale.flv'; echo $exec_string; exec($exec_string); But still not working. Link to comment https://forums.phpfreaks.com/topic/197887-running-a-exec-from-php/#findComment-1038498 Share on other sites More sharing options...
br0ken Posted April 7, 2010 Share Posted April 7, 2010 I had a similar problem when calling mysqldump via the exec command last week. My problem was wrapping all variables in single quotes. If your variable content (ie. the new filename) has a space in it, the command would be parsed incorrectly. Have you tried running the command directly via the Terminal? If so, what error did you get? Link to comment https://forums.phpfreaks.com/topic/197887-running-a-exec-from-php/#findComment-1038539 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.