Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (25)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (4584)

  • How to convert a javascript animation to video on the server-side using nodejs ?

    13 mai 2019, par user9964622

    I have a app where a user can create animations , I want to be able to convert these animations to video on server side, so user can save and share them eg YouTube, etc

    Here is what I have so far , animation created using create js and ffmpegserver.js.

    ffmpegserver.js.

    This is a simple node server and library that sends canvas frames to the server and uses FFmpeg to compress the video. It can be used standalone or with CCapture.js

    Test3.html

       



    <code class="echappe-js">&lt;body onload=&quot;init();&quot;&gt;

    Simple Tween Demo

    &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=&quot;https://cdnjs.cloudflare.com/ajax/libs/tween.js/17.2.0/Tween.js&quot;&gt;&lt;/script&gt;
    &lt;script src='http://stackoverflow.com/feeds/tag/test3.js'&gt;&lt;/script&gt;

    Test3.js

    /* eslint-disable eol-last */
    /* eslint-disable no-undef */
    /* eslint-disable quotes */
    var canvas, stage;
       function init() {
           var framesPerSecond = 60;
           var numFrames = framesPerSecond * 5; // a 5 second 60fps video
           var frameNum = 0;

           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("Download"));
             var container = document.getElementById("container").insertBefore(a, progressElem);

           }

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


           canvas = document.getElementById("testCanvas");
           stage = new createjs.Stage(canvas);
           var ball = new createjs.Shape();
           ball.graphics.setStrokeStyle(5, 'round', 'round');
           // eslint-disable-next-line quotes
           ball.graphics.beginStroke('#000000');
           ball.graphics.beginFill("#FF0000").drawCircle(0, 0, 50);
           ball.graphics.setStrokeStyle(1, 'round', 'round');
           ball.graphics.beginStroke('#000000');
           ball.graphics.moveTo(0, 0);
           ball.graphics.lineTo(0, 50);
           ball.graphics.endStroke();
           ball.x = 200;
           ball.y = -50;
           createjs.Tween.get(ball, {loop: -1})
               .to({x: ball.x, y: canvas.height - 55, rotation: -360}, 1500, createjs.Ease.bounceOut)
               .wait(1000)
               .to({x: canvas.width - 55, rotation: 360}, 2500, createjs.Ease.bounceOut)
               .wait(1000)
               .to({scaleX: 2, scaleY: 2}, 2500, createjs.Ease.quadOut)
               .wait(1000)
           stage.addChild(ball);
           createjs.Ticker.addEventListener("tick", stage);


           function render() {
               requestAnimationFrame(render);
               capturer.capture( canvas );

               ++frameNum;
               if (frameNum &lt; numFrames) {
               progressNode.nodeValue = "rendered frame# " + frameNum + " of " + numFrames;
               } else if (frameNum === numFrames) {
               capturer.stop();
               capturer.save(showVideoLink);
               }
           }

           render();
    }

    Everything works fine, you can test it yourself if you want by cloning the repo.

    Right now animation rendering happens in client side, I would like this animation rendering to happen in the backend side

    What do I need to change to make this animation rendering in backend server side using Nodejs ? any help or suggestions will be appreciated.

  • How to convert jquery animation to movie or gif format ?

    19 avril 2019, par Barış Demirdelen

    How to convert jquery animation to movie or gif format ?
    Animation and screenshot functions call or too slow.
    Help me please

    Animation Function

    function resim1(){
       $("#resim-1").animate({ left: leftx}, startEffectTime1);
       ......
    }

    ScreenShot Function but too slow

    function shot(){
             html2canvas($("#main"), {
                 onrendered: function(canvas) {
                     theCanvas = canvas;
                     document.body.appendChild(canvas);
                     Canvas2Image.saveAsPNG(canvas);
                     $("#img-out").append(canvas);
                 }
             });
    }

    Call animation and screenshot functions

    $(document).ready(function() {
        resim1(); // Animate start
        setInterval(function(){ // Screenshot start
             shot();
        },500);

    });

    Bottom function call animation breaking :/

    $(document).ready(function() {
        resim1(); // Animate start
        setInterval(function(){ // Screenshot start
             shot();
        },500);

    });
  • Animation rendering using Nodejs on backend server side

    17 février 2019, par user9964622

    I have simple animation created using create js and ffmpegserver.js.

    ffmpegserver.js.

    This is a simple node server and library that sends canvas frames to the server and uses FFmpeg to compress the video. It can be used standalone or with CCapture.js.

    Here is repo : video rendering demo.

    on folder public, I have demos eg test3.html and test3.js

    Test3.html

       



    <code class="echappe-js">&lt;body onload=&quot;init();&quot;&gt;

    Simple Tween Demo

    &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=&quot;https://cdnjs.cloudflare.com/ajax/libs/tween.js/17.2.0/Tween.js&quot;&gt;&lt;/script&gt;
    &lt;script src='http://stackoverflow.com/feeds/tag/test3.js'&gt;&lt;/script&gt;

    Test3.js

    /* eslint-disable eol-last */
    /* eslint-disable no-undef */
    /* eslint-disable quotes */
    var canvas, stage;
       function init() {
           var framesPerSecond = 60;
           var numFrames = framesPerSecond * 5; // a 5 second 60fps video
           var frameNum = 0;

           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("Download"));
             var container = document.getElementById("container").insertBefore(a, progressElem);

           }

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


           canvas = document.getElementById("testCanvas");
           stage = new createjs.Stage(canvas);
           var ball = new createjs.Shape();
           ball.graphics.setStrokeStyle(5, 'round', 'round');
           // eslint-disable-next-line quotes
           ball.graphics.beginStroke('#000000');
           ball.graphics.beginFill("#FF0000").drawCircle(0, 0, 50);
           ball.graphics.setStrokeStyle(1, 'round', 'round');
           ball.graphics.beginStroke('#000000');
           ball.graphics.moveTo(0, 0);
           ball.graphics.lineTo(0, 50);
           ball.graphics.endStroke();
           ball.x = 200;
           ball.y = -50;
           createjs.Tween.get(ball, {loop: -1})
               .to({x: ball.x, y: canvas.height - 55, rotation: -360}, 1500, createjs.Ease.bounceOut)
               .wait(1000)
               .to({x: canvas.width - 55, rotation: 360}, 2500, createjs.Ease.bounceOut)
               .wait(1000)
               .to({scaleX: 2, scaleY: 2}, 2500, createjs.Ease.quadOut)
               .wait(1000)
           stage.addChild(ball);
           createjs.Ticker.addEventListener("tick", stage);


           function render() {
               requestAnimationFrame(render);
               capturer.capture( canvas );

               ++frameNum;
               if (frameNum &lt; numFrames) {
               progressNode.nodeValue = "rendered frame# " + frameNum + " of " + numFrames;
               } else if (frameNum === numFrames) {
               capturer.stop();
               capturer.save(showVideoLink);
               }
           }

           render();
    }


     [1]: https://github.com/throne1986/video-rendering

    Everything works fine, you can test it yourself if you want by cloning the repo.

    Right now animation rendering happens in client side, I would like this animation rendering to happen in the backend side

    What do I need to change to make this animation rendering in backend server side using Nodejs ? any help or suggestions will be appreciated.