Recherche avancée

Médias (91)

Autres articles (54)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (10397)

  • configure : Don’t require nonfree for nvenc

    23 avril 2016, par Timo Rothenpieler
    configure : Don’t require nonfree for nvenc
    

    As the nvEncodeApi.h header is now MIT licensed, this can be dropped.
    The loaded CUDA and NVENC libraries are part of the nvidia driver, and
    thus count as system libraries.

    • [DH] configure
  • 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 ?