Recherche avancée

Médias (91)

Autres articles (75)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (9430)

  • "Output stream closed" when streaming PassThrough stream to AWS using @aws-sdk/lib-storage

    5 avril 2023, par cjd

    I am attempting to stream a PassThrough stream directly to S3 using @aws-sdk/lib-storage.

    


    My upload function is :

    


    const uploadStreamToS3 = () => {
    const Key = 'test.mp4';
    const Bucket = 'bucket-name';
    const stream = new PassThrough();
    const upload = new Upload({
        client: s3Client,
        params: { Bucket, Key, Body: stream },
        tags: [], // optional tags
        queueSize: 4, // optional concurrency configuration
        partSize: 1024 * 1024 * 5, // optional size of each part, in bytes, at least 5MB
        leavePartsOnError: false // optional manually handle dropped parts
    });
    return {
        stream,
        uploadComplete: upload.done(),
        upload
    };
};


    


    I am piping from ffmpeg directly to the PassThrough stream :

    


            ffmpegInstance
            .addOutputOptions(
                '-movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov'
            )
            .format('mp4')
            .pipe(stream, { end: true });


    


    When I run this locally, everything works.

    


    I am using a container lambda function with Docker.

    


    If I run the Docker container locally, everything works as expected. If I run the same code on Lambda, I get the following error Output stream is closed.

    


    One work around is to write the file to the Lambda tmp folder using a writeStream and once the file is written I can stream the file to S3 using a readStream as the Body of new Upload. However, I would like to stream directly to S3 and not create this temporary file in Lambda.

    


    Is this possible ? Is the issue with using a PassThrough stream in the Body for S3 ?

    


  • flient-ffmpeg getting error as "ffmpeg exited with code 1 : pipe:0 : Invalid data found when processing input"

    6 avril 2023, par Abhishek Rawal

    I am trying to create API where i need to get uploaded video and create thumbnail from that video. But conditions are :

    


      

    • Video should not store on local disk
    • 


    • Once thumbnail is create it should not store on local disk, instead it should directly uploaded to AWS s3 bucket.
    • 


    


    Following is the code i am trying with :

    


    

    

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

router.post('/thumbnail', upload.any(), (req, res) => {
  const videoBuffer = req.files[0].buffer;
  
  let readableVideoBuffer = new stream.PassThrough();
    readableVideoBuffer.write(videoBuffer);
    readableVideoBuffer.end()
    
  let bufferStream = new stream.PassThrough();
  
  ffmpeg(readableVideoBuffer)
    .on('filenames', function(filenames) {
      console.log('Will generate ' + filenames.join(', '))
    })
    .on('end', function() {
      console.log('Screenshots taken');
    })
    .on('error', (err) => {
      console.log(err);
    })
    .screenshots({
      count: 4,
      size: '100x100',
      timestamps: ['00:00:01.000'],
    })
    .writeToStream(bufferStream, { end: true });  /* while using this statement i am getting error */
    
    const buffers = [];
    bufferStream.on('data', function (buf) {
      buffers.push(buf);
    });
    bufferStream.on('end', function () {
      const outputBuffer = Buffer.concat(buffers);
      // use s3 bucket code here
      console.log('outputBuffer===========>', outputBuffer)
    });
})

    


    


    



    so while calling this API my app is crashing and i am getting error as :

    


    


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

    


    


    Blockquote

    


    If i am not using this statement :

    


    


    .writeToStream(bufferStream, end : true ) ;

    


    


    then able to save file but in local disk, which is not required in my case.

    


    Please help me to understand what is wrong in this code, how i can resolve it.
Any type of help is appreciated.

    


  • ffprobe on windows no output beyond " { " (ffmpeg-6.0-essentials_build) (in a python script) [closed]

    7 avril 2023, par Stahkub

    I'm attempting to use ffprobe (in a python script) on an rtsp stream using the following command :

    


    ffprobe -loglevel quiet -rtsp_transport tcp -select_streams v:0 -show_entries stream=width,height -of json rtsp://stream


    


    however the only thing showing in the console after this command is "" on windows, but works on wsl where it produces full json output and not just a single ""

    


    the windows command will never return and must be killed. Any ideas ?

    


    Reinstalled ffmpeg, different versions, rebooted pc, tried absolute path to ffprobe, tried running ffprobe using python. Tried piping output to a file, same result. I've searched around and haven't found a similar issue.