Recherche avancée

Médias (1)

Mot : - Tags -/blender

Autres articles (74)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • 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 (...)

Sur d’autres sites (7286)

  • python opencv + ffmpeg makes cpu more busy

    15 juillet 2022, par shao wenzhi

    I use cv2 to read frames of local video, then use ffmpeg to push the stream to remote rtmp server.

    


    The command is :

    


    command = ['ffmpeg',
           '-y', '-an',
           '-f', 'rawvideo',
           # '-vcodec', 'rawvideo',
           '-pix_fmt', 'bgr24',
           '-s', sizeStr,
           '-r', '25',
           '-i', '-',
           # '-c:v', 'libx264',
           # '-pix_fmt', 'yuv420p',
           '-preset', 'ultrafast',
           '-f', 'flv',
           rtmp]


    


    I found that compared with pushing the video directly through ffmpeg, the CPU occupation of "cv2 + ffmpeg" is much more higher. which is : ffmpeg : 5% CPU, cv2 + ffmpeg : 18% CPU

    


    One possible cause is that cv2 turns the frame into BGR, and the ffmpeg turns it into RBG back again, because I found when I removed the option '-pix_fmt', 'bgr24', the CPU occupation drops into 5%, but the video pulled from server turns out to be strange, like this :

    


    enter image description here

    


    Is there any method to reduce the cost of converting BGR into RGB ??

    


  • avcodec : Suppress deprecation warnings from avcodec_alloc_frame()

    4 février 2014, par Diego Biurrun
    avcodec : Suppress deprecation warnings from avcodec_alloc_frame()
    

    The function is itself obsolete and slated for removal.

    • [DBH] libavcodec/utils.c
  • 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 ???