Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (43)

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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (5345)

  • How can I render a video in real time with custom parameters ?

    8 janvier 2015, par Joaquín L. Robles

    Is it possible to render a video in real time with custom parameters ? I’m trying to inject some parameters (text, image and other video portions) into a video template depending on user parameters, like the "Facebook 10 Years video"..

    The output format should be any video format such as H.264.

    I’ve been googling and asking and the closest I got is to make a video from HTML5 canvas captures, which I think is totally inefficient.

    Any insight or guidance would be great, thanks

  • Fluent ffmpeg stream from buffer

    5 janvier 2020, par nonoom

    I have a function streamtogif() with ffmpeg that converts a stream to a gif and returns a buffer.
    It works perfectly fine, but here I am, I’m using busboy, and i get the entire file as buffer.
    Finally, I’d like to pass this one to the ffmpeg to turn for ex. a mp4 to a gif.
    Here is my code :
    streamtogif() :

    function streamtogif(stream, begintime = 0, duration){ //Return promise buffer
     return new Promise((resolve, reject)=>{
     buffer = [] //prepare creation of the buffer for the gif
       function addChunk(chunk){
         this.buffer.push(chunk)
       }
       function getBuffer(cb){ //get buffer array
         cb(this.buffer);
       }
       ffmpegstream = ffmpeg()
       .outputOptions('-metadata', 'title=test')
       .input(stream)
       .fps(20)
       .setStartTime(begintime)
       .noAudio()
       .videoCodec('gif')
       .format('gif')

       if(duration){ffmpegstream.duration(duration)} //only define duration if defined in function's parameters
       ffmpegstream.on('start',()=>{
         //console.log("starting")
         this.buffer = []
       })
       .on('end', ()=>{
         getBuffer((buff)=>{
         finalBuffer = Buffer.concat(buff);
         resolve(finalBuffer);
         });
     })

       var ffstream = ffmpegstream.pipe(); //handle data
       ffstream.on('data', function(chunk) {
         addChunk(chunk);
       })


       ffmpegstream.run()
     });
    }

    The code using this function : //i dont put everything, but the essential

               finalBuffer = Buffer.concat(this.fileRead)
               const bufferStream = new Stream.PassThrough();
               bufferStream.end(finalBuffer);
               streamtogif(bufferStream).then((buffer)=>{
                 upload = uploadpicture(buffer, "source/sportifeed").then((response)=>{ //success request
                   res.status(200).json({success: true, message: "Successfully uploaded !", url: response.data.link});
                 },(err)=>{ //error
                   console.log(err)
                   res.status(500).json({success: false, message: "Error happenned while uploading !"});
                 }).catch((err)=>{
                   console.log(err)
                   res.status(500).json({success: false, message: "Error happenned while uploading !"});
                 });
               },(err)=>{
                 console.log(err);
               })

    When i pass a stream coming from ytdl-core for example, everything works fine,
    but in this case, I get an error :

    An error occurred : ffmpeg exited with code 1 : pipe:0 : Invalid data
    found when processing input Error : ffmpeg exited with code 1 : pipe:0 :
    Invalid data found when processing input

    at ChildProcess.<anonymous> (C:\Users\famil\Desktop\sportifeed\node_modules\fluent-ffmpeg\lib\processor.js:182:22)
    at ChildProcess.emit (events.js:198:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) ffmpeg version N-92722-gf22fcd4483
    </anonymous>

    Copyright (c) 2000-2018 the FFmpeg developers built with gcc 8.2.1
    (GCC) 20181201

    When i print the stream from streamtogif function, I get this https://pastebin.com/NHmySWdm
    It do not seems empty

    Thanks for your help

    Ps : I tried with bufferstream too and tried :https://gist.github.com/chris9753/86121a07c4aa27fcd654d16133799d30 I tried to pass the file from busboy ? Didn’t work, litterally didn’t raise error

  • avformat/hlsenc : add a use_localtime option to expand the segment filename with localtime

    31 août 2015, par LiuQi
    avformat/hlsenc : add a use_localtime option to expand the segment filename with localtime
    

    test examples :

    ./ffmpeg -re -i /Movies/objectC/facebook.mp4 -v verbose -c copy -f hls -hls_segment_filename test-%s.ts -use_localtime 1 -bsf:v h264_mp4toannexb aaa.m3u8

    [StevenLiu@localhost ffmpeg]$ cat aaa.m3u8 ;ll test-*.ts
    test-1441052221.ts
    test-1441052231.ts
    test-1441052235.ts
    test-1441052243.ts
    test-1441052249.ts
    - rw-r—r— 1 StevenLiu staff 1310736 9 1 04:15 test-1441052131.ts
    - rw-r—r— 1 StevenLiu staff 495192 9 1 04:15 test-1441052141.ts
    - rw-r—r— 1 StevenLiu staff 1310736 9 1 04:17 test-1441052212.ts
    - rw-r—r— 1 StevenLiu staff 1067840 9 1 04:17 test-1441052221.ts
    - rw-r—r— 1 StevenLiu staff 235564 9 1 04:17 test-1441052231.ts
    - rw-r—r— 1 StevenLiu staff 1187220 9 1 04:17 test-1441052235.ts
    - rw-r—r— 1 StevenLiu staff 694848 9 1 04:17 test-1441052243.ts
    - rw-r—r— 1 StevenLiu staff 526588 9 1 04:17 test-1441052249.ts
    [StevenLiu@localhost ffmpeg]$

    ./ffmpeg -re -i /Movies/objectC/facebook.mp4 -v verbose -c copy -f hls -hls_segment_filename test-%s.ts -use_localtime 1 -bsf:v h264_mp4toannexb aaa.m3u8

    [StevenLiu@localhost ffmpeg]$ cat aaa.m3u8 ;ll aaa-*.ts
    aaa-1441052417.ts
    aaa-1441052427.ts
    aaa-1441052437.ts
    aaa-1441052440.ts
    aaa-1441052449.ts
    - rw-r—r— 1 StevenLiu staff 1310736 9 1 04:19 aaa-1441052382.ts
    - rw-r—r— 1 StevenLiu staff 277300 9 1 04:19 aaa-1441052392.ts
    - rw-r—r— 1 StevenLiu staff 1310736 9 1 04:20 aaa-1441052417.ts
    - rw-r—r— 1 StevenLiu staff 1067840 9 1 04:20 aaa-1441052427.ts
    - rw-r—r— 1 StevenLiu staff 235564 9 1 04:20 aaa-1441052437.ts
    - rw-r—r— 1 StevenLiu staff 1187220 9 1 04:20 aaa-1441052440.ts
    - rw-r—r— 1 StevenLiu staff 338776 9 1 04:20 aaa-1441052449.ts
    [StevenLiu@localhost ffmpeg]$

    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/hlsenc.c