Recherche avancée

Médias (0)

Mot : - Tags -/signalement

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (64)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

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

Sur d’autres sites (6815)

  • "Error opening filters !" when using fluent-ffmpeg with Node

    3 février 2015, par doremi

    I’m trying to get a basic example of html5 video streaming working in an express node app, but I keep running into ffmpeg errors that I’m unsure of how to resolve.

    The input file/stream is the sample.mp4 located here.

    Complete example :

    var ffmpeg = require('fluent-ffmpeg');
    var express    = require('express');
    var fs         = require('fs');
    var sampleApp  = express();
    var videoApp   = express();

    var SAMPLE_SERVER_PORT = 3000;
    var VIDEO_SERVER_PORT  = 5000;

    sampleApp.get('/:video', function (req, res) {
     var videoURL = 'http://localhost:' + VIDEO_SERVER_PORT + '/' + req.params.video;
     return res.end('<video controls="controls" src=" + videoURL +"></video>');
    });

    videoApp.get('/:video', function(req, res) {

     res.statusCode = 200;
     res.setHeader('content-type','video/mp4');

     var stream = fs.createReadStream('./samples/' + req.params.video);

     var proc = ffmpeg(stream)

       .format('mp4')
       .size('320x?')
       .videoBitrate('512k')
       .videoCodec('libx264')
       .fps(24)
       .audioBitrate('96k')
       .audioCodec('aac')
       .audioFrequency(22050)
       .audioChannels(2)

       .on('error', function(err) {
         console.log('an error happened: ' + err.message);
       })

       .pipe(res, { end:true });
    });

    var server = sampleApp.listen(SAMPLE_SERVER_PORT, function () {
     console.log('Example app listening at http://%s:%s', server.address().address, SAMPLE_SERVER_PORT);
    });


    var videoServer = videoApp.listen(VIDEO_SERVER_PORT, function () {
     console.log('Video Server listening at http://%s:%s', server.address().address, VIDEO_SERVER_PORT);
    });

    The error (via console) :

    an error happened: ffmpeg exited with code 1: Error opening filters!

    ffmpeg configuration :

    ./configure  --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass \                                                                        
    --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus \
    --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-libfaac --enable-libfdk-aac

    Any input would be greatly appreciated.

  • Setting getChannelData causing socket.io to crash in web audio

    6 novembre 2014, par Brad.Smith

    I’m having an issue where whenever I transcode an audio file and send the audio buffer to the client via socket.io to be played by web audio my connection dies as soon as I perform

    source.buffer.getChannelData(0).set(audio);

    I’m assuming that this isn’t a Socket.IO problem and that I’m only seeing the Socket.IO issue as a result of the real problem. In the client I’m piping the audio file into stdin of ffmpeg and listening to stderr of ffmpeg to determine when it’s safe to send the buffer. The client is receiving the buffer and is doing everything properly until the line stated above. Here is some sample test code to reproduce the issue.

    Server side :

    var express = require('express');
    var http = require('http');
    var spawn = require('child_process').spawn;

    var app       = express();
    var webServer = http.createServer(app);
    var io        = require('socket.io').listen(webServer, {log: false});

    app.use(express.static(__dirname + '/public'));

    app.get('/', function(req, res){
       res.send(
       "<code class="echappe-js">&lt;script src='http://stackoverflow.com/socket.io/socket.io.js'&gt;&lt;/script&gt;

    \n"+
    "&lt;script&gt;var socket=io.connect('http://127.0.0.1:3000');&lt;/script&gt;\n"+
    "&lt;script src='http://stackoverflow.com/webaudio_file_cli.js'&gt;&lt;/script&gt;"
    ) ;
    ) ;
    webServer.listen(3000) ;

    io.sockets.on(’connection’, function(webSocket)

    var disconnect = ’0’ ;
    var count = 0 ;
    var audBuf = new Buffer([]) ;

    if (disconnect == ’0’)
    console.log(’new connection...’) ;

    var inputStream = spawn(’wget’, [’-O’,’-’,’http://www.noiseaddicts.com/samples/4353.mp3’]) ;

    var ffmpeg = spawn(’ffmpeg’, [
    ’-i’, ’pipe:0’, // Input on stdin
    ’-acodec’, ’pcm_s16le’, // PCM 16bits, little-endian
    ’-ar’, ’24000’, // Sampling rate
    ’-ac’, 1, // Mono
    ’-f’, ’wav’,
    ’pipe:1’ // Output on stdout
    ], stdio : [’pipe’,’pipe’,’pipe’]) ;

    inputStream.stdout.pipe(ffmpeg.stdin) ;

    ffmpeg.stdout.on(’data’, function(data)
    audBuf = Buffer.concat([audBuf,data]) ;
    ) ;

    ffmpeg.stderr.on(’data’, function(data)
    var _line = data.toString(’utf8’) ;
    if (_line.substring(0,5) == ’size=’ && _line.indexOf(’headers :’) > -1)
    console.log(’completed...’) ;
    webSocket.emit(’audio’,audBuf) ;

    ) ;

    webSocket.on(’disconnect’, function()
    console.log(’disconnecting...’) ;
    disconnect=1 ;
    ) ;
    ) ;

    Client side (webaudio_file_cli.js) :

    window.AudioContext = window.AudioContext || window.webkitAudioContext;
    var context = new AudioContext();
    var source = context.createBufferSource();

    var audioStack = [], audio = [];

    socket.on('audio', function(data) {
       playAudio(data);
    });

    function playAudio(data) {
       // playback starting...
       audioStack = Int16Array(data);
       for (var i = 0; i &lt; audioStack.length; i++) {
           audio[i] = (audioStack[i]>0)?audioStack[i]/32767:audioStack[i]/32768; // convert buffer to within the range -1.0 -> +1.0
       }

       var audioBuffer = context.createBuffer(1, audio.length, 24000);
       source.buffer.getChannelData(0).set(audio);
       source.buffer = audioBuffer;
       source.connect(context.destination);
       source.start(0);
    }
  • Laravel FFMPEG, converting large video on smaller EC2 instances

    30 août 2019, par Jeremy Layson

    I’m using ffmpeg on a laravel project (uploaded on AWS Elastic Beanstalk using t3.micro for now). My problem is that my budget can only go for t3.small but sometimes, I’ll have to process large video files like 2GB or even 5GB.

    My current set-up can process smaller files like 30MB and convert them to M3U8 (HLS) so there’s no problem with the set-up. The problem arises when I’m trying to upload and convert a 2GB file as my EC2 instance only has 1GiB of memory.

    Is there a way for FFMPEG (pbmedia/laravel-ffmpeg) to "chunk" the conversion so that it uses less memory ? Doesn’t matter if it takes double the time to convert.