/usr/bin/ffmpeg -i $1 \
-y \
-acodec aac \
--ab 64k \
-vcodec libx264 \
-b 384k \
+-ab 64k \
-mbd 2 \
-cmp 256 \
-subcmp 2 \
-i_qfactor 0.71 \
-qmin 10 -qmax 51 \
-qdiff 4 \
--ac 1 \
+-ac 2 \
+-ar 44100 \
-r 13 \
$2/$filename.mp4
fi
-echo 'making ogv'
+echo 'making webm'
echo
echo
-/usr/local/bin/ffmpeg2theora $1 -o $2/$filename.ogv
-echo 'making webm'
+/usr/local/bin/ffmpeg -i $1 \
+-keyint_min 0 \
+-g 250 \
+-skip_threshold 0 \
+-qmin 1 \
+-qmax 51 \
+-vcodec libvpx \
+-b 614400 \
+-acodec libvorbis \
+-ar 44100 \
+-ac 2 \
+-ab 64k \
+-y $2/$filename.webm
+
+echo 'making ogv'
echo
echo
-/usr/local/bin/ffmpeg -i $1 -keyint_min 0 -g 250 -skip_threshold 0 -qmin 1 -qmax 51 -vcodec libvpx -b 614400 -acodec libvorbis -y $2/$filename.webm
\ No newline at end of file
+/usr/local/bin/ffmpeg2theora $1 -o $2/$filename.ogv
if (!file_exists($dir)) {
mkdir($dir, 0777, true);
$ext = files::getExtension($url);
+ if (preg_match('#^(\w+)(.*)$#', $ext, $matches)) {
+ $ext = $matches[1];
+ }
$original = $dir . 'video.' . $ext;
copy($url, $original);
}
}
+
?>
\r
// Définition des variables dans l'environnement de production\r
//define('DB_HOST', ':/var/run/mysqld/mysqld.sock');\r
-if ($_SERVER['SERVER_ADDR'] == '37.59.53.196') {\r
+\r
+if (getenv('HOSTNAME') != 'ks308520.kimsufi.com') {\r
define('DB_HOST', 'localhost');\r
+ define('SERVER','avanger');\r
} else {\r
define('DB_HOST', 'avanger.fluidbook.com');\r
+ define('SERVER','dictator');\r
}\r
\r
define('DB_NAME', 'extranet');\r
/** --del -r -z -v * */\r
$cp = new cubeCommandLine('rsync');\r
$cp->setPath(CONVERTER_PATH);\r
- $cp->setArg('del');\r
+ //$cp->setArg('del');\r
$cp->setArg('t');\r
$cp->setArg('r');\r
$cp->setArg('z');\r
'mkdir -p ' . $u['path'],\r
'cd ' . $u['path'],\r
'lcd ' . $package,\r
- 'mirror -Rve --parallel=5'\r
+ //'mirror -Rve --parallel=5'\r
+ 'mirror -Rv --parallel=5'\r
);\r
\r
-\r
$lftp = new cubeCommandLine('lftp');\r
$lftp->setArg('u', $u['user'] . ',' . $u['pass']);\r
$lftp->setArg('p', $u['port']);\r
}\r
\r
public function getProgress() {\r
- return array("progress" => $this->progress,\r
- 'currentDoc' => $this->currentDoc->file,\r
+ $res = array("progress" => $this->progress,\r
'totalDoc' => $this->totalDoc,\r
'currentDocPage' => $this->currentDocPage,\r
'totalDocPage' => $this->totalDocPage,\r
'totalPages' => $this->totalPages,\r
'processedPages' => $this->processedPages,\r
'processedDoc' => max($this->processedDoc + 1, $this->totalDoc));\r
+ if ($this->currentDoc) {\r
+ $res['currentDoc'] = $this->currentDoc->file;\r
+ }\r
+ return $res;\r
}\r
\r
public function setProgress($i) {\r
@unlink($img);\r
if (!file_exists($img) || filemtime($img) < cubeDate::round(null, 'H')) {\r
$im = imagecreatetruecolor(944, 306);\r
- imagelayereffect($im, IMG_EFFECT_REPLACE);\r
+ //imagelayereffect($im, IMG_EFFECT_REPLACE);\r
$trans = imagecolorallocatealpha($im, 255, 255, 255, 0);\r
imagefill($im, 0, 0, $trans);\r
- imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
+ //imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
$i = 1;\r
$x0 = 0;\r
$y0 = 305;\r
}\r
if (!file_exists($img) || filemtime($img) < cubeDate::round(null, 'H')) {\r
$im = imagecreatetruecolor(944, 306);\r
- imagelayereffect($im, IMG_EFFECT_REPLACE);\r
+ //imagelayereffect($im, IMG_EFFECT_REPLACE);\r
$trans = imagecolorallocatealpha($im, 255, 255, 255, 0);\r
imagefill($im, 0, 0, $trans);\r
- imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
+ //imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
$i = 1;\r
$x0 = 900;\r
$y0 = 305;\r
if (!file_exists($img) || filemtime($img) < cubeDate::round(null, 'H')) {\r
// Création de l'image\r
$im = imagecreatetruecolor(944, 306);\r
- imagelayereffect($im, IMG_EFFECT_REPLACE);\r
+ //imagelayereffect($im, IMG_EFFECT_REPLACE);\r
$trans = imagecolorallocatealpha($im, 255, 255, 255, 0);\r
imagefill($im, 0, 0, $trans);\r
- imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
+ //imagelayereffect($im, IMG_EFFECT_ALPHABLEND);\r
$i = 1;\r
$x0 = 0;\r
$y0 = 305;\r
$this->fields['mobileTransitionDuration'] = array('type' => 'float', 'default' => '1.0', 'editable' => true, 'label' => __('Durée de la transition'));\r
\r
$this->fields['mobileIconVector'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Utiliser les icônes vectorielles'));\r
- $this->fields['mobileServerConfig'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Inclure les fichiers de configuration serveur'), 'grade' => 5);\r
+ $this->fields['mobileServerConfig'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Inclure les fichiers de configuration serveur'), 'grade' => 3);\r
\r
$this->fields['mobilePlugins'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Plugin'), 'grade' => 5);\r
\r
\r
public function makePackage($zip) {\r
$this->preparePackage();\r
- $url = 'http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi) . '&junk=' . TIME;\r
+ if (SERVER == 'dictator') {\r
+ $url = 'http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi) . '&junk=' . TIME;\r
+ file_get_contents($url);\r
+ } else {\r
+ $tmp=cubeFiles::tempnam();\r
+ file_put_contents($tmp, $this->nsi);\r
+ $makensis=new cubeCommandLine('makensis');\r
+ $makensis->setArg(null,$tmp);\r
+ $makensis->execute();\r
+ unlink($tmp);\r
+ }\r
+\r
\r
- file_get_contents($url);\r
return $this->getURLBase('exe');\r
}\r
\r