Recherche avancée

Médias (91)

Autres articles (64)

  • 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.

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (12580)

  • AJAX upload file with progres + FFMPEG progress

    24 octobre 2019, par Сергей Барахтенко

    The task is to implement the following :
    1. On the page there is a form for downloading a file, the file should be loaded asynchronously, without rebooting with the help of AJAX and displaying the upload progress
    2. If the file is successfully downloaded, send a command to the server, which should check the queue, and if the queue is empty, inform the client that the processing of the file has begun, then start the processing itself
    3. If processing has begun, then show the progress of this processing

    What did you manage to implement
    File upload was successfully implemented, after a successful upload, the server issues a line with the status successfully, and the full path of the downloaded file

    Upload JS snippet

    $.ajax({
       url: 'api/upload/load',
       type: 'post',
       data: fd,
       contentType: false,
       processData: false,
       xhr: function() {
           var xhr = new window.XMLHttpRequest();
           xhr.upload.addEventListener("progress", function(evt) {
               if (evt.lengthComputable) {
                   var percent = Math.ceil((evt.loaded / evt.total) * 100);
                   console.log(percent) // Upload progress
               }
           }, false);
           return xhr;
       },
       success: function(data){
           var response = JSON.parse(data);
           if(response.status == 'success'){
               //if upload success, run command
               startConversion(response.path)
           }
       }
    });

    Reponse from api/upload/load

    {"status":"success","path":"<path>"}
    </path>

    In the AJAX script, I do a check : if the response.status == ’success’, then we call the startConversion function, which takes the full path of the newly loaded file as an argument. This function sends another AJAX request to the server, where the queue check is in progress.

    startConversion JS Snippet

    function startConversion(path){
       $.ajax({
           url: '/api/upload/conversion',
           type: 'POST',
           data: { path: path },
           success: function(data){
               var response = JSON.parse(data);
               // if response.status == 'start', run checkConversion function
           }
       })

    Code /api/upload/conversion

    $queue = $this->model->getQueue();
    if($queue &lt; 5){
       // If queue is empty, notify browser
       $output = array('progress' => 'start');
       echo json_encode($output);
       // Then start shell_ecxec
       $cmd = 'some_command';
       shell_exec('ffmpeg.exe -i ' . $path . ' ' . $cmd . ' 1>log.txt 2>&amp;1 ');
    } else {
       $output = array('progress' => 'waiting');
       echo json_encode($output);
    }

    Here, for some reason, a message is already not being displayed stating that processing has begun (echo before $cmd)

    Full link

    And here the most interesting begins. It would seem that it would be possible in the method to success call the check on the status of the processing (start, queue or an error) and if the processing began to call the third function, which, again AJAX, polls the server returns the progress of the processing

    But in reality, the following happens : as soon as the second function sends the request, nothing is returned in response, but processing is in progress, and in the console it shows the status of the request - PENDING. As soon as the server completes processing, a response is issued from the server that the queue is empty and you can start processing the progress, although the processing has already been completed

    There are suggestions that further execution of the script is blocked by the command shell_exec() until the end of her work
    Also, it is not clear to me why the response from the server is not issued when the echo is clearly registered in it, and why the browser is waiting for the complete completion of the work shel_exec() because after it, the code does not have one. What should be done, that is, as if according to the logic of things and by the code, the server should give an answer in the form of a JSON string, the browser should show that the request has completed with the status of 200, and the server, in the meantime, should start the conversion, but for some reason this does not happen...

  • ffmpeg : append JPEG frames to the end of video

    5 novembre 2018, par Digital Wizard

    I need to append JPEG images to the end of existing video file using ffmpeg tool.
    Input images have same resolution as the video. No audio streams. As far as I understood from the documentation, it is possible with using a complex filter. Please help me to do it.

    For example I have :
    Input image : frame0.jpg
    Input video : slideshow.avi ; fps : 1
    Expected output video : out.avi

    And what about allocated virtual memory ? Does the output format affect required size of the RAM buffer for concatenation process ? For example if the video size is 1GB and output format is standard .avi, will it be loaded into RAM 1GB buffer entirely while processing ? What output format should I use to reduce RAM usage ? Is .flv more suitable ?

  • arm : Load mb_y properly in mbtree_propagate_list_internal_neon

    26 décembre 2016, par Martin Storsjö
    arm : Load mb_y properly in mbtree_propagate_list_internal_neon
    

    The previous version, attempting to load two stack parameters at once,
    only would have worked if they were interpreted and loaded as 32 bit
    elements, not when loading them as 16 bit elements.

    • [DH] common/arm/mc-a.S