Recherche avancée

Médias (1)

Mot : - Tags -/publicité

Autres articles (84)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (6506)

  • Combining more than 32 input files in FFmpeg

    17 mai 2016, par thunderblaster

    I am using FFmpeg through Node.js via fluent-ffmpeg to combine a number of small audio files into one. Each of the audio files I am combining has a delayed start time (so it’s neither merging all at the same start, nor concat’ing). I can do this successfully using aevalsrc=0 and concating my audio file to that, and then amixing everything down. However, although I couldn’t find reference to a maximum number of inputs in the documentation, I got [amix @ 0x3fcd920] Value 78.000000 for parameter 'inputs' out of range [1 - 32] when trying to amix 78 files. Clearly there is a limit of 32 input files.

    Given this limitation, I am unsure of the best way to proceed. I understand that amerge exists, but it stops after the shortest file length, so I would need to apad everything and I just tested it and determined that amerge has a limit of 64 input files, which won’t always suit my needs (I have an arbitrary number of inputs).

    I could amix 32 files, store that somewhere, amix 32 more, etc, and amix the results. I would prefer to not deal with writing temp files to disk to then have to clean up later. I considered writing the "temp" outputs to duplex Node streams and reading from them in my final mixdown, but I fear that may be rather inefficient.

    Below is what I am currently doing. If this is an XY problem and this is a dumb way to accomplish what I want, please let me know.

    ffmpeg()
       //INPUTS
       .input('/drummachine/www/audio/bd/bd5025.wav')
       .input('/drummachine/www/audio/bd/bd5025.wav')
       .input('/drummachine/www/audio/bd/bd5025.wav')
       .input('/drummachine/www/audio/sd/sd5025.wav')
       .input('/drummachine/www/audio/sd/sd5025.wav')
       .input('/drummachine/www/audio/rs/rs.wav')
       .input('/drummachine/www/audio/rs/rs.wav')
       .input('/drummachine/www/audio/rs/rs.wav')
       .input('/drummachine/www/audio/cp/cp.wav')
       .input('/drummachine/www/audio/cp/cp.wav')
       .input('/drummachine/www/audio/cp/cp.wav')
       .input('/drummachine/www/audio/oh/oh25.wav')
       .input('/drummachine/www/audio/oh/oh25.wav')
       .input('/drummachine/www/audio/oh/oh25.wav')
       .input('/drummachine/www/audio/ch/ch.wav')
       .input('/drummachine/www/audio/ch/ch.wav')
       .input('/drummachine/www/audio/ch/ch.wav')
       // ...
       // you get the picture
       // ...
       .audioCodec('libmp3lame').format('mp3')
       .complexFilter([
           //GENERATE SILENCE TO PREPEND TO INPUTS
           'aevalsrc=0:d=6.857142857142857[s78]',
           'aevalsrc=0:d=0[s0]',
           'aevalsrc=0:d=0.857[s1]',
           'aevalsrc=0:d=1.714[s2]',
           'aevalsrc=0:d=2.571[s3]',
           'aevalsrc=0:d=3.429[s4]',
           'aevalsrc=0:d=4.286[s5]',
           'aevalsrc=0:d=5.143[s6]',
           'aevalsrc=0:d=6[s7]',
           'aevalsrc=0:d=0.429[s8]',
           'aevalsrc=0:d=1.286[s9]',
           'aevalsrc=0:d=2.143[s10]',
           'aevalsrc=0:d=3[s11]',
           'aevalsrc=0:d=3.857[s12]',
           'aevalsrc=0:d=4.714[s13]',
           'aevalsrc=0:d=5.571[s14]',
           'aevalsrc=0:d=6.429[s15]',
           'aevalsrc=0:d=0.536[s16]',
           // ...
           //CONCAT SILENCE AND AUDIO
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s0', '0:a'], outputs: 'ac0'},
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s1', '1:a'], outputs: 'ac1'},
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s2', '2:a'], outputs: 'ac2'},
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s3', '3:a'], outputs: 'ac3'},
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s4', '4:a'], outputs: 'ac4'},
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s5', '5:a'], outputs: 'ac5'},
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s6', '6:a'], outputs: 'ac6'},
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s7', '7:a'], outputs: 'ac7'},
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s8', '8:a'], outputs: 'ac8'},
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s9', '9:a'], outputs: 'ac9'},
           {filter: 'concat', options: {v: 0, a: 1}, inputs: ['s10', '10:a'], outputs: 'ac10'},
           // ...
           // again, this goes on for a while
           // ...
           //MIX IT ALL
           {filter: 'amix', options: {inputs: 78, duration: 'longest'},
               inputs: ['s78', 'ac0', 'ac1', 'ac2', 'ac3', 'ac4', 'ac5',
               'ac6', 'ac7', 'ac8', 'ac9', 'ac10', 'ac11', 'ac12', 'ac13',
               'ac14', 'ac15', 'ac16', 'ac17', 'ac18', 'ac19', 'ac20',    
               // ...
               'ac74', 'ac75', 'ac76'], outputs: 'out'}], 'out')
       //ERROR
       .on('error', function (err, stdout, stderr) {
           console.log('an error happened: ' + err.message);
           console.log('ffmpeg stdout: ' + stdout);
           console.log('ffmpeg stderr: ' + stderr);
       //SUCCESS
       }).on('end', function () {
           console.log('Processing finished !');
           res.end();
       }).pipe(res);
  • input stream error _read() is not implemented : ffmpeg-fluent

    23 mai 2018, par Thomsheer Ahamed

    I have buffer object. I want to pass that buffer as readable stream to ffpmeg.

    var ffmpeg = require('fluent-ffmpeg');
       var ffmpegPath = require("ffmpeg-binaries").ffmpegPath()
       ffmpeg.setFfmpegPath(ffmpegPath);
       var command = new ffmpeg();

       command.input(my_buffer)
           .videoCodec('libx264')
           .size('520x?')
           .aspect('4:3')
           .inputFPS(8)
           .outputFPS(30)
           .output('new_video.mp4')
           .on('start', onStrat)
           .on('progress', onProgress)
           .on('end', onEnd)
           .on('error', onError)
           .run();

    If I pass buffer right away I will get "Error : Invalid input
    at FfmpegCommand.proto.mergeAdd.proto.addInput.proto.input
    "

    So I converted buffer into stream using

    function bufferToStream(buffer) {
       let Duplex = require('stream').Duplex;
       let stream = new Duplex();
       stream.push(new Buffer(buffer));
       stream.push(null);
       return stream;
    }
    var red = bufferToStream(finalResponse.file.buffer);

    and passed this steam to input

    command.input(red)

    Above Command throws "ffmpeg exited with code 1 : Error opening filters !" ;

    If I use my_buffer and save it in locally using fs.writeFile(’path’,my_buffer) and pass this path to input of ffmpeg then it works fine..

    But I dont want to store that file and then delete it after altering video.

    Can some one help me ?

    I Reffered this example

  • Stream Live IP cam to Youtube on FFMPEG

    24 juillet 2018, par Håkon Berntsen

    I`m streaming 2 IP cams (live webcam for tourists) from 2 Raspberry Pi, using FFMPEG (version 3.4.2) to YouTube. IPcam no.1 and Raspberry no.1 fails once a month or so, and that issue is solved with a Cron job that restarts the scripts if the service is not running.

    The stream from IPcam no.2 fail after 1 hour to maybe 24 hours, even though its the same FFMPEG command and same setup.
    FFMPEG keep streaming and the service is running on the Raspberry. YouTube stop receiving the stream, but there is no logs to be found at YouTube.

    The bandwidth is not an issue (fiber), and the cameras are both connect with Cat5 cable. The only way to restart the stream (so YouTube restart the stream) is to restart the service (since its an cronjob that restart the service only if the service is no longer running, I`m forced to do a pkill). I have also tried to set up another cron job that kills the service every 15 minutes, but its not really an elegant solution.

    Both cameras streams H264.

    Stream no.2 can be seen here : https://www.youtube.com/embed/live_stream?channel=UCEJJjA5IsjE0JjuiqfxZFaw

    The command I`m using is :

    COMMAND="sudo ffmpeg  -f lavfi -i anullsrc -thread_queue_size 512   -rtsp_transport tcp  -i ${RTSP_URL}  -vcodec libx264   -pix_fmt + -c:v copy -c:a aac  -f flv ${YOUTUBE_URL}/${YOUTUBE_KEY}"

    I hope there is someone that can help with ideas to the command or to why the stream fail.