re-encoding all upladed mp4s to mobile compatible one fixes #11

This commit is contained in:
Chris
2018-03-30 14:11:24 +02:00
parent 377d42bfcd
commit 4e680c78d5

View File

@@ -482,6 +482,12 @@ class PictshareModel extends Model
imagejpeg($res, $file, (defined('JPEG_COMPRESSION')?JPEG_COMPRESSION:90));
}
//re-render new mp4 by calling the re-encode script
if($type=='mp4' && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
{
system("nohup php ".ROOT.DS.'tools'.DS.'re-encode_mp4.php force '.$hash." > /dev/null 2> /dev/null &");
}
if(LOG_UPLOADER)
{
$fh = fopen(ROOT.DS.'upload'.DS.'uploads.txt', 'a');