Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (67)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, 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 (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (9815)

  • Kill an unresolved promise (or ignore and move on)

    17 septembre 2017, par Trees4theForest

    Using node child process exec, I’m calling a ffmpeg conversion via a promise that takes a bit of time. Each time the use clicks "next" it starts the FFMpeg command on a new file :

    function doFFMpeg(path){
     return new Promise((resolve, reject) => {
       exec('ffmpeg (long running command)', (error, stdout, stderr) => {
         if (error) {
           reject();
         }
       }).on('exit', (code) => { // Exit returns code 0 for good 1 bad
         if (code) {
           reject();
         } else {
           resolve();
         }
       });
     });
    }

    The problem is, if the user moves on to the next video before the promise is returned, I need to scrap the process and move on to converting the next video.

    How do I either :

    A) (Ideally) Cancel the current promised exec process*
    B) Let the current promised exec process complete, but just ignore that promise while I start a new one.

    *I realize that promise.cancel is not yet in ECMA, but I’d like to know of a workaround — preferably without using a 3rd party module / library.

    Attempt :

    let myChildProcess;

    function doFFMpeg(path){

     myChildProcess.kill();

     return new Promise((resolve, reject) => {
       myChildProcess = exec('ffmpeg (long running command)', (error, stdout, stderr) => {
         if (error) {
           reject();
         }
       }).on('exit', (code) => { // Exit returns code 0 for good 1 bad
         if (code) {
           reject();
         } else {
           resolve();
         }
       });
     });
    }
  • How to Play a Video file in javacv / javacpp

    28 mars 2017, par Floesmaan

    Does someone have some example code to play a simple video file with the current javaCPP/javaCV version and the FFmpegFrameGrabber ?

    I tried this solution, but its apparently too old and does not work with the current javacv version because of an incompatible FrameGrabber interface (returns a "Frame"-Object instead of an "IplImage"-Object). If I change the code manually (using Frame instead of IplImage), it returns the error message :

    java.lang.VerifyError: Bad type on operand stack
    Exception Details:
     Location:
       org/bytedeco/javacv/FFmpegFrameGrabber.startUnsafe()V @1291: invokespecial
     Reason:
       Type 'org/bytedeco/javacpp/avutil$AVFrame' (current frame, stack[2]) is not assignable to 'org/bytedeco/javacpp/Pointer'
     Current Frame:
       bci: @1291
       flags: { }
       locals: { 'org/bytedeco/javacv/FFmpegFrameGrabber', integer, 'org/bytedeco/javacpp/avformat$AVInputFormat', 'org/bytedeco/javacpp/avutil$AVDictionary', integer, 'org/bytedeco/javacpp/avcodec$AVCodec', integer, integer, integer, integer }
       stack: { uninitialized 1283, uninitialized 1283, 'org/bytedeco/javacpp/avutil$AVFrame' }
     Bytecode:
       0x0000000: 2a01 b500 332a bb00 8659 01b7 0087 b500............

    FYI : I’m comparing different java libraries for playing video files and extract their pixel data (xuggler, vlcj, ...) and search for the best one. I really like to include javacv in my tests but it’s not working :(

  • ffmpeg-python - checking if file is video

    14 avril 2021, par Gwen J

    How do I go about identifying if the file is an actual video media file ?
While doing a probe, it returns a 'codec_type' : 'video' even for a text file.

    


    vid_info = ffmpeg.probe(f'{filepath}/test.txt')['streams'];