Recherche avancée

Médias (0)

Mot : - Tags -/page unique

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

Autres articles (21)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (2866)

  • 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

    


  • Streaming without Content-Length in response

    21 décembre 2023, par kain

    I'm using Node.js, Express (and connect), and fluent-ffmpeg.

    



    We want to stream audio files that are stored on Amazon S3 through http.

    



    We have all working, except that we would like to add a feature, the on-the-fly conversion of the stream through ffmpeg.

    



    This is working well, the problem is that some browsers checks in advance before actually getting the file.

    



    Incoming requests containing the Range header, for which we reply with a 206 with all the info from S3, have a fundamental problem : we need to know in advance the content-length of the file.

    



    We don't know that since it is going through ffmpeg.

    



    One solution might be to write out the resulting content-length directly on S3 when storing the file (in a special header), but this means we have to go through the pain of having queues to encode after upload just to know the size for future requests.
It also means that if we change compressor or preset we have to go through all this over again, so it is not a viable solution.

    



    We also noticed big differencies in the way Chrome and Safari request the audio tag src, but this may be discussion for another topic.

    



    Fact is that without a proper content-length header in response everything seems to break or browsers goes in an infinite loop or restart the stream at pleasure.

    



    Ideas ?

    


  • ffmpeg extract multiple frames from single input causing SIGSEGV in node.js child_process on lambda env

    11 octobre 2023, par Andrew Still

    I'm trying to dynamically extract multiple different frames from single video input. So the command I'm calling looking like this

    


    ffmpeg -loglevel debug -hide_banner -t 13.269541 -y -ss 0 -i "input-s3-url" -ss 13.269541 -i "same-input-s3-url" -map 0:v -vframes 1 /tmp/ca4cd7a3159743938c5362c171ea2cae.0.png -map 1:v -vframes 1 /tmp/ca4cd7a3159743938c5362c171ea2cae.13.269541.png


    


    It works and everything is good, until I deploy it to lambda. Even though I'm using 10gb of RAM it still failing with error. Locally it works like a charm but not on lambda. I'm not sure what the problem here but i'm regularly (not always) getting SIGSEGV

    


    at ChildProcess.exithandler (node:child_process:402:12)
at ChildProcess.emit (node:events:513:28) 
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process: 1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) 
{
code: null, 
killed: false, 
signal: 'SIGSEGV'
cmd: '/opt/bin/ffmpeg -loglevel error -hide_banner -t 131.805393 -y -ss 0 -i "https: //


    


    Double-checked memory usage and it's doesn't look like a reason, but I'm not sure how correct this number

    


    Memory size : 10240 MB Max Memory used : 140 MB

    


    I'm think maybe it's because it's making requests for each input, at least that's what I saw in debug mode, but still have no idea what's the problem here, would appreciate any suggestions/optimizations/help. Thanks

    


    ffmpeg added on lambda using this layer - https://serverlessrepo.aws.amazon.com/applications/us-east-1/145266761615/ffmpeg-lambda-layer