|
|
@ -110,11 +110,11 @@ class FfmpegService |
|
|
} |
|
|
} |
|
|
if (filemtime($pathFile) > strtotime("2021-07-26 00:00:00")) { |
|
|
if (filemtime($pathFile) > strtotime("2021-07-26 00:00:00")) { |
|
|
$mtime = date("Y-m-d H:i:s", filemtime($pathFile)); |
|
|
$mtime = date("Y-m-d H:i:s", filemtime($pathFile)); |
|
|
dump("$pathFile modify at $mtime is after 2021-07-26 00:00:00 skip"); |
|
|
|
|
|
|
|
|
// dump("$pathFile modify at $mtime is after 2021-07-26 00:00:00 skip");
|
|
|
// return;
|
|
|
// return;
|
|
|
} else { |
|
|
} else { |
|
|
$mtime = date("Y-m-d H:i:s", filemtime($pathFile)); |
|
|
$mtime = date("Y-m-d H:i:s", filemtime($pathFile)); |
|
|
dump("$pathFile modify at $mtime is before 2021-07-19 00:00:00"); |
|
|
|
|
|
|
|
|
// dump("$pathFile modify at $mtime is before 2021-07-19 00:00:00");
|
|
|
} |
|
|
} |
|
|
$fileInfo = pathinfo($pathFile); |
|
|
$fileInfo = pathinfo($pathFile); |
|
|
if (ends_with($fileInfo["filename"], "-x265")) { |
|
|
if (ends_with($fileInfo["filename"], "-x265")) { |
|
|
@ -134,7 +134,7 @@ class FfmpegService |
|
|
} |
|
|
} |
|
|
dump("targetFile", [$targetFile]); |
|
|
dump("targetFile", [$targetFile]); |
|
|
Log::info("process target file : $targetFile"); |
|
|
Log::info("process target file : $targetFile"); |
|
|
$result = shell_exec("ffmpeg -threads 3 -i '". $pathFile ."' -c:v libx265 -vtag hvc1 '" . $targetFile . "' && echo 'ok'"); |
|
|
|
|
|
|
|
|
$result = shell_exec("ffmpeg -threads 4 -i '". $pathFile ."' -preset ultrafast -c:v libx265 -vtag hvc1 '" . $targetFile . "' && echo 'ok'"); |
|
|
echo $result; |
|
|
echo $result; |
|
|
if (trim($result) == "ok") { |
|
|
if (trim($result) == "ok") { |
|
|
echo "compress work done remove the file \n"; |
|
|
echo "compress work done remove the file \n"; |
|
|
|