Click to See Complete Forum and Search --> : FFMpeg Works on Small Files And Not Large


The Little Guy
12-14-2007, 02:50 PM
I don't know what is causing this to happen

PHP ini:
post_max_size: 101M
upload_max_filesize: 100M

PHP (one of the first lines of code)
set_time_limit(0);

The file size I am uploading is about 35M - 38M

The code:

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);
}

hastx
12-15-2007, 10:54 AM
What are you considering to be large and small? The 35 mb files you are working with, are they successful, and you are trying to get to the 100mb limit you set?

At any rate, to do uploads that big, you will probably need to modify the input time and php's memory limits in addition to the filesize limits you have already set.