Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (111)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (6195)

  • How can I mux (or encapsulate) H.264 RTP output into a container using FFMPEG ?

    7 octobre 2013, par Grad

    I am working on the effects of network losses in video transmission. In order to simulate the network losses I use a simple program which drops random RTP packets from the output of H.264 RTP encoding.

    I use Joint Model (JM) 14.2 in order to encode the video. However, I don't use AnnexB format as my output, instead I choose the output as RTP packets. The JM output is generated as RTP packets with RTP headers and payload as a sequence. After that, some of RTP packets are dropped by using a simple program. Then, I can decode the output bitstream by using also JM and it's error concealment methods.

    The main purpose of this process is to evaluate the differences created by network losses on the human video quality perception. In order to measure the perceived quality, the shown video must be in its decoded form (i.e. full resolution) or it can be decodable at the receiver side. The RTP packets created by the JM Encoder cannot be decoded without the JM software installed. However, with the proper header (or container) most video players are able to decode the bitstream. So, the my goal in this question is to encapsulate my encoded RTP packet bitstream in a common container such as AVI or MP4 to have my content decodable at the receiver computer.

    The format of the encoded bitstream in RTP packetized form is as follows :

        ----------------------------------------------------------------------
        | RTP Header #1 | RTP Payload #1 | RTP Header #2 | RTP Payload #2 |...
        ----------------------------------------------------------------------

    In order to find the video quality, I want to make a subjective test with these bitstreams. I can make these test by using the full resolution data decoded by myself whereas it's very inconvenient to crowdsource this subjective test with GBs of video data on the Internet. So, I want to mux these bitstreams into a container (i.e. AVI) by using FFMPEG. I have tried to decode these bitstreams with FFMPEG and FFPLAY ; however, both of them didn't work. I also tried the following command and it didn't work, either.

       ffmpeg - f h264 -i  -vcodec copy -r 25 out.avi

    Which format or muxer should I use ? Do I need to convert these files to any other format ?

  • How to solve issue for converting ismv file of h264 video codec and aac audio codec ?

    4 octobre 2013, par Priyal

    I want to convert transmux ismv file to mp4 format. ISMV file is encoded withe the following ffmpeg detail :

      Metadata:
      major_brand     : isml
      minor_version   : 1
      compatible_brands: piffiso2
      creation_time   : 2013-10-03 14:10:41
      Duration: 15:21:13.16, start: 0.000000, bitrate: 41 kb/s
      Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64
                        kb/s (default)
      Metadata:
      creation_time   : 2013-10-03 14:10:41
      handler_name    : Audio
      Stream #0:1(und): Video: h264 (avc1 / 0x31637661), 1280x720, 3217 kb/s, 29.9
                        7 tbr, 10000k tbn, 20000k tbc (default)
    Metadata:
      creation_time   : 2013-10-03 14:10:41
      handler_name    : Video
      Stream #0:2(und): Data: none (dfxp / 0x70786664), 32 kb/s (default)
      Metadata:
      creation_time   : 2013-10-03 14:10:41
      handler_name    : Text

    I used the following ffmpeg command to transmux :

    ffmpeg -y -ss 00:00:10 -i Encoder1.ismv -vcodec libx264 -ar 44100 -t 40 -preset slow -qp 0  
    Encoder.mp4

    I got output as :

    ffmpeg version N-56010-g54d628a Copyright (c) 2000-2013 the FFmpeg developers
    built on Sep  4 2013 00:44:27 with gcc 4.7.3 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
    ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
    ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
    eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
    amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
    enable-libxvid --enable-zlib
        libavutil      52. 43.100 / 52. 43.100
        libavcodec     55. 31.100 / 55. 31.100
        libavformat    55. 16.100 / 55. 16.100
        libavdevice    55.  3.100 / 55.  3.100
        libavfilter     3. 83.102 /  3. 83.102
        libswscale      2.  5.100 /  2.  5.100
        libswresample   0. 17.103 /  0. 17.103
        libpostproc    52.  3.100 / 52.  3.100
    [aac @ 040f1ba0] TYPE_FIL: Input buffer exhausted before END element found
    [h264 @ 00353120] AVC: nal size -729776398
    [h264 @ 00353120] no frame!
    [h264 @ 00353120] AVC: nal size -570515285
    [h264 @ 00353120] no frame!
    [h264 @ 00353120] AVC: nal size -1477874754
    [h264 @ 00353120] no frame!
    [h264 @ 00353120] AVC: nal size -712314563
    [h264 @ 00353120] no frame!
    [h264 @ 00353120] AVC: nal size -23151524
    [h264 @ 00353120] no frame!
    [h264 @ 00353120] AVC: nal size -592499201
    [h264 @ 00353120] no frame!
    [h264 @ 00353120] AVC: nal size 225768173
    [h264 @ 00353120] no frame!
    [h264 @ 00353120] AVC: nal size 698187359
    [h264 @ 00353120] AVC: nal size 635127544
    [h264 @ 00353120] no frame!
    [h264 @ 00353120] AVC: nal size -1242688339
    [h264 @ 00353120] AVC: nal size 269543071
    [h264 @ 00353120] no frame!
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0035e840] decoding for stream 1 failed
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0035e840] Could not find codec parameters for stream
     1 (Video: h264 (avc1 / 0x31637661), 1280x720, 3217 kb/s): unspecified pixel form
     at Consider increasing the value for the 'analyzeduration' and 'probesize' options
     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\inetpub\media\archives\DEFAULT WEB S
     ITE\PushToPUblishPoint\Eagan_12034_Soccer_3-10-2013_14_10_19-isml\2013-10-03-14-
     10-35-436\Segment001\Encoder1.ismv':
      Metadata:
      major_brand     : isml
      minor_version   : 1
      compatible_brands: piffiso2
      creation_time   : 2013-10-03 14:10:41
      Duration: 15:21:13.16, start: 0.000000, bitrate: 41 kb/s
      Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64
                        kb/s (default)
       Metadata:
      creation_time   : 2013-10-03 14:10:41
      handler_name    : Audio
      Stream #0:1(und): Video: h264 (avc1 / 0x31637661), 1280x720, 3217 kb/s, 29.9
                        7 tbr, 10000k tbn, 20000k tbc (default)
      Metadata:
      creation_time   : 2013-10-03 14:10:41
      handler_name    : Video
      Stream #0:2(und): Data: none (dfxp / 0x70786664), 32 kb/s (default)
      Metadata:
      creation_time   : 2013-10-03 14:10:41
      handler_name    : Text

    [buffer @ 04679480] Unable to parse option value "-1" as pixel format
                  Last message repeated 1 times
    [buffer @ 04679480] Error setting option pix_fmt to value -1.
    [graph 0 input from stream 0:1 @ 040f7380] Error applying options to the filter.

    Error opening filters!

    Please suggest the solution for Windows OS

  • what is the good function php to deal with ffmpeg and progress bar [duplicate]

    17 mai 2014, par Abed Soliman

    This question already has an answer here :

    I ask about ffmpeg and progressbar

    I used exec function with ffmpeg and output the result to txt file

    and using some of code I found here to

    <center>



       &lt;?php

       define('RAPIDLEECH', 'yes');
       define('CONFIG_DIR', 'configs/');
       require_once('configs/config.php');
       define ( 'TEMPLATE_DIR', 'templates/'.$options['template_used'].'/' );
       // Include other useful functions
       require_once('classes/other.php');
       error_reporting(0);

       login_check();

       include(TEMPLATE_DIR.'header.php');

       echo ('<br /><br /><br /><b>AudioXtractor</b>, un complemento <br /> que te permite extraer el audio de tus videos.<br /><br /><br />');

       putenv('GDFONTPATH=' . realpath('.')); ?>

       <br />

       <form method="post"><center>
       <table>
         <td>Movie:
       <select>

       &lt;?php
       $exts=array(".ac3", ".avi", ".f4v", ".flv", ".mkv", ".mov", ".mp4", ".mpg", ".mpeg", ".rmvb", ".srt", ".swf", ".wav", ".wmv");
       $ext="";
       function vidlist($dir)
       {
       $results = array();
       $handler = opendir($dir);
       while ($file = readdir($handler))
       {
       if (strrchr($file,'.')!="")
       {
       $ext=strtolower(strrchr($file,'.'));
       }
       if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; in_array($ext,$GLOBALS["exts"]))
       {
       $results[] = $file;
       }
       }
       closedir($handler);
       sort($results);
       return $results;
       }
       function Output($command) {
       $output = array($command);
       exec($command.' 2>&amp;1', $output);
       return ($output);
       }
       $files = vidlist("./files/");
       foreach($files as $file)
       {
           echo '<option value="'.$file.'">'.$file.'</option>';
       }

       ?>


       </select></td></table>

       <br /> >
       New MP3's name:
       <input type="text" value="nuevoaudio" />
       <br /> >
       <br />
       <br />

       <center><input type="submit" style="font-size:16px; font-weight:bold; cursor:pointer;" value="Extract" />
       

       </center></center></form>


       &lt;?php
       if ($_POST['video']!="")

           $video = 'files/';
           $video=array();    
           $video[0] = $_POST['video'];

       if ($_POST['nvdo']!="")

           $nvdo = 'files/';
           $nvdo=array();      
           $nvdo[0] = $_POST['nvdo'];



       foreach ($video as $vdo)
       foreach ($nvdo as $nvd)

       if (isset($_POST["analize"])) {

           exec("ffmpeg -i files/$vdo -ab 192k files/$nvd.mp3 -y 2> files/$nvd.txt");

           $ext=strtolower(strrchr($vdo,'.'));

       /////////////////////////////////////////////////////my code //////////////////////////////////////////

       $content = @file_get_contents("files/$nvd.txt");


           //get duration of source
           preg_match("/Duration: (.*?), start:/", $content, $matches);

           $rawDuration = $matches[1];

           //rawDuration is in 00:00:00.00 format. This converts it to seconds.
           $ar = array_reverse(explode(":", $rawDuration));
           $duration = floatval($ar[0]);
           if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
           if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;

           //get the time in the file that is already encoded
           preg_match_all("/time=(.*?) bitrate/", $content, $matches);

           $rawTime = array_pop($matches);

           //this is needed if there is more than one match
           if (is_array($rawTime)){$rawTime = array_pop($rawTime);}

           //rawTime is in 00:00:00.00 format. This converts it to seconds.
           $ar = array_reverse(explode(":", $rawTime));
           $time = floatval($ar[0]);
           if (!empty($ar[1])) $time += intval($ar[1]) * 60;
           if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;

           //calculate the progress
           $progress = round(($time/$duration) * 100);




           echo '<br /><br />¡Su video fue convertido correctamente! <br /><br />Link al archivo:';

           echo ' <a href="http://stackoverflow.com/feeds/tag/files/'.$nvd.'.mp3">'.$nvd.'.mp3</a><br />' . "<br />";
           echo "Duration: " . $duration . "<br />";
           echo "Current Time: " . $time . "<br />";
           echo "Progress: " . $progress . "%" . "<br />";

       //////////////////////////////////////my coed //////////////////////////////////////////////
       }

       ?>
       <br /><br /><a href="http://stackoverflow.com/feeds/tag/index.php">Volver al RapidLeech</a>

       <br /><br /><br />Formatos Aceptados: <br /><b>.ac3, .avi, .f4v, .flv, .mkv, .mov, .mp3,<br /> .mp4, .mpg, .mpeg, .rmvb, .srt, .swf, .wav, .wmv</b>
       <br /><br />
       </center>

       &lt;?php



       ?>

    so i ask some one he told me the exec stop php script and never give me

    You can't get the progress directly if you are using exec, because the php script is stopped until ffmpeg closes. (Because exec returns the whole execution output)

    You should use popen, for being able to get the output from the process in real time (without reading any file) for parse and show the progressbar

    Here is a example for get the output:

    When you get the progress info from ffmpeg, you can use your code for parse it and show your progressbar

    this is my popen script

    &lt;?php

    $handle = popen ("ffmpeg.exe -i files/fz.mp4 -ab 192k files/vdf.mp3 2>&amp;1 ", 'r');
    $handles = (string)$handle;
    $line = "";

    while (false !== ($char = fgetc($handle)))
    {
     if ($char == "\r")
     {
       // You could now parse the $line for status information.
       echo "$line\n";
       $line = "";
     } else {
       $line .= $char;
     }
     ob_flush();
     flush();
    }
    pclose ($handle);


       //get duration of source
       preg_match("/Duration: (.*?), start:/", $handles, $matches);

       $rawDuration = $matches[1];

       //rawDuration is in 00:00:00.00 format. This converts it to seconds.
       $ar = array_reverse(explode(":", $rawDuration));
       $duration = floatval($ar[0]);
       if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
       if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;

       //get the time in the file that is already encoded
       preg_match_all("/time=(.*?) bitrate/", $handles, $matches);

       $rawTime = array_pop($matches);

       //this is needed if there is more than one match
       if (is_array($rawTime)){$rawTime = array_pop($rawTime);}

       //rawTime is in 00:00:00.00 format. This converts it to seconds.
       $ar = array_reverse(explode(":", $rawTime));
       $time = floatval($ar[0]);
       if (!empty($ar[1])) $time += intval($ar[1]) * 60;
       if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;

       //calculate the progress
       $progress = round(($time/$duration) * 100);




       echo '<br /><br />¡Su video fue convertido correctamente! <br /><br />Link al archivo:';


       echo "Duration: " . $duration . "<br />";
       echo "Current Time: " . $time . "<br />";
       echo "Progress: " . $progress . "%" . "<br />";

    //////////////////////////////////////my coed //////////////////////////////////////////////

    ?>

    so i dont under stand what is good for ffmpeg progressbAR

    is exec or popen

    so please give me hints for ffmpeg real time progressbar

    what is good for progressbar

    is html5 progress bar

    or javascript progress bar