Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (16)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (3661)

  • When I use Fluent-Ffmpeg to access Ffmpeg, there are two different threads but I dont want it

    25 mars 2019, par Ahmet Hakan Billur

    I try to broadcast with rtsp live stream from IP camera on web app that is improved with node.js-jsmpeg([a link]https://www.npmjs.com/package/fluent-ffmpeg !), web socket, html5(canvas).Everything ok that live streaming works but missing frame and high CPU usaged by streaming on web app and I try to reduce so I can intervene ffmpeg with fluent-ffmpeg but when I monitor CPU usaged I can see there 2 different threads following as and look at screenshot of CPU ;
    enter image description here

    ffmpeg -rtsp_trasport tcp -i rtsp ://10.6.0.225 -f mpeg1video - is worked by jsmpeg and canvas/html5
    index.html

       

       
       
       
       

       <div><canvas width="640" height="360"></canvas></div>
       div><canvas width="640" height="360"></canvas>  
       <code class="echappe-js">&lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsLib/jsmpeg.js'&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsLib/ffmpegUtil.js'&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
         var canvas = document.getElementById('videoCanvas');<br />
         var ws = new WebSocket(&quot;ws://10.6.0.206:9999&quot;)<br />
         var player = new jsmpeg(ws, {canvas:canvas, autoplay:true,audio:false,loop: true});<br />
       &lt;/script&gt;

    other one /usr/bin/ffmpeg -i rtsp ://10.6.0.225 -y out.ts is work by following piece of code in app.js

    Stream = require('node-rtsp-stream');
    stream = new Stream({
       name: 'name',
       streamUrl: 'rtsp://10.6.0.225',
       wsPort: 9999
    });

    var ffmpeg = require('fluent-ffmpeg');
    var proc = new ffmpeg();

    proc
    .addInput('rtsp://10.6.0.225')
    .on('start', function(ffmpegCommand) {
       /// log something maybe
       console.log('start-->'+ffmpegCommand)
    })
    .on('progress', function(data) {
       /// do stuff with progress data if you want
       console.log('progress-->'+data)
    })
    .on('end', function() {
       /// encoding is complete, so callback or move on at this point
       console.log('end-->')
    })
    .on('error', function(error) {
       /// error handling
       console.log('error-->'+error)

    })
    .output('out.ts')
    .run();

    and then I don’t want to get two different ffmpeg command threads in there.
    Does anyone have an idea ?
    Thanks in advice.

  • HTML Video Exporting Using MediaRecorder vs ffmpeg.js

    3 octobre 2020, par Owen Ovadoz

    TLDR

    &#xA;

    Imagine I have one video and one image. I want to create another video that overlays the image (e.g. watermark) at the center for 2 seconds in the beginning of the video and export it as the final video. I need to do this on the client-side only. Is it possible to use MediaRecorder + Canvas or should I resort to using ffmpeg.js ?

    &#xA;

    Context

    &#xA;

    I am making a browser-based video editor where the user can upload videos and images and combine them. So far, I implemented this by embedding the video and images inside a canvas element appropriately. The data representation looks somewhat like this :

    &#xA;

    video: {&#xA;  url: &#x27;https://archive.com/video.mp4&#x27;,&#xA;  duration: 34,&#xA;},&#xA;images: [{&#xA;  url: &#x27;https://archive.com/img1.jpg&#x27;,&#xA;  start_time: 0,&#xA;  end_time: 2,&#xA;  top: 30,&#xA;  left: 20,&#xA;  width: 50,&#xA;  height: 50,&#xA;}]&#xA;

    &#xA;

    Attempts

    &#xA;

      &#xA;
    1. I play the video and show/hide images in the canvas. Then, I can use the MediaRecorder to capture the canvas' stream and export it as a data blob at the end. The final output is as expected, but the problem with this approach is I need to play the video from the beginning to the end for me to capture the stream from the canvas. If the video is 60 seconds, exporting it also takes 60 seconds.
    2. &#xA;

    &#xA;

    &#xD;&#xA;
    &#xD;&#xA;
    function record(canvas) {&#xA;  return new Promise(function (res, rej) {&#xA;    const stream = canvas.captureStream();&#xA;    const mediaRecorder = new MediaRecorder(stream);&#xA;    const recordedData = [];&#xA;&#xA;    // Register recorder events&#xA;    mediaRecorder.ondataavailable = function (event) {&#xA;      recordedData.push(event.data);&#xA;    };&#xA;    mediaRecorder.onstop = function (event) {&#xA;      var blob = new Blob(recordedData, {&#xA;        type: "video/webm",&#xA;      });&#xA;      var url = URL.createObjectURL(blob);&#xA;      res(url);&#xA;    };&#xA;&#xA;    // Start the video and start recording&#xA;    videoRef.current.currentTime = 0;&#xA;    videoRef.current.addEventListener(&#xA;      "play",&#xA;      (e) => {&#xA;        mediaRecorder.start();&#xA;      },&#xA;      {&#xA;        once: true,&#xA;      }&#xA;    );&#xA;    videoRef.current.addEventListener(&#xA;      "ended",&#xA;      (e) => {&#xA;        mediaRecorder.stop();&#xA;      },&#xA;      {&#xA;        once: true,&#xA;      }&#xA;    );&#xA;    videoRef.current.play();&#xA;  });&#xA;}

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;

      &#xA;
    1. I can use ffmpeg.js to encode the video. I haven't tried this method yet as I will have to convert my image representation into ffmpeg args (I wonder how much work that is).
    2. &#xA;

    &#xA;

  • Encoding rawframes to raw h264 live [closed]

    25 juillet 2024, par Enry Frafranci

    I'm trying to make an application that generates an mp4 stream live in node.js.

    &#xA;

    So far I've successfully got the stream part working with static pre-encoded raw h264 files, then passing them trough jmuxer, streaming it to an express endpoint.&#xA;Now I would like to generate live the h264 stream based on a canvas that gets drawn live.&#xA;I've managed to use the canvas module to do that with no issue, but problems arise when trying to compress and encode the canvas output with ffmpeg. This is the command that I'm running, while piping in the raw video frames, and expecting on the pipe output the raw h264 stream :

    &#xA;

    ffmpeg -f rawvideo -r 30 -pixel_format rgb24 -video_size 640x480 -i pipe:0 -c:v libx264 -pixel_format yuv420p -preset fast -f h264_mp4toannexb pipe:1&#xA;

    &#xA;

    But this is the error message I receive instead :

    &#xA;

    Output format h264_mp4toannexb is not available&#xA;

    &#xA;

    I know for sure my frame generation works correctly and ffmpeg accepts it because a previous project of mine used basically the same exact code, with the exception of the output being a simple mp4 file and not a stream.

    &#xA;

    Any help to figure out what's a good solution is appreciated !

    &#xA;

    Thanks

    &#xA;

    Rico

    &#xA;