]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 30 Jan 2012 19:22:46 +0000 (19:22 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 30 Jan 2012 19:22:46 +0000 (19:22 +0000)
fluidbook/tools/webvideo
inc/ws/Controlleur/class.ws.maintenance.php

index e639bc5d1ae3ff885e500c44724bd78fd773f5e3..e42645b8dae82182e469708145929d1ab43a270e 100644 (file)
@@ -5,9 +5,38 @@ extension=${filename##*.}
 filename=${filename%.*}
 
 
-ulimit -t 360;/usr/local/bin/ffmpeg -i $1 -y -r 1 -ss 00:00:04 -t 00:00:01 -f image2 $2/$filename.jpg
-ulimit -t 360;/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
-if[extension!="mp4"]
-       ulimit -t 360;/usr/bin/ffmpeg -i $1 -y -acodec aac -ab 128k -vcodec libx264 -b 1200k -mbd 2 -cmp 2 -subcmp 2 -strict experimental $2/$filename.mp4
+ulimit -t 3600;/usr/local/bin/ffmpeg -i $1 -y -r 1 -ss 00:00:04 -t 00:00:01 -f image2 $2/$filename.jpg
+ulimit -t 3600;/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
+if [ extension != "mp4" ]
+then
+       ulimit -t 3600;/usr/bin/ffmpeg -i $1 \
+-y \
+-acodec aac \
+-ab 64k \
+-vcodec libx264 \
+-b 384k \
+-mbd 2 \
+-cmp 256 \
+-subcmp 2 \
+-subq 6 \
+-strict experimental \
+-coder 0 \
+-trellis 0 \
+-bf 0 \
+-refs 5 \
+-flags +loop+mv4 \
+-partitions +parti4x4+parti8x8+partp4x4+partp8x8 \
+-flags2 +mixed_refs \
+-me_range 16 \
+-g 250 \
+-keyint_min 25 \
+-sc_threshold 40 \
+-i_qfactor 0.71 \
+-qmin 10 -qmax 51 \
+-qdiff 4 \
+-ac 1 \
+-ar 16000 \
+-r 13 \
+$2/$filename.mp4
 fi
-ulimit -t 360;/usr/local/bin/ffmpeg2theora $1 -o $2/$filename.ogv
\ No newline at end of file
+ulimit -t 3600;/usr/local/bin/ffmpeg2theora $1 -o $2/$filename.ogv
index d36ce6db84dc31eaefc60686a8447bf7b4d13783..62b58f01f25168e42b40ab373a5cd0d1b35b92aa 100644 (file)
@@ -639,6 +639,30 @@ class wsMaintenance {
                wsLang::getV1Translations();\r
        }\r
 \r
+       public static function reprocessVideos($args) {\r
+               global $core;\r
+\r
+               $book_id = $args[0];\r
+\r
+               $dir = WS_BOOKS . '/working/' . $book_id;\r
+\r
+               $dao = new wsDAODocument($core->con);\r
+               $dao->getLinksAndRulers($book_id, $links, $rulers);\r
+\r
+               foreach ($links as $link) {\r
+                       if ($link['type'] != 4) {\r
+                               continue;\r
+                       }\r
+\r
+                       $file=$dir . '/' . $link['to'];\r
+                       if (!file_exists($file)) {\r
+                               continue;\r
+                       }\r
+\r
+                       wsTools::encodeWebVideos($file, null, true, true);\r
+               }\r
+       }\r
+\r
 }\r
 \r
 ?>
\ No newline at end of file