Recherche avancée

Médias (91)

Autres articles (95)

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

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (9156)

  • How to convert image to video using fluent-ffmpeg in NodeJS

    2 juillet 2022, par MjM

    I would like to create a video using fluent-ffmpeg in NodeJS. My objective is to create a video using one image. And what I have done so far is the following :

    



    var express = require('express')
var router = express.Router()

const ffmpeg = require('fluent-ffmpeg');

router.get('/test', function (req, res) {
    // make sure you set the correct path to your video file
    var proc = ffmpeg('http://localhost:3000/images/image.jpg')

        // loop for 5 seconds
        .loop(5)
        // using 25 fps
        .fps(25)
        // setup event handlers
        .on('end', function () {
            console.log('file has been converted succesfully');
        })
        .on('error', function (err) {
            console.log('an error happened: ' + err.message);
            console.log(' error code is : ' + err.code);
        })
        // save to file
        .save('http://localhost:3000/video/image-cdo.mp4');
})

module.exports = router;


    



    When I run this I have been getting the following result with an error :

    



    GET /mixer/ 200 6.364 ms - 13
GET /images/image.jpg 206 3.355 ms - 311484
GET /images/image.jpg 206 4.041 ms - 311484
GET /images/image.jpg 206 3.509 ms - 311484
GET /images/image.jpg 206 1.225 ms - 311484
GET /images/image.jpg 206 0.742 ms - 311484
GET /images/image.jpg 206 0.655 ms - 311484
GET /images/image.jpg 206 0.695 ms - 311484
GET /images/image.jpg 206 0.691 ms - 311484
GET /images/image.jpg 206 0.676 ms - 311484
GET /images/image.jpg 206 0.648 ms - 311484
GET /images/image.jpg 206 0.663 ms - 311484
GET /images/image.jpg 206 0.886 ms - 311484
GET /images/image.jpg 206 0.598 ms - 311484
GET /images/image.jpg 206 0.532 ms - 311484
GET /images/image.jpg 206 0.547 ms - 311484
GET /images/image.jpg 206 0.630 ms - 311484
GET /images/image.jpg 206 0.560 ms - 311484
GET /images/image.jpg 206 0.536 ms - 311484
POST /video/image-cdo.mp4 404 30.270 ms - 1212


    



    


    an error happened : ffmpeg exited with code 1 : Could not write header
 for output file #0 (incorrect codec parameters ?) : Invalid argument
 Error initializing output stream 0:0 — 
 Conversion failed !

    



     error code is : undefined


    


    



    Can anyone help me out :)

    



    "dependencies": {
    "fluent-ffmpeg": "^2.1.2",
  }


    



    And NodeJS v12.13.0

    


  • nodejs ffmpeg works in local but not in production

    24 octobre 2019, par HUNG
    var proc =
    ffmpeg()
    .input('./public/img/capture/photoframe.png')
    .input( scenePath + '%04d.png')
    .inputFPS(15)
    .input( msgPath + '%04d.png')
    .inputFPS(15)
    .input( path + data + '.' + ext )
    .complexFilter([
       "[3:v]scale=668:-1[scaledUGC]",
       "[0]overlay=66:155[output0]",
       "[output0][scaledUGC]overlay=66:155[output1]",
       "[output1][1]overlay=66:155[output2]",
       "[output2][2]overlay=66:155[output3]",
       "[output3][0]overlay=0:0[output4]"  
    ], 'output4')
    .outputFPS(15)
    .on('start', function(command) {
       if (env === 'development') {
           console.log(new Date());
           console.log('Start with command:'+command);
       }
    })
    // .on('progress', function(progress) {
    //     if (env === 'development') {
    //         console.log(progress.percent + "% done");
    //     }
    // })
    .on('end', function() {
       if (env === 'development') {
           console.log(new Date());
           console.log('file has been converted succesfully');
       }

       var gifMaker =
       ffmpeg()
       .input('./public/_ugc/' + data + '.mp4')
       .save('./public/_ugc/' + data + '.gif');

       res.send({
           status: "success",
           uid: data
       });

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

       res.send({
           status: "err",
           uid: "err_video"
       });
    })
    .save('./public/_ugc/' + data + '.mp4');

    I have the above code that can successfully generate a 5s video in my local Mac.

    However, when I push the code to the production Ubuntu, it can only generate a 1s video only.

    There is no error in the Ubuntu side. I wonder if I missed anything.

    I also wonder should I preload the source images first ?

    node v12.13.0

    ffmpeg version 2.8.15-0

    ubuntu0.16.04.1

  • avformat/matroskaenc : Fix memleak upon failure

    16 octobre 2019, par Andreas Rheinhardt
    avformat/matroskaenc : Fix memleak upon failure
    

    The Matroska muxer up until now leaked memory in two scenarios :

    1. If an error happened during writing the trailer, as
    mkv_write_trailer() returned early without cleaning up.
    2. If mkv_write_header() indicated success despite an error in the
    underlying AVIOContext. In this case avformat_write_header() returned
    the IO error and according to the API the caller is not allowed to call
    av_write_trailer(), so that no cleanup happened for the allocations made
    in mkv_write_header().

    This has been fixed by using a dedicated deinit function.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavformat/matroskaenc.c