Skip to content

Commit

Permalink
Update camshoter.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
directman66 committed Dec 14, 2018
1 parent 30fa5a9 commit 0c14942
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/camshoter/camshoter.class.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -461,6 +461,12 @@ function propertySetHandle($object, $property, $value) {
mkdir($users, 0777, true);} mkdir($users, 0777, true);}





$savefacesdir=ROOT."cms/cached/nvr/faces/";
if (!file_exists($savefacesdir)) {
mkdir($savefacesdir, 0777, true);}


if (!file_exists($savelast)) { if (!file_exists($savelast)) {
mkdir($savelast, 0777, true);} mkdir($savelast, 0777, true);}


Expand Down Expand Up @@ -498,6 +504,7 @@ function propertySetHandle($object, $property, $value) {
$savename=$savepath."cam".$properties[$i]['ID']."_".date('Y-m-d_His').".mp4"; // куда сохранять $savename=$savepath."cam".$properties[$i]['ID']."_".date('Y-m-d_His').".mp4"; // куда сохранять
$savenamethumb=$savepath."cam".$properties[$i]['ID']."_".date('Y-m-d_His').".jpg"; // куда сохранять $savenamethumb=$savepath."cam".$properties[$i]['ID']."_".date('Y-m-d_His').".jpg"; // куда сохранять
$savenamelast=$savelast."cam".$properties[$i]['ID'].".jpg"; // куда сохранять $savenamelast=$savelast."cam".$properties[$i]['ID'].".jpg"; // куда сохранять
$savenameface=$savefacesdir."cam".$properties[$i]['ID']."_".date('Y-m-d_His').".jpg"; // куда сохранять
//linux //linux
if (substr(php_uname(),0,5)=='Linux') { if (substr(php_uname(),0,5)=='Linux') {
//exec('timeout -s INT 60s ffmpeg -y -i "'.$url.'" -t '.$sec.' -f mp4 -vcodec libx264 -pix_fmt yuv420p -an -r 15 '.$savename); //exec('timeout -s INT 60s ffmpeg -y -i "'.$url.'" -t '.$sec.' -f mp4 -vcodec libx264 -pix_fmt yuv420p -an -r 15 '.$savename);
Expand Down Expand Up @@ -550,7 +557,6 @@ function propertySetHandle($object, $property, $value) {
//..if ($iam=='img') {$detect$this->mailvision_detect($savename);} //..if ($iam=='img') {$detect$this->mailvision_detect($savename);}
//if (($iam=='video')&&($fsize>500)) {$detect$this->mailvision_detect($savename);} //if (($iam=='video')&&($fsize>500)) {$detect$this->mailvision_detect($savename);}


$savenameface=$savelast.'lastface.jpg';


//определяем, есть ли на фото лицо //определяем, есть ли на фото лицо


Expand Down

0 comments on commit 0c14942

Please sign in to comment.