Jul 8, 2009
I have a form where I take a video and convert it to flv using ffmpeg and the php shell_exec function. I store the output into a variable for further processing.I do about the same thing to create images from the video using ffmpeg-php to get individual frames of the video. If I have the image script just return the image to the browser it works fine. If I have the script save it to file, but entering the url into the browser manually, it works fine. However, if I use shell_exec yet again to use wget to call the page, it doesn't work. the output I get from wget is a 500 internal server error. If I copy the URL wget requested, it will create the image no problem. Anyone have any ideas why using wget this way wouldn't workI did notice that when I enter the URL into the browser manually, the page does return an image with the url requested, which is odd because I thought that when you wrote the file to the file system, it just saved it there and didn't return anything to the browser.I'm not stuck on the idea of using wget, it was just the first one that came to mind. I call the script 6 times. I get the first frame of the video and save it, preserving aspect ration, to a 160 width image. I then get the first frame for 5 seconds. So at 30 frames per second, I would create an image of frame 1, 31, 61, 91, and 121.
View 2 Replies