Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (35)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

Sur d’autres sites (7446)

  • ffmpeg - concatenate files while space constrained

    23 juillet 2023, par glodomorrapl

    Let's say i have a 2 TB drive. If i want to use ffmpeg to concatenate two files, they cannot be larger than 1 TB in total, otherwise I won't have enough storage space to save the output file.

    


    Is it possible for ffmpeg (or, perhaps, another tool) to losslessly concatenate two videos while also removing parts of the source files on the fly, allowing me to concatenate larger files ? The files in questions will be encoded with the ffv1 codec and saved as mkv, although I'm fine with trying different containers.

    


    Would saving files in smaller chunks to begin with be the only solution ?

    


  • Killing all child processes

    12 juin 2016, par ErraticFox

    I have written a onclick function that runs child process for a command line for ffmpeg. Though I can’t seem to force close or kill the process in the middle of it. I’ve tried multiple ways such as child.kill() along with SIGINT, SIGKILL, SIGHUP, SIGQUIT, and SIGTERM and it continuously runs in the background still until finished or killed in the task manager. So how can I kill all the process related to the exec ?

    Here’s my current code :

    function submitBtn() {
       var selectVal1 = $("#inputFile1 option:selected").val(),
           selectVal2 = $("#inputFile2 option:selected").val(),
           selectOpt2 = $("#inputFile2 option:selected").text().toLowerCase()

       if (!selectVal1 || !selectVal2) {
           Materialize.toast('Please select your formats', 4000)
       } else if ($("#uploadFile").val() === '') {
           Materialize.toast('Please select your file', 4000)
       } else {
           var process = require("child_process")
           var inputDir = uploadFile.files[0].path
           var dir = inputDir.split("\\")
           var pop = dir.pop()
           var outputDir = dir.join("\\")
           var cmd = `ffmpeg -y -i "${inputDir}" "${outputDir}\\output.${selectOpt2}"`

           $("#load").removeClass("disabledLoad")
           func = process.exec(cmd, function(error, stdout, stderr) {})

           func.on('exit', function() {
               $("document").ready(function() {
                   $("#load").addClass("disabledLoad")
                   Materialize.toast('Conversion compelete!', 4000)
               })
           })

       }
    }

    function exitBtn() {
       //var remote = require('electron').remote
       //var window = remote.getCurrentWindow()
       //window.close()
       func.kill()
    }

    I even tried renaming process to proc and then doing

       process.on('exit', function () {
       console.log('process is about to exit, kill ffmpeg');
       func.kill()
    })

    in exitBtn but still nothing. It doesn’t give errors or log my string I put.

  • Are avcodec_send_packet and avcodec_receive_frame thread safe ?

    6 novembre 2022, par nckm

    I am trying to implement video decoding application with libav decoder.
Most libav examples are built like this (pseudocode) :

    


    while true {
    auto packet = receive_packet_from_network();
    avcodec_send_packet(packet);
    auto frame = alloc_empty_frame();
    int r = avcodec_receive_frame(&frame);
    if (r==0) {
        send_to_render(frame);
    }
}


    


    Above is pseudocode.
Anyway, with this traditional cycle, when I wait receive frame complete and then wait rendering complete and then wait next data received from network incoming decoder buffer becomes empty. No HW decoder pipeline, low decode performance.
Additional limitation in my application - I know exactly that one received packet from network directly corresponds to one decoded frame.

    


    Besides that, I would like to make solution faster. For that I want to split this cycle into 2 different threads like this :

    


    //thread one
while true {
    auto packet = receive_packet_from_network();
    avcodec_send_packet(packet);
}
//thread two
while true {
    auto frame = alloc_empty_frame();
    int r = avcodec_receive_frame(&frame);
    if (r==0) {
        send_to_render(frame);
    }


    


    Purpose to split cycle into 2 different threads is to keep incoming decoder buffer always feed enough, mostly full. Only in that case I guess HW decoder I expect to use will be happy to work constantly pipelined. Of cause, I need thread synchronization mechanisms, not shown here just for simplicity. Of cause when EGAIN is returned from avcodec_send_packet() or avcodec_receive_frame() I need to wait for other thread makes its job feeding incoming buffer or fetching ready frames. That is another story.

    


    Besides that, this threading solution does not work for me with random segmentation faults. Unfortunately I cannot find any libav documentation saying explicitly if such method is acceptable or not, are avcodec_send_packet() and avcodec_receive_frame() calls thread safe or not ?

    


    So, what is best way to load HW decoder pipeline ? For me it is obvious that traditional poll cycles shown in any libav examples are not effective.