Jump to content

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.