Recherche avancée

Médias (91)

Autres articles (45)

  • 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

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (9818)

  • How to render animation using Javascript ?

    30 novembre 2018, par user9964622

    I have created animation using tweenjs and createjs libraries createjs and tweenjs, createjs now, I’d like to convert these animations to video files (MPEG4, or other, doesn’t matter) or how can I render it in the backend using nodejs ?

    Here is the solution I have tried so far using ffmpeg server

    test4.js

    (function () {
       "use strict";

       var framesPerSecond = 60;
       var numFrames = 20; //framesPerSecond * 60 * 2;
       var thickness = 100;
       var speed = 4;
       var frameNum = 0;

       var canvas = document.getElementById("c");
       var ctx = canvas.getContext("2d");
       canvas.width = 500;
       canvas.height = 500;

       var progressElem = document.getElementById("progress");
       var progressNode = document.createTextNode("");
       progressElem.appendChild(progressNode);

       function onProgress(progress) {
         progressNode.nodeValue = (progress * 100).toFixed(1) + "%";
       }

       function showVideoLink(url, size) {
         size = size ? (" [size: " + (size / 1024 / 1024).toFixed(1) + "meg]") : " [unknown size]";
         var a = document.createElement("a");
         a.href = url;
         var filename = url;
         var slashNdx = filename.lastIndexOf("/");
         if (slashNdx >= 0) {
           filename = filename.substr(slashNdx + 1);
         }
         a.download = filename;
         a.appendChild(document.createTextNode(url + size));
         document.body.appendChild(a);
       }

       var capturer = new CCapture( {
         format: 'ffmpegserver',
         //workersPath: "3rdparty/",
         //format: 'gif',
         verbose: false,
         framerate: framesPerSecond,
         onProgress: onProgress,
         //extension: ".mp4",
         //codec: "libx264",
       } );
       capturer.start();

       function render() {

         var stage = new createjs.Stage("c");
         var circle = new createjs.Shape();
         circle.graphics.beginFill("Crimson").drawCircle(0, 0, 50);
         circle.x = 100;
         circle.y = 100;
         stage.addChild(circle);
         createjs.Tween.get(circle, {loop: true})
           .to({x: 400}, 1000, createjs.Ease.getPowInOut(4))
           .to({alpha: 0, y: 75}, 500, createjs.Ease.getPowInOut(2))
           .to({alpha: 0, y: 125}, 100)
           .to({alpha: 1, y: 100}, 500, createjs.Ease.getPowInOut(2))
           .to({x: 100}, 800, createjs.Ease.getPowInOut(2));
         createjs.Ticker.setFPS(60);
         createjs.Ticker.addEventListener("tick", stage);
         capturer.capture(canvas);

         ++frameNum;
         if (frameNum === numFrames) {
           capturer.stop();
           capturer.save(showVideoLink);
         } else {
           requestAnimationFrame(render);
         }
       }
       requestAnimationFrame(render);
     }());

    here is html test4.html

     
       
     
     
       <canvas></canvas>
       <div>-</div>
     
     <code class="echappe-js">&lt;script src=&quot;http://localhost:8081/ffmpegserver/CCapture.js&quot;&gt;&lt;/script&gt;

    &lt;script src=&quot;http://localhost:8081/ffmpegserver/ffmpegserver.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://code.createjs.com/1.0.0/createjs.min.js&quot;&gt;&lt;/script&gt;
    &lt;script src='http://stackoverflow.com/feeds/tag/test4.js'&gt;&lt;/script&gt;

    when I run my app, it renders very quickly and when I download the converted mp4 file it contains zero MB.

    for reference, u can test by just cloning this repo ffmpeg server repository and add the above files to the public folder

    What am I doing wrong in my code ???

  • avformat/matroskadec : Improve length check

    27 mars 2019, par Andreas Rheinhardt via ffmpeg-devel
    avformat/matroskadec : Improve length check
    

    The earlier code had three flaws :

    1. The case of an unknown-sized element inside a finite-sized element
    (which is against the specifications) was not caught.

    2. The error message wasn't helpful : It compared the length of the child
    with the offset of the end of the parent and claimed that the first
    exceeds the latter, although that is not necessarily true.

    3. Unknown-sized elements that are not parsed can't be skipped. Given
    that according to the Matroska specifications only the segment and the
    clusters can be of unknown-size, this is handled by not allowing any
    other units to have infinite size whereas the earlier code would seek
    back by 1 byte upon encountering an infinite-size element that ought
    to be skipped.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/matroskadec.c
  • How to render animation using capturejs ?

    30 novembre 2018, par user9964622

    I have created animation using tweenjs and createjs libraries createjs and tweenjs,createjs now, I’d like to convert these animations to video files (MPEG4, or other, doesn’t matter) or how can I render it in the backend using nodejs ?

    Here is the solution I have tried so far using [ffmpeg server][2]

    test4.js

    (function () {
       "use strict";

       var framesPerSecond = 60;
       var numFrames = 20; //framesPerSecond * 60 * 2;
       var thickness = 100;
       var speed = 4;
       var frameNum = 0;

       var canvas = document.getElementById("c");
       var ctx = canvas.getContext("2d");
       canvas.width = 500;
       canvas.height = 500;

       var progressElem = document.getElementById("progress");
       var progressNode = document.createTextNode("");
       progressElem.appendChild(progressNode);

       function onProgress(progress) {
         progressNode.nodeValue = (progress * 100).toFixed(1) + "%";
       }

       function showVideoLink(url, size) {
         size = size ? (" [size: " + (size / 1024 / 1024).toFixed(1) + "meg]") : " [unknown size]";
         var a = document.createElement("a");
         a.href = url;
         var filename = url;
         var slashNdx = filename.lastIndexOf("/");
         if (slashNdx >= 0) {
           filename = filename.substr(slashNdx + 1);
         }
         a.download = filename;
         a.appendChild(document.createTextNode(url + size));
         document.body.appendChild(a);
       }

       var capturer = new CCapture( {
         format: 'ffmpegserver',
         //workersPath: "3rdparty/",
         //format: 'gif',
         verbose: false,
         framerate: framesPerSecond,
         onProgress: onProgress,
         //extension: ".mp4",
         //codec: "libx264",
       } );
       capturer.start();

       function render() {

         var stage = new createjs.Stage("c");
         var circle = new createjs.Shape();
         circle.graphics.beginFill("Crimson").drawCircle(0, 0, 50);
         circle.x = 100;
         circle.y = 100;
         stage.addChild(circle);
         createjs.Tween.get(circle, {loop: true})
           .to({x: 400}, 1000, createjs.Ease.getPowInOut(4))
           .to({alpha: 0, y: 75}, 500, createjs.Ease.getPowInOut(2))
           .to({alpha: 0, y: 125}, 100)
           .to({alpha: 1, y: 100}, 500, createjs.Ease.getPowInOut(2))
           .to({x: 100}, 800, createjs.Ease.getPowInOut(2));
         createjs.Ticker.setFPS(60);
         createjs.Ticker.addEventListener("tick", stage);
         capturer.capture(canvas);

         ++frameNum;
         if (frameNum === numFrames) {
           capturer.stop();
           capturer.save(showVideoLink);
         } else {
           requestAnimationFrame(render);
         }
       }
       requestAnimationFrame(render);
     }());

    here is html test4.html

     
       
     
     
       <canvas></canvas>
       <div>-</div>
     
     <code class="echappe-js">&lt;script src=&quot;http://localhost:8081/ffmpegserver/CCapture.js&quot;&gt;&lt;/script&gt;

    &lt;script src=&quot;http://localhost:8081/ffmpegserver/ffmpegserver.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://code.createjs.com/1.0.0/createjs.min.js&quot;&gt;&lt;/script&gt;
    &lt;script src='http://stackoverflow.com/feeds/tag/test4.js'&gt;&lt;/script&gt;

    [1] : https://createjs.com/getting-started
    [2] : https://github.com/greggman/ffmpegserver.js

    when I run my app, it renders very quickly and when I download the converted mp4 file it contains zero MB.

    for reference, u can test by just cloning this repo ffmpeg server repository and add the above files to the public folder

    What am I doing wrong in my code ???