Recherche avancée

Médias (3)

Mot : - Tags -/Valkaama

Autres articles (96)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (5237)

  • 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

    


  • Failed to run the ffmpeg binary : The process "ffmpeg exceeded the timeout of 60 seconds

    6 janvier 2024, par Sufian The Geek

    I am using FSPOSTER wordpress plugin to share videos on instagram as a reels and story. I have installed wordpress on amazon aws ec2 t2.micro. FsPoster required FFmpeg plugin to work with the videos.

    


    Whenever I share the video, I get error after 60 seconds. There are some videos that are easily getting shared as a reel and story. I looked into the plugin code and changed every single timeout function value to 300 seconds including php.ini file. There are some libraries like symfony in the plugin, I also changed the timeout 60 sec to 300 seconds. Restarted the server and all but still getting the error.

    


    


    Failed to run the ffmpeg binary : The process "'ffmpeg' -v error -y -i '/opt/bitnami/wordpress/wp-content/uploads/2024/01/videoWater-First-18.mp4' -vf 'crop=w=1280:h=720:x=0:y=0' -metadata:s:v rotate="" -f mp4 -c:v libx264 -preset fast -crf 24 -strict -2 -c:a aac -b:a 96k '/tmp/fs_65994ac0ddf8b.mp4'" exceeded the timeout of 60 seconds.

    


    


    I am using bitnami wordpress on ec3 aws t2.micro that has 1 vcpu and 1 GB ram. I also switched to 2 vcpu and 8 gb ram but still this timeout issue.

    


  • 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 ?