The Little Guy Posted December 13, 2007 Share Posted December 13, 2007 Im not sure If I understand... This doesn't seem to work on larger video files I tried a 35MB file, and it didn't convert it... I tried on a 1-3MB file, and it worked just fine.... Any Ideas why that happens? <?php if(in_array($file,$video_types)){ if($file!='.flv'){ exec("/usr/bin/ffmpeg -i '../../tzfiles.com/users/{$_POST['uploadTo']}/".$fName."' -ar 22050 -ab 32 -f flv -s 320x240 '../../tzfiles.com/users/{$_POST['uploadTo']}/".$flvName."'"); } if(!file_exists("../../tzfiles.com/users/{$_POST['uploadTo']}/thumbs/videos")){ mkdir("../../tzfiles.com/users/{$_POST['uploadTo']}/thumbs/videos"); } exec("ffmpeg -i '../../tzfiles.com/users/{$_POST['uploadTo']}/".$flvName."' -an -ss 00:00:03 -t 00:00:01 -r 1 -y -s 120x90 '../../tzfiles.com/users/{$_POST['uploadTo']}/thumbs/videos/".$f."%d.jpg'"); rename("../../tzfiles.com/users/{$_POST['uploadTo']}/thumbs/videos/".$f."1.jpg","../../tzfiles.com/users/{$_POST['uploadTo']}/thumbs/videos/".$f.".jpg"); unlink("../../tzfiles.com/users/{$_POST['uploadTo']}/".$fName); $fName = $flvName; $filesize = filesize("../../tzfiles.com/users/{$_POST['uploadTo']}/".$flvName); } ?> Quote Link to comment Share on other sites More sharing options...
farkewie Posted December 13, 2007 Share Posted December 13, 2007 Add this to the top ini_set("upload_max_filesize", "40M"); Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted December 13, 2007 Author Share Posted December 13, 2007 I don't need that, my current settings are: 100M upload_max_filesize and 101M post_max_size Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted December 13, 2007 Author Share Posted December 13, 2007 bumpage Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted December 13, 2007 Author Share Posted December 13, 2007 bumpable Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 13, 2007 Share Posted December 13, 2007 Sorry for being off topic, how did you manage to install FFmpeg? Quote Link to comment Share on other sites More sharing options...
trq Posted December 13, 2007 Share Posted December 13, 2007 Have you enabled error reporting? Your script is likely timming out on the larger files. Check your Apache logs also. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted December 14, 2007 Author Share Posted December 14, 2007 Sorry for being off topic, how did you manage to install FFmpeg? My host has it pre installed. Have you enabled error reporting? Your script is likely timming out on the larger files. Check your Apache logs also. I use: <?php set_time_limit (0); ?> Could it still be failing? Quote Link to comment Share on other sites More sharing options...
trq Posted December 14, 2007 Share Posted December 14, 2007 Could it still be failing? If php is running in safe mode. Check phpinfo() to see. If so, there is nothing you can do to change the max execution time. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted December 14, 2007 Author Share Posted December 14, 2007 safe_mode: Off 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.