Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (66)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

Sur d’autres sites (10553)

  • Encoding PNG to MP4 using FFMPEG.js

    11 juillet 2024, par Giles Thompson

    I'm attempting to convert a series of base64 encoded PNG frames (captured from a canvas) to an MP4 video using FFMPEG.js but seem to be running into following error on attempting to run the conversion process, FFMPEG reports the following error :

    


    


    frame0000.png : Invalid data found when processing input

    


    


    The specified file is the first in the sequence of circa 25 PNG frames I'm attempting to convert. I've confirmed that the base64 png file is formatted correctly both by checking its signature and actually downloading a single frame and opening it. However, for some reason FFMPEG doesn't appear to recognise the PNG file data. What follows is a snippet of the relevant parts of the conversion routine, some details have been omitted for the sake of brevity :

    


    import ffmpeg from 'ffmpeg.js/ffmpeg-mp4.js';


    


         // map each PNG frame in the array of frames to an object with 
     //with a name and data component. Crucially the data component 
     //will be the result of the conversion of the base64 data to an 
     //equivalent stream of bytes; i've listed the source of the 
     //referenced conversion function below...
        const inputFiles = videoFrames.map((dataUrl, index) => ({
            name: `frame${index.toString().padStart(4, '0')}.png`,
            data: this.#base64ToUint8Array(dataUrl)
        }));

    
        //build up the FFMPEG command to execute.
        let command = `-loglevel debug -framerate 30`;
        inputFiles.forEach((buffer, index) => {
            command += ` -i frame${index.toString().padStart(4, '0')}.png`; // Correctly padded frame names
        });
        command += ` -c:v libx264 -pix_fmt yuv420p ${outputFileName}`;
        

        //validate png frame data by checking its signature.
        inputFiles.forEach(file => {
            if (!this.#isValidPNG(file.data)) {
                throw new Error(`Invalid PNG file: ${file.name}`);
            }
        });

        // Write each input file to MEMFS
        inputFiles.forEach(file => {
            ffmpeg({
                MEMFS: [file],
                arguments: ['-version'],
                stdin: () => { }
            });
        });

        // Run ffmpeg
        const result = ffmpeg({
            MEMFS: inputFiles,
            //arguments: args,
            arguments: command.split(' '),
            stdin: () => { },
        });



    


    Additionally, here is the referenced ancillary, helper function that converts the base64 encoded PNG files to a stream of equivalent bytes :

    


         #base64ToUint8Array(base64) {
        const binaryString = atob(base64.split(',')[1]);
        const len = binaryString.length;
        const bytes = new Uint8Array(len);
        for (let i = 0; i < len; i++) {
            bytes[i] = binaryString.charCodeAt(i);
        }
        return bytes;
    }


    


    Here is the referenced function that validates the PNG file by checking for the existence and validity of its signature i.e the
magic number that all PNG start with :

    


     #isValidPNG(pngArray) {
        const signature = [0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A];
        for (let i = 0; i < signature.length; i++) {
            if (pngArray[i] !== signature[i]) {
                return false;
            }
        }
        return true;
    }



    


    The most pertinent details of my current environment are as follows :

    


    


    OS : "Ubuntu Linux".
    
VERSION : "21.04 (Hirsute Hippo)".
    
NPM VERSION : "9.5.0".
    
FFMPEG-JS-VERSION : "^2.8.9001".
    
BROWSER : "Chromium 125.0.6422.60 snap"

    


    


    Is there anything obvious that I'm missing that may account for the error I'm seeing in the debug console ? I should mention that I've switched on debug-level logging in FFMPEG and can provide the full console output if necessary.

    


  • FFMPEG Website Registration error No Handler matched request to /

    30 novembre 2022, par OneWorld

    I would very much like to submit a bug report on the FFMPEG website here :-
https://trac.ffmpeg.org/

    


    in order to do that I need to first register for an FFMPEG account here :-
https://trac.ffmpeg.org/register

    


    When I go to that page and enter the details into the fields
like this :-

    


    enter image description here

    


    I get this :-

    


    enter image description here

    


    Am I doing something wrong ?

    


    How can I register for an FFMPEG account ?

    


  • FFMPEG installed but not found

    20 mai 2016, par justHelloWorld

    I’m trying to install pHash , but when I execute ./configure this message is returned :

    ...

    *** Configuring video Hash ***

    checking whether FFmpeg is present... checking for avcodec_alloc_frame in -lavcodec... no
    configure: error:

    *** libavcodec not found.
    You need FFmpeg. Get it at /ffmpeg.org/>

    But FFMPEG is correctly installed, in fact executing ffmpeg it returns :

    ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
     configuration:
     libavutil      55. 17.103 / 55. 17.103
     libavcodec     57. 24.102 / 57. 24.102
     libavformat    57. 25.100 / 57. 25.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 31.100 /  6. 31.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    Use -h to get full help or, even better, run 'man ffmpeg'

    Why this happens ?