Jump to content

FFMpeg on Small files only


The Little Guy

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/81441-ffmpeg-on-small-files-only/
Share on other sites

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.