Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (90)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

Sur d’autres sites (10879)

  • building ZVBI for arm7

    14 janvier 2014, par Dinesh

    I am trying to build zvbi lib for ios arm7 architecture. If any body has done this earlier can give me some pointers. I have managed to build the same for simulator using

    ./configure prefix=""           CC="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/us r/bin/gcc" CFLAGS="-arch i386" LDFLAGS="-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk"

    But i am not sure how to build the same with arm Architecture.

  • How do I use a fetch response object with fluent-ffmpeg ?

    5 août 2024, par chovy

    The following code throws an error :

    


    async start(url, user = null, pass = null) {
            console.log('Transcoding:', url);
            const headers = {};

            try {
                if (user && pass) {
                    const encodedCredentials = Buffer.from(`${user}:${pass}`).toString('base64');
                    headers['Authorization'] = `Basic ${encodedCredentials}`;
                }

                // Fetch the video from the URL
                const response = await fetch(url, { headers, redirect: 'follow' });

                if (!response.ok) {
                    throw new Error(`Failed to fetch video: ${response.statusText}`);
                }

                // Create a readable stream from the response
                // const videoStream = response.body;
                const videoStream = response.body;

                console.log(videoStream);

                // Ensure videoStream is a valid readable stream
                if (!videoStream) {
                    throw new Error('Failed to get video stream from response');
                }

                // Create a pass-through stream to handle ffmpeg output
                const outputStream = new PassThrough();

                // Pipe the video stream through ffmpeg to transcode it to mp4
                ffmpeg(videoStream)
                    .format('mp4')
                    // .output(outputStream)
                    .videoCodec('libx264')
                    .audioCodec('aac')
                    .on('start', (commandLine) => {
                        console.log('Spawned Ffmpeg with command: ' + commandLine);
                    })
                    .on('error', (err) => {
                        console.error('Error:', err.message);
                        console.error(err);
                        outputStream.destroy(err); // destroy the stream in case of error
                    })
                    .on('progress', (progress) => {
                        console.log(JSON.stringify(progress, null, 2));
                        console.log('Processing: ' + progress.percent + '% done');
                    })
                    .on('end', () => {
                        console.log('Transcoding finished');
                    })
                    .pipe(outputStream);

                return outputStream;
            } catch (err) {
                throw err;
            }
        }


    


    Here's the error message :

    


    Spawned Ffmpeg with command: ffmpeg -i pipe:0 -acodec aac -vcodec libx264 -f mp4 pipe:1&#xA;{&#xA;  "frames": 0,&#xA;  "currentFps": 0,&#xA;  "currentKbps": null,&#xA;  "targetSize": 0,&#xA;  "timemark": "N/A"&#xA;}&#xA;Processing: undefined% done&#xA;Error: ffmpeg exited with code 234: Conversion failed!&#xA;&#xA;Error: ffmpeg exited with code 234: Conversion failed!&#xA;&#xA;    at ChildProcess.<anonymous> (/home/ettinger/src/watch.theater/watchtheater-web/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/processor.js:180:22)&#xA;    at ChildProcess.emit (node:events:518:28)&#xA;    at ChildProcess._handle.onexit (node:internal/child_process:294:12)&#xA;</anonymous>

    &#xA;

    I'm trying to stream the output in real-time without having to download the entire video file first.

    &#xA;

  • Failed to convert web-saved .wemb audio to .wav by using php "shell_exec" and javascript

    30 mai 2022, par Anirbasgnaw

    I'm working on an online experimenter which could record participants' audio from the browser. The audio data I get has an extension of .wemb, so I plan to use ffmpeg to convert it to .wav while I save the data.

    &#xA;

    I tried to use PHP's shell_exec but nothing happens when I run the scripts. Then I found that my echo and print_r also did not work. I'm new to PHP and javascript, so I''m really confused now.

    &#xA;

    Below are the relevant codes, I really appreciate it if you could help !

    &#xA;

    write_data.php :

    &#xA;

    &lt;?php&#xA;  $post_data = json_decode(file_get_contents(&#x27;php://input&#x27;), true); &#xA;  // the directory "data" must be writable by the server&#xA;  $name = "../".$post_data[&#x27;filename&#x27;];&#xA;  $data = $post_data[&#x27;filedata&#x27;];&#xA;   // write the file to disk&#xA;  file_put_contents($name, $data);&#xA;  &#xA;  $INPUT = trim($name) . ".webm";&#xA;  $OUTPUT = trim($name) . ".wav";&#xA;  echo "start converting...";&#xA;&#xA;  // check if ffmprg is available&#xA;  $ffmpeg = trim(shell_exec(&#x27;which ffmpeg&#x27;));&#xA;  print_r($ffmpeg);&#xA;  // call ffmpeg&#xA;  shell_exec("ffmpeg -i &#x27;$INPUT&#x27; -ac 1 -f wav &#x27;$OUTPUT&#x27; 2>&amp;1 ");&#xA;?>&#xA;

    &#xA;

    javascript :

    &#xA;

      saveData: function(fileName,format){&#xA;    // save  as json by default&#xA;    if (!format){ format = &#x27;json&#x27;;}&#xA;    // add extension to filename&#xA;    fileName = `${fileName}.${format}`&#xA;    // create saveData object using fetch&#xA;    let saveData = [];&#xA;    if (format == &#x27;json&#x27;) {&#xA;        saveData = {&#xA;          type: &#x27;call-function&#x27;,&#xA;          async: true,&#xA;          func: async function(done) {&#xA;            let data = jsPsych.data.get().json();&#xA;            const response = await fetch("../write_data.php", {&#xA;              method: "POST",&#xA;              headers: {&#xA;                "content-type": "application/json"&#xA;              },&#xA;              body: JSON.stringify({ filename: fileName, filedata: data })&#xA;            });&#xA;            if (response.ok) {&#xA;              const responseBody = await response.text();&#xA;              done(responseBody);&#xA;            }&#xA;          }&#xA;        }&#xA;    } else {&#xA;        saveData = {&#xA;          type: &#x27;call-function&#x27;,&#xA;          async: true,&#xA;          func: async function(done) {&#xA;            let data = jsPsych.data.get().csv();&#xA;            const response = await fetch("../write_data.php", {&#xA;              method: "POST",&#xA;              headers: {&#xA;                "content-type": "application/json"&#xA;              },&#xA;              body: JSON.stringify({ filename: fileName, filedata: data })&#xA;            });&#xA;            if (response.ok) {&#xA;              const responseBody = await response.text();&#xA;              done(responseBody);&#xA;            }&#xA;          }&#xA;        }&#xA;    }&#xA;    return saveData;&#xA;  },&#xA;

    &#xA;