Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (77)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (8687)

  • failed to set frame number in opencv in cpp

    28 février 2018, par Madhu Nadendla

    I am trying to set frame position of opened videofile using OpenCV in C++ but it returns 0.

    solution 1

    bool success = capture.set(CV_CAP_PROP_POS_FRAMES, noFrame);

    double frameRate = capture.get(CV_CAP_PROP_FPS);
  • Ffmpeg output stream closed

    29 novembre 2023, par excalibur

    There is one problem in my code that uses ffmpeg to convert webm videos to mp4 and set duration to 10 seconds, it works well but, sometimes returns "output Stream closed" error. What can be a reason of this problem, and how can i solve it ?

    


    My code :

    


    async convertWebmVideoToMp4(buffer: any) {
    try {
        return new Promise((resolve, reject) => {
            const videoMp4Buffer = Buffer.from(buffer);

            const readable = Readable.from(videoMp4Buffer);

            const outputBuffer = [];

            const outputStream = new Writable({
                write(chunk, encoding, callback) {
                    outputBuffer.push(chunk);
                    callback();
                },
            });

            const ffmpegProcess = ffmpeg()
                .input(readable)
                .outputFormat('mp4')
                .videoCodec('libx264')
                .audioCodec('aac')
                .duration(10)
                .outputOptions([
                    '-movflags frag_keyframe+empty_moov',
                    '-preset ultrafast',
                    '-c:a aac',
                    '-r 30',
                    '-tune fastdecode',
                ])
                .on('end', () => {
                    outputStream.end();
                    const finalOutputBuffer = Buffer.concat(outputBuffer);
                    resolve(finalOutputBuffer);
                })
                .on('error', (err, stdout, stderr) => {
                    console.error(err);
                    reject(err);
                });

            outputStream.on('error', err => {
                this.logger.error(err);
            });

            ffmpegProcess.pipe(outputStream, { end: true });
        });
    } catch (error) {
        throw error;
    }
}


    


    My code should return the buffer of video that type is mp4 and length is 10 seconds, but it returns "output stream closed" error.

    


  • How to stop perl buffering ffmpeg output

    4 février 2017, par Sebastian King

    I am trying to have a Perl program process the output of an ffmpeg encode, however my test program only seems to receive the output of ffmpeg in periodic chunks, thus I am assuming there is some sort of buffering going on. How can I make it process it in real-time ?

    My test program (the tr command is there because I thought maybe ffmpeg’s carriage returns were causing perl to see one big long line or something) :

    #!/usr/bin/perl

    $i = "test.mkv"; # big file, long encode time
    $o = "test.mp4";

    open(F, "-|", "ffmpeg -y -i '$i' '$o' 2>&1 | tr '\r' '\n'")
           or die "oh no";

    while(<f>) {
           print "A12345: $_"; # some random text so i know the output was processed in perl
    }
    </f>

    Everything works fine when I replace the ffmpeg command with this script :

    #!/bin/bash

    echo "hello";

    for i in `seq 1 10`; do
           sleep 1;
           echo "hello $i";
    done

    echo "bye";

    When using the above script I see the output each second as it happens. With ffmpeg it is some 5-10 seconds or so until it outputs and will output sometimes 100 lines each output.

    I have tried using the program unbuffer ahead of ffmpeg in the command call but it seems to have no effect. Is it perhaps the 2>&amp;1 that might be buffering ?
    Any help is much appreciated.

    If you are unfamiliar with ffmpeg’s output, it outputs a bunch of file information and stuff to STDOUT and then during encoding it outputs lines like

    frame=  332 fps= 93 q=28.0 size=     528kB time=00:00:13.33 bitrate= 324.2kbits/s speed=3.75x

    which begin with carriage returns instead of new lines (hence tr) on STDERR (hence 2>&amp;1).