Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (13)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

Sur d’autres sites (4741)

  • using ffmpeg plugin with plugin uploaded

    17 avril 2013, par Bruno Ribeiro

    good he uploads the video registers in the database but does not take the print screen of the video and did not register on the database.

       <?
       class upload{

           public $vide;
           public $dir_video;
           public $dir_screen;
           //public $id_user;

       //private function video(){
       //return isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
       //}

       private function id_user(){
       return anti_injection($_GET['id']);
       }

       private function get_duration(){
           $getID3 = new getID3;
           $file = $getID3->analyze($this->video);
               return $file['playtime_string'];
       }

       private function rand_duration(){
       @list($h, $m, $s) = explode(":", $this->get_duration());
       $hms = ($h * 3600) + ($m * 60) + $s;
       $rhms = rand(0, $hms);
       return date('H:i', mktime(0,0,$rhms,0,0,0));

       }


       private function rand_name(){
           $a = base64_encode($this->video);
           return @md5(date('Y-m-d H:i:s') * $a);  
       }


       private function get_resolution(){

           $getID3 = new getID3;
           $file = $getID3->analyze($this->video);
               return $file['video']['resolution_x']."x".$file['video']['resolution_y'];

       }

       private function get_size(){
           $getID3 = new getID3;
           $file = $getID3->analyze($this->video);
               return $file['filesize'];

       }

       private function get_printscreen(){
           $cmd = "ffmpeg  -i ".$this->video." -f mjpeg -an -ss ".$this->rand_duration()." -an -vframes 1 -y ".$this->dir_screen.$this->rand_name().".jpg";
           return exec($cmd, $output);
               //echo "executed command: [".$cmd."] with result: ".print_r($output, true)."<br />\n";
       }

       private function get_extension($a){

           $arquivo = pathinfo($a);
           return $arquivo[&#39;extension&#39;];

       }

       private function verify_extension(){
           if($this->get_extension() == "flv"){
               return "0";
           } else {

               return "1";
           }

       }



       public function _build(){
       // HTTP headers for no cache etc

       /*header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
       header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
       header("Cache-Control: no-store, no-cache, must-revalidate");
       header("Cache-Control: post-check=0, pre-check=0", false);
       header("Pragma: no-cache");
       */

           session_start();

       // Settings
       //$targetDir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
       $targetDir = $this->dir_video;

       //$cleanupTargetDir = false; // Remove old files
       //$maxFileAge = 60 * 60; // Temp file age in seconds

       // 5 minutes execution time
       @set_time_limit(5 * 60);

       // Uncomment this one to fake upload time
       // usleep(5000);

       // Get parameters
       $chunk = isset($_REQUEST["chunk"]) ? $_REQUEST["chunk"] : 0;
       $chunks = isset($_REQUEST["chunks"]) ? $_REQUEST["chunks"] : 0;
       $fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : &#39;&#39;;

       // Clean the fileName for security reasons
       $fileName = preg_replace(&#39;/[^\w\._]+/&#39;, &#39;&#39;, $fileName);

       // Make sure the fileName is unique but only if chunking is disabled
       if ($chunks &lt; 2 &amp;&amp; file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {
           $ext = strrpos($fileName, &#39;.&#39;);
           $fileName_a = substr($fileName, 0, $ext);
           $fileName_b = substr($fileName, $ext);

           $count = 1;
           while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName_a . &#39;_&#39; . $count . $fileName_b))
               $count++;

           $fileName = $fileName_a . &#39;_&#39; . $count . $fileName_b;

       }

       // Create target dir
       if (!file_exists($targetDir))
           @mkdir($targetDir);

       // Look for the content type header
       if (isset($_SERVER["HTTP_CONTENT_TYPE"]))
           $contentType = $_SERVER["HTTP_CONTENT_TYPE"];

       if (isset($_SERVER["CONTENT_TYPE"]))
           $contentType = $_SERVER["CONTENT_TYPE"];

       // Handle non multipart uploads older WebKit versions didn&#39;t support multipart in HTML5
       if (strpos($contentType, "multipart") !== false) {
           if (isset($_FILES[&#39;file&#39;][&#39;tmp_name&#39;]) &amp;&amp; is_uploaded_file($_FILES[&#39;file&#39;][&#39;tmp_name&#39;])) {
               // Open temp file
               $out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? "wb" : "ab");
               if ($out) {
                   // Read binary input stream and append it to temp file
                   $in = fopen($_FILES[&#39;file&#39;][&#39;tmp_name&#39;], "rb");

                   if ($in) {
                       while ($buff = fread($in, 4096))
                           fwrite($out, $buff);
                   } else
                       die(&#39;{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}&#39;);
                   fclose($in);
                   fclose($out);
                   @unlink($_FILES[&#39;file&#39;][&#39;tmp_name&#39;]);
               } else
                   die(&#39;{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}&#39;);
           } else
               die(&#39;{"jsonrpc" : "2.0", "error" : {"code": 103, "message": "Failed to move uploaded file."}, "id" : "id"}&#39;);
       } else {
           // Open temp file
           $out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? "wb" : "ab");
           if ($out) {
               // Read binary input stream and append it to temp file
               $in = fopen("php://input", "rb");

               if ($in) {
                   while ($buff = fread($in, 4096))
                       fwrite($out, $buff);
               } else
                   die(&#39;{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}&#39;);

               fclose($in);
               fclose($out);
           } else
               die(&#39;{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}&#39;);
       }
       $photoName = $_FILES[&#39;file&#39;][&#39;name&#39;];

       $exploded_photoName = explode(&#39;.&#39;, $photoName);

       $user_id = $_SESSION[&#39;SESS_MEMBER_ID&#39;];

       if(!isset($_SESSION[$photoName])) {

           $_SESSION[$photoName] = &#39;1&#39;;
       }

       if($chunk==1){

           $this->get_printscreen();

           mysql_query("INSERT INTO video
           (poster_id,video,titulo,extension,screen,duration,resolucao,tamanho)
                       VALUES
           (&#39;".$this->id_user()."&#39;,&#39;$fileName&#39;,&#39;$exploded_photoName[0]&#39;,&#39;".$this->get_extension($fileName)."&#39;,&#39;".$this->rand_name().".jpg&#39;,&#39;".$this->get_duration()."&#39;,&#39;".$this->get_resolution()."&#39;,&#39;".$this->get_size()."&#39;)")
           or die(mysql_error());


       }
       // Return JSON-RPC response
       die(&#39;{"jsonrpc" : "2.0", "result" : null, "id" : "id"}&#39;);


           //$this->get_printscreen();
           //return print $this->video();
           //return print $this->rand_name();  
       }


       }

    ?>

    I'm using the class to become more organized and clean, but I can not get the information from the video and get the printscreen using the plugin class and uploaded.

  • Revision 6ce718eb18 : Merge "End of orientation zero group experiment" into experimental

    22 avril 2013, par Deb Mukherjee

    Changed Paths : Modify /vp9/decoder/vp9_decodframe.c Modify /vp9/encoder/vp9_encodemb.c Modify /vp9/encoder/vp9_rdopt.c Merge "End of orientation zero group experiment" into experimental

  • Revision f82c61b886 : Merge "make DC_PRED for i4x4 to use real pixels only" into experimental

    22 avril 2013, par Paul Wilkins

    Merge "make DC_PRED for i4x4 to use real pixels only" into experimental