Recherche avancée

Médias (0)

Mot : - Tags -/serveur

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (68)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (7271)

  • Why FFMPEG's -movflags faststart parameter makes empty files when output is over network drives ?

    23 septembre 2013, par bokan

    I made an application that uses ffmpeg to compress video files. There are 3 computers crunching the files from and to a Synology NAS.

    Everything works great, but if I add the parameter "-movflags faststart" the resulting file ends being 0Kb.

    The same commands works well if output file is on local hard drive.

    I need this parameter to move the moov atom at the begining so making the file suitable for progressive download.

  • php stream any mp4

    3 avril 2012, par GRaecuS

    I'm developing a web app that converts videos and allows to play them through Flowplayer.

    On the current status, I use ffmpeg to convert the videos to mp4 and qtfaststart to fix their metadata for streaming. Everything is working smoothly as I can download any converted mp4 and view it correctly.

    For serving the videos to Flowplayer, I use a php file which contains the following (summarized) code :

    header("Content-Type: {$mediatype}");

    if ( empty($_SERVER['HTTP_RANGE']) )
    {
       if ( $filetype == 'flv' && $seekPos != 0 )
       {
           header("Content-Length: " . ($filesize + 13));
           print('FLV');
           print(pack('C', 1));
           print(pack('C', 1));
           print(pack('N', 9));
           print(pack('N', 9));
       }
       else
       {          
           header("Content-Length: {$filesize}");
       }

       $fh = fopen($filepath, "rb") or die("Could not open file: {$filepath}");

       # seek to requested file position
       fseek($fh, $seekPos);

       # output file
       while(!feof($fh))
       {
           # output file without bandwidth limiting
           echo fread($fh, $filesize);
       }
       fclose($fh);
    }
    else //violes rfc2616, which requires ignoring  the header if it's invalid
    {  
       $fp = @fopen($file, 'rb');

       $size   = filesize($file); // File size
       $length = $size;           // Content length
       $start  = 0;               // Start byte
       $end    = $size - 1;       // End byte
       // Now that we've gotten so far without errors we send the accept range header
       /* At the moment we only support single ranges.
        * Multiple ranges requires some more work to ensure it works correctly
        * and comply with the spesifications: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.2
        *
        * Multirange support annouces itself with:
        * header('Accept-Ranges: bytes');
        *
        * Multirange content must be sent with multipart/byteranges mediatype,
        * (mediatype = mimetype)
        * as well as a boundry header to indicate the various chunks of data.
        */
       header("Accept-Ranges: 0-$length");
       // header('Accept-Ranges: bytes');
       // multipart/byteranges
       // http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.2
       if (isset($_SERVER['HTTP_RANGE']))
       {
           $c_start = $start;
           $c_end   = $end;
           // Extract the range string
           list(, $range) = explode('=', $_SERVER['HTTP_RANGE'], 2);
           // Make sure the client hasn't sent us a multibyte range
           if (strpos($range, ',') !== false)
           {
               // (?) Shoud this be issued here, or should the first
               // range be used? Or should the header be ignored and
               // we output the whole content?
               header('HTTP/1.1 416 Requested Range Not Satisfiable');
               header("Content-Range: bytes $start-$end/$size");
               // (?) Echo some info to the client?
               exit;
           }
           // If the range starts with an '-' we start from the beginning
           // If not, we forward the file pointer
           // And make sure to get the end byte if spesified
           if ($range0 == '-')
           {

               // The n-number of the last bytes is requested
               $c_start = $size - substr($range, 1);
           }
           else
           {
               $range  = explode('-', $range);
               $c_start = $range[0];
               $c_end   = (isset($range[1]) && is_numeric($range[1])) ? $range[1] : $size;
           }
           /* Check the range and make sure it's treated according to the specs.
            * http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
            */
           // End bytes can not be larger than $end.
           $c_end = ($c_end > $end) ? $end : $c_end;
           // Validate the requested range and return an error if it's not correct.
           if ($c_start > $c_end || $c_start > $size - 1 || $c_end >= $size)
           {
               header('HTTP/1.1 416 Requested Range Not Satisfiable');
               header("Content-Range: bytes $start-$end/$size");
               // (?) Echo some info to the client?
               exit;
           }
           $start  = $c_start;
           $end    = $c_end;
           $length = $end - $start + 1; // Calculate new content length
           fseek($fp, $start);
           header('HTTP/1.1 206 Partial Content');
       }

       // Notify the client the byte range we'll be outputting
       header("Content-Range: bytes $start-$end/$size");
       header("Content-Length: $length");

       // Start buffered download
       $buffer = 1024 * 8;
       while(!feof($fp) && ($p = ftell($fp)) <= $end)
       {
           if ($p + $buffer > $end)
           {
               // In case we're only outputtin a chunk, make sure we don't
               // read past the length
               $buffer = $end - $p + 1;
           }
           set_time_limit(0); // Reset time limit for big files
           echo fread($fp, $buffer);
           flush(); // Free up memory. Otherwise large files will trigger PHP's memory limit.
       }

       fclose($fp);
    }

    Unfortunately, it is working only for the majority of the videos. For some of them, Flowplayer keeps returning Error 200, even though they were encoded correctly.

    How can I fix this ? Is it a coding problem or those videos are faulty ?

  • Where to find ffserver static for linux

    29 mai 2013, par sajad

    I need just to download ffserver static file for using in linux(ubuntu 12.04 x64), with libx264 library. I don't want to challenge compilation task on Linux and have just a portable static file. I have spent long time searching for that. Can anybody guide me ?