[Phphtmllib-devel] SF.net SVN: phphtmllib:[3303] trunk/open2300/lib/core/daemon/ AviProcessorDaemon
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2009-11-26 17:42:12
|
Revision: 3303 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3303&view=rev Author: hemna Date: 2009-11-26 17:42:03 +0000 (Thu, 26 Nov 2009) Log Message: ----------- use rsync instead of scp Modified Paths: -------------- trunk/open2300/lib/core/daemon/AviProcessorDaemon.inc Modified: trunk/open2300/lib/core/daemon/AviProcessorDaemon.inc =================================================================== --- trunk/open2300/lib/core/daemon/AviProcessorDaemon.inc 2009-11-26 03:15:02 UTC (rev 3302) +++ trunk/open2300/lib/core/daemon/AviProcessorDaemon.inc 2009-11-26 17:42:03 UTC (rev 3303) @@ -106,11 +106,14 @@ //now convert the avi movie to a flash file $aviname = "timelapse_640x480_".$rate."fps.avi"; - $cmd = "/usr/bin/ffmpeg -y -i ".$aviname." -b 1900k -f flv timelapse.flv"; + $cmd = "/usr/bin/ffmpeg -y -i ".$aviname." -b 1900k -f flv ".$ymdDate."/timelapse.flv"; $this->exec_command($dirname, $cmd); + + //move the //now send it to the hosting provider - $cmd = "/usr/bin/scp timelapse.flv wx.hemna.com:wx.hemna.com/htdocs/video/".$ymdDate; + //$cmd = "/usr/bin/scp timelapse.flv wx.hemna.com:wx.hemna.com/htdocs/video/".$ymdDate; + $cmd = "/usr/bin/rsync -av ".$ymdDate." wx.hemna.com:wx.hemna.com/htdocs/video"; $this->exec_command($dirname, $cmd); //track the image count @@ -187,7 +190,9 @@ */ protected function test_images_dir($dirname) { if (!file_exists($dirname)) { - $this->create_img_dir($dirname); + $this->create_dir($dirname); + $ymdDate = date("Ymd"); + $this->create_dir($dirname."/".$ymdDate) } } @@ -196,7 +201,7 @@ * (this is also done from the camera) * */ - protected function create_img_dir($dirname) { + protected function create_dir($dirname) { $this->log->info("Creating directory (".$dirname.")"); $ret = mkdir($dirname); if (!$ret) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |