Recherche avancée

Médias (91)

Autres articles (108)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

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

Sur d’autres sites (6893)

  • How to extract only 3 video frames at 0,5,10 seconds using FFMPEG ? [closed]

    26 mars 2018, par kheya

    Command I am using :

    ffmpeg -i input -c:v libx264 -movflags +faststart -preset slow -crf 22 -b:v 500k -c:a libvo_aacenc -b:a 128k "out.mp4" -r 1 -t 3 -ss 3 -s sqcif "%%1d.jpg"
  • ffmpeg + socket.io -> MediaSource video stops after few seconds

    25 avril 2015, par Dmitry S.

    I am trying to transcode a video using ffmpeg and pipe the output through socket.io to client page which appends the data to MediaSource buffer to play. Video starts playing but suddenly stops after a few seconds.
    I assume that ffmpeg throughput is less than real-time which cause the issue. What might be a better way of handling slow streams to play the video ? Some pre-loading could happen, but is it possible to use along with MediaSource ?

    var app = require('http').createServer(handler)
    var io = require('socket.io')(app);
    var fs = require('fs');
    var child = require('child_process');
    var util = require('util');

    var args = ['-i', 'pipe:0', '-c:v', 'libvpx', '-b:v', '300k', '-quality', 'good', '-vf', 'scale=640:-2',
     '-c:a', 'libvorbis', '-b:a', '128000', '-threads', '0', '-r', '25', '-rc_lookahead', '25', '-f', 'webm',
     '-me_method', 'zero', '-flags2', 'fast', '-preset', 'ultrafast', '-analyzeduration', '1000', 'pipe:1'
    ];

    app.listen(8080);

    function handler(req, res) {
     fs.readFile(__dirname + '/video.html',
       function(err, data) {
         if (err) {
           res.writeHead(500);
           return res.end('Error loading video.html');
         }

         res.writeHead(200);
         res.end(data);
         console.log('html sent');
       });
    }

    io.on('connection', function(socket) {

     console.log('Connected...');

     var in_file = fs.createReadStream("oceans.mp4");
     var trans_proc = child.spawn('ffmpeg', args, null);
     in_file.pipe(trans_proc.stdin);

     trans_proc.stderr.on('data', function(data) {
       console.log(data.toString());
     });

     socket.on('VIDEO_STREAM_REQ', function(req) {
       console.log(req);

       trans_proc.stdout.addListener('data', function(data) {
         console.log(data.length);
         socket.emit('VS', data);
       });

     });
    });
     <video autoplay="autoplay"></video>

     <code class="echappe-js">&lt;script src=&quot;https://cdn.socket.io/socket.io-1.3.5.js&quot;&gt;&lt;/script&gt;
    &lt;script&gt;<br />
       window.URL = window.URL || window.webkitURL;<br />
    <br />
       window.MediaSource = window.MediaSource || window.WebKitMediaSource;<br />
       if (!!!window.MediaSource) {<br />
         alert('MediaSource API is not available');<br />
       }<br />
       console.log('MediaSource API' + window.MediaSource);<br />
    <br />
       var mediaSource = new MediaSource();<br />
       var video = document.getElementById('v');<br />
       var i = 0;<br />
    <br />
       video.src = window.URL.createObjectURL(mediaSource);<br />
    <br />
       mediaSource.addEventListener('webkitsourceopen', function(e) {<br />
         console.log('mediaSource readyState: ' + this.readyState);<br />
       }, false);<br />
    <br />
       mediaSource.addEventListener('webkitsourceended', function(e) {<br />
         console.log('mediaSource readyState: ' + this.readyState);<br />
       }, false);<br />
    <br />
       var queue = [];<br />
    <br />
       mediaSource.addEventListener('sourceopen', function(e) {<br />
         console.log('mediaSource readyState: ' + this.readyState);<br />
    <br />
         console.log('listener fired');<br />
         var sourceBuffer = mediaSource.addSourceBuffer('video/webm; codecs=&quot;vorbis,vp8&quot;');<br />
    <br />
         var socket = io.connect('http://localhost:8080');<br />
    <br />
         socket.emit('VIDEO_STREAM_REQ', 'REQUEST');<br />
    <br />
         socket.on('VS', function(data) {<br />
           queue.push(new Uint8Array(data));<br />
    <br />
           if (queue.length &gt; 3 &amp;amp;&amp;amp; !sourceBuffer.updating)<br />
             sourceBuffer.appendBuffer(queue.shift());<br />
    <br />
    <br />
           i = i + 1;<br />
           console.log(queue.length);<br />
         });<br />
    <br />
         sourceBuffer.addEventListener('updateend', function() {<br />
           console.log(queue.length);<br />
           if (queue.length) {<br />
             sourceBuffer.appendBuffer(queue.shift());<br />
           }<br />
         }, false);<br />
    <br />
       });<br />
     &lt;/script&gt;
  • ffmpeg produces video of 0 seconds on adding text

    7 mars 2018, par Anuj TBE

    I’m using ffmpeg to add text over video.

    ffmpeg -i /path_to_video_input/1520425717.mp4 -vf\
    "drawtext=text='This is text':x=10:y=H-th-10:fontsize=42:fontcolor=#FFFFFF"\
    /path_to_video_input/1520425717.mp4 -y

    Text is added to the video but video length is reduced to 0 seconds and shows only one frame.

    How to keep the length of video as original and add the text throughout the video ?