goheadtry Posted September 3, 2007 Share Posted September 3, 2007 $output is the variable I just need to know what to do with this. I need the $output to be a numbered jpeg such as 0000001.jpg 0000002.jpg and a numbered flv 0000001.flv 0000002.flv so I just need the numbering part how do I make it do this so that it is automaticly done lets say 0000001.jpg 0000002.jpg so the next one made will be 0000003.jpg and so on and so forth and the next flv made will be 0000003.flv and so on and so forth it does not need the extension I just need to make sure it does the sequence correctly so I don't get over written files etc. By the way the command runs ffmpeg <?php $input = $_GET['input']; $output = ? exec 'ffmpeg -i /home/forbushj/public_html/uploadvidd/'.$input.' -ar 22050 -ab 32 -f flv -s 320x240 /home/forbushj/public_html/2vidd/'.$output.'.flv'; exec 'ffmpeg -i /home/forbushj/public_html/2vidd/'.$input.' -an -ss 00:00:45 -an -r 1 -vframes 1 -y -s 150x100 /home/forbushj/public_html/2vidd/'.$output.'.jpg'; ?> Quote Link to comment Share on other sites More sharing options...
JustinMs66@hotmail.com Posted September 3, 2007 Share Posted September 3, 2007 i am currently funneling through the usage of ffmpeg myself. i have found that it is only possible to create GIF images using ffmpeg. to create JPEG images, you have to use ffmpeg-php (which took me like 40 hours to install), and here is the code i use: $frame = 1; $gd = new ffmpeg_movie("/path/to/file.avi"); $framegd = $gd->getFrame($frame); $im = $framegd->toGDImage(); imagejpeg($im,"filename.jpg"); i have also found that you cannot get screenshots of a flv, only the source avi/mpeg...etc your welcome Quote Link to comment Share on other sites More sharing options...
goheadtry Posted September 4, 2007 Author Share Posted September 4, 2007 Well I can't use ffmpeg-php my host won't install it but they will install ffmpeg but there is a problem I can't figure out how to save file names by number automaticlly Quote Link to comment Share on other sites More sharing options...
teng84 Posted September 4, 2007 Share Posted September 4, 2007 sample? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.