Recherche avancée

Médias (91)

Autres articles (49)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (4940)

  • Reading live output from FFMPEG using PHP

    29 septembre 2018, par user561787

    the problem i’m dealing with is getting the shell output from a ffmpeg command while it’s being executed and writing it in an html page using php.

    After some research i found a very similar request here :Update page content from live PHP and Python output using Ajax, which seemed to be perfect, but it’s not working at all.

    The basic idea is to use an AJAX request to invoke the PHP script, which should execute the command and echo the live read content from the process, taking care to use this.readyState==3 (otherwise the JS script would receive the response only upon completion)

    For the PHP section i tried using the code in the answer above, (obviously adapted to my needs) :

    function liveExecuteCommand($command){

       while (@ ob_end_flush()); // end all output buffers if any

       $proc = popen($command, 'r');

       $live_output     = "";
       $complete_output = "";

       while (!feof($proc))
       {
           $live_output     = fread($proc, 4096);
           $complete_output = $complete_output . $live_output;
           echo "<pre>$live_output</pre>";
           @ flush();
       }

       pclose($proc);          

    }

    And for the AJAX section i used

    function getLiveStream(){


           var ajax = new XMLHttpRequest();
             ajax.onreadystatechange = function() {
               if (this.readyState == 3) {

                 document.getElementById("result").innerHTML = this.responseText;
               }              
           };          
           var url = 'process/getlive';
           ajax.open('GET', url,true);
           ajax.send();
      }

    Which sadly doesn’t work.

    The command being executed is this : 'ffmpeg.exe -i "C:/Users/BACKUP/Desktop/xampp/htdocs/testarea/test.mp4" -map 0:0 -map 0:1 -c:v libx264 -preset fast -crf 26 -c:a libmp3lame -ar 24000 -q:a 5 "C:\Users\BACKUP\Desktop\xampp\htdocs\testarea\output/test.mkv"', which i tested and it works.

    When i run the html page and the ajax script within, the ffmpeg command doesn’t even run, as i checked in task managet. It simply returns a blank text.

    When i run the php script by itself, the command runs, the file is converted but it doesn’t echo anything at all.

    After some more research i also found this page, which seems to be made for this exact purpose : https://github.com/4poc/php-live-transcode/blob/master/stream.php

    The relevant section is at the end, the code before is for dealing with options specific to ffmpeg. But it didn’t work either, with the same exact outcomes.

    Now i’m considering simply writing the output to a file and reading it from it dinamically, but i’d really like to know the reason why they both don’t work for me.

    EDIT : PHP Execute shell command asynchronously and retrieve live output answers to how to get content from a temporary file that is being written, not directly from the process.

  • ffmpeg-python outputs black screen when trying to save as mp4

    3 mars 2023, par Saya

    This is my code. I am trying to make a video out of all pictures in the pics2 directory using ffmpeg.

    &#xA;

    import subprocess&#xA;&#xA;command = &#x27;ffmpeg -framerate 1 -i "pics2/Image%02d.png" -r 1 -vcodec libx264 -s 1280x720 -pix_fmt yuv420p Output.mp4&#x27;&#xA;p = subprocess.call(command, shell=True)&#xA;

    &#xA;

    This saves an Output.mp4 successfully but the video has no frames (It is completely black)

    &#xA;

    How do I solve this ?

    &#xA;

  • Revision 866447a008 : webmdec : Fix for reaching eof in webm_guess_framerate Reset the reached_eos fla

    4 avril 2015, par Vignesh Venkatasubramanian

    Changed Paths :
     Modify /test/tools_common.sh


     Modify /test/vpxdec.sh


     Modify /webmdec.cc



    webmdec : Fix for reaching eof in webm_guess_framerate

    Reset the reached_eos flag in webm_guess_framerate in case it ends
    up consuming the entire file. Also adding a vpxdec shell test to
    verify this behavior.

    Change-Id : I371eebd2105231dc0f60e65da1f71b233ad14be5