Recherche avancée

Médias (91)

Autres articles (32)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

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

  • Why does fluent-ffmpeg only work when it throws the error Output stream closed

    29 mars 2024, par volume one

    I am using fluent-ffmpeg to process a video file (and then upload that to Amazon S3). The code is very straightforward but it only works if :

    


      

    • pipe option {end: true} is set in .output()
    • 


    • which has a side-effect that causes the following console log output
    • 


    


    


    Processing : 19.261847354642416% done Processing :
32.365144874807335% done Processing : 48.80978326261429% done Processing : 78.35771917058617%
Processing : 91.49377493455148% done Processing :
99.91264359125745% done An error occurred : Output stream closed

    


    


    Despite that error, it seems the file is generated correctly and it gets uploaded to Amazon S3 fine.

    


    This is the fluent-ffmpeg code :

    


    import {PassThrough} from 'node:stream';
import FFMpeg from 'fluent-ffmpeg';

let PassThroughStream = new PassThrough();

             FFMpeg('/testvideo.mp4')
                    .videoCodec('libx264')
                    .audioCodec('libmp3lame')
                    .size(`640x480`)
                    // Stream output requires manually specifying output formats
                    .format('mp4')
                    .outputOptions('-movflags dash')
                    .on('progress', function (progress) {
                        console.log('Processing: ' + progress.percent + '% done');
                    })
                    .on('error', function (err) {
                        console.log('An error occurred: ' + err.message);
                    })
                    .on('end', function () {
                        console.log('FFMpeg Processing finished!');
                    })
                    .output(PassThroughStream, {end: true})
                    .run();

   // Now upload to S3
    try {
          await s3Upload({
              AWSS3Client: 'mys3client',
              Bucket: 'publicbucket,
              ACL: "public-read",
              ContentType: 'video/mp4',
              Key: 'whoever/whatever.mp4',
              Body: PassThroughStream
           });
    } catch (error) {
                    console.log(`s3Upload error`, error)
                }


    


    If I set the pipe output() option to {end: false} then there is no error from fluent-ffmpeg and I get "Processing: 100% done FFMpeg Processing finished!" as the final console log.

    


    BUT the problem is that the s3Upload() does not do anything. There are no errors. Just no activity.

    


    I feel very uncomfortable letting fluent-ffmpeg end in an error even if the code itself does the job intended. It will also cause testing to fail. What could be the issue ?

    


    The command line code is : ffmpeg -i https:/xxxbucket.s3.amazonaws.com/14555/file-example.mp4 -acodec libmp3lame -vcodec libx264 -filter:v scale=w=trunc(oh*a/2)*2:h=480 -f mp4 -movflags dash pipe:1

    


  • Continously running a PHP script waiting for videos to trancode

    12 mai 2017, par Ian

    I’m making a transcoding server which uses FFMPEG to convert videos to flv. After user uploads a video it’s queued for processing in amazon Simple Queue Service. System is linux ubuntu.

    Instead of running CRON each 1min I wonder if it would be possible to continously run several PHP scripts (dowload queued files, process downloaded etc). Each of them would have its own queue which would be read every 10s or so looking for new tasks.

    My question is :

    How to detect if the script is already running ? I’d run CRON each 1min and if one of the programs would not be running I’d load it again. How stuff like that is done on linux ? PID files ?

    thanks for help,
    ian

  • Streaming filtered video

    4 juin 2013, par tuler

    I have a source video file, h264 encoded, which I would like to apply some filter in real-time and stream it through the web to a HTML5 or flash player (preferably HTML5), like a VOD. This filter can be a grayscale filter, or whatever ffmpeg supports.

    The source video file is stored in Amazon S3, but I can put it anywhere (like the filesystem) if that is necessary.

    I can use any media server if that is necessary, but cost is important. ffserver, wowza, red5, mistserver are all the free or low cost options I have found.

    The stream should be dynamically defined, so I can add a new VOD at runtime.