Recherche avancée

Médias (91)

Autres articles (30)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

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

Sur d’autres sites (5429)

  • Merge commit ’8ea15afbf2c1ec89b5d4bac1f0b8345e4b906a5d’

    30 mars 2017, par Mark Thompson
    Merge commit ’8ea15afbf2c1ec89b5d4bac1f0b8345e4b906a5d’
    

    * commit ’8ea15afbf2c1ec89b5d4bac1f0b8345e4b906a5d’ :
    hwcontext_qsv : transfer data through the child context when VPP fails

    Merged-by : Mark Thompson <sw@jkqxz.net>

    • [DH] libavutil/hwcontext_qsv.c
  • Bluebird promise, promise.each only executes once

    20 mars 2017, par kenpeter

    There is a function called musicPromise(). What this function does is

    1. It gets all mp4 files and loop through it.
    2. then it tries to convert each mp4 to mp3, using fluent-ffmpeg

    The problem I am facing is

    1. It only converts 1 file, no matter how many mp4 files I have.

    2. And it seems never reach to proc.on('end', (x) => {

    Full code here :

    // search
    const glob = require('glob');
    // wait for
    const Promise = require('bluebird');
    // fs
    const fs = require('fs');
    // mp3
    const ffmpeg = require('fluent-ffmpeg');

    // video source file path
    const videoPath = '/home/kenpeter/Videos/4K\ Video\ Downloader';

    // audio source file path
    const audioPath = __dirname + "/audio";

    // child process, exec
    const exec = require('child_process').exec;

    // now rename promise
    function renamePromise() { return new Promise((resolve, reject) => {
     glob(videoPath + "/**/*.mp4", (er, files) => {
         Promise.each(files, (singleClipFile) => {
           return new Promise((resolve1, reject1) => {
             let arr = singleClipFile.split("/");
             let lastElement = arr[arr.length - 1];
             let tmpFileName = lastElement.replace(/[&amp;\/\\#,+()$~%'":*?&lt;>{}\ ]/g, "_");
             let tmpFullFile = videoPath + "/"+ tmpFileName;

             // rename it
             fs.rename(singleClipFile, tmpFullFile, function(err) {
               if ( err ) console.log('ERROR: ' + err);

               console.log("-- Rename one file --");
               console.log(tmpFullFile);
               resolve1();
             }); // end rename
           });
         })
         .then(() => {
           console.log('--- rename all files done ---');
           resolve();
         });
       });

     }); // end promise
    };


    // music promise
    function musicPromise() { new Promise((resolve, reject) => {
       glob(videoPath + "/**/*.mp4", (er, files) => {
         Promise.each(files, (singleClipFile) => {
           return new Promise((resolve1, reject1) => {
             // test
             console.log('-- music promise --');
             console.log(singleClipFile);

             // split
             let arr = singleClipFile.split("/");

             // e.g. xxxx.mp4
             let clipFile = arr[arr.length - 1];

             // e.g. xxxx no mp4
             let fileName = clipFile.replace(/\.[^/.]+$/, "");

             // music file name
             let musicFile = fileName + '.mp3';

             // set source
             let proc = new ffmpeg({source: singleClipFile});

             // set ffmpeg path
             proc.setFfmpegPath('/usr/bin/ffmpeg');

             // save mp3
             proc.output("./audio/" + musicFile);

             // proc on error
             proc.on('error', (err) => {
               console.log(err);
             });

             // done mp3 conversion
             proc.on('end', (x) => {
               console.log("single mp3 done!");
               console.log(x);
               // it is resolve1..............
               resolve1();
             });

             // Run !!!!!!!!!!!!!
             proc.run();

           });
         })
         .then(() => {
           console.log('--------- all mp3 conversion done --------');
           resolve();
         });

       }); // end glob
     });
    };

    // adb kill
    function adbKillPromise() { return new Promise((resolve, reject) => {
     exec("adb kill-server", (err, stdout, stderr) => {
         if (err) {
           console.error(err);
           return;
         }

         console.log(stdout);
         console.log('---adb kill---');
         resolve();
       });
     });
    };

    // adb start
    function adbStartPromise() { return new Promise((resolve, reject) => {
       exec("adb start-server", (err, stdout, stderr) => {
         if (err) {
           console.error(err);
           return;
         }

         console.log(stdout);
         console.log('---adb start---');
         resolve();
       });
     });
    };

    // adb push promise
    function adbPushPromise() { return new Promise((resolve, reject) => {
     glob(audioPath + "/**/*.mp3", (er, files) => {
         Promise.each(files, (singleMusicFile) => {
           return new Promise((resolve1, reject1) => {
             let cmd = "adb push" + " " + singleMusicFile + " " + "/sdcard/Music";
             exec(cmd, (err, stdout, stderr) => {
               console.log(cmd);
               resolve1();
             });
           });
         })
         .then(() => {
           console.log('---- done push all music ---');
           resolve();
         });

       });
     });
    };

    // Run !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    renamePromise()
     .then(musicPromise)
     .then(adbKillPromise)
     .then(adbStartPromise)
     .then(adbPushPromise)
     .then(() => {
       console.log('---- all done----');
       process.exit(0);
     })
     .catch(err => {
       console.log('Error', err);
       process.exit(1);
     });
  • ffmpeg - Concat multi mp4 files with audio file not working

    29 mars 2017, par Thanh Dao

    I follow this thread to concat multi mp4 files with audio file.
    But its not success. Have a lots error notifications had been displayed. I dont know how to fix it.
    Below is my command :

    "ffmpeg" -f concat -safe 0 \
    -i /path/to/text.txt \
    -i /path/to/audio.mp3 -vsync vfr -vf scale="640:640" -pix_fmt yuv420p \
    /path/to/output.mp4 2>&amp;1

    The detail contents of text.txt

    file '/path/to/file1.mp4'
    file '/path/to/file2.mp4'
    file '/path/to/file3.mp4'
    file '/path/to/file4.mp4'
    file '/path/to/file5.mp4'
    file '/path/to/file6.mp4'
    file '/path/to/file7.mp4'
    file '/path/to/file8.mp4'
    file '/path/to/file9.mp4'
    file '/path/to/file10.mp4'
    file '/path/to/file11.mp4'
    file '/path/to/file12.mp4'
    file '/path/to/file13.mp4'
    file '/path/to/file14.mp4'
    file '/path/to/file15.mp4'
    file '/path/to/file16.mp4'
    file '/path/to/file17.mp4'
    file '/path/to/file18.mp4'

    And some lines of output errors :

    [concat @ 0x357e620] DTS 192000 &lt; 229888 out of order
    [h264 @ 0x36920e0] top block unavailable for requested intra mode -1
    [h264 @ 0x36920e0] error while decoding MB 32 0
    [h264 @ 0x36920e0] concealing 2025 DC, 2025 AC, 2025 MV errors in I frame
    [h264 @ 0x36b7a80] concealing 1449 DC, 1449 AC, 1449 MV errors in P frame
    [h264 @ 0x36ff440] corrupted macroblock 26 1 (total_coeff=-1)
    [h264 @ 0x36ff440] error while decoding MB 26 1
    [h264 @ 0x36ff440] concealing 2003 DC, 2003 AC, 2003 MV errors in P frame
    [h264 @ 0x371af40] concealing 1456 DC, 1456 AC, 1456 MV errors in P frame
    [h264 @ 0x3736a40] ref 5 overflow
    [h264 @ 0x3736a40] error while decoding MB 1 1
    [h264 @ 0x3736a40] concealing 2025 DC, 2025 AC, 2025 MV errors in P frame
    [h264 @ 0x3752520] concealing 1449 DC, 1449 AC, 1449 MV errors in P frame
    [h264 @ 0x376dfa0] P sub_mb_type 8 out of range at 2 1
    [h264 @ 0x376dfa0] error while decoding MB 2 1
    [h264 @ 0x376dfa0] concealing 2025 DC, 2025 AC, 2025 MV errors in P frame
    [h264 @ 0x37a55a0] ref 6 overflow
    [h264 @ 0x37a55a0] error while decoding MB 3 1
    [h264 @ 0x37a55a0] concealing 2025 DC, 2025 AC, 2025 MV errors in P frame
    [h264 @ 0x3789aa0] concealing 1449 DC, 1449 AC, 1449 MV errors in P frame
    [h264 @ 0x36b7a80] ref 5 overflow
    [h264 @ 0x36b7a80] error while decoding MB 4 1
    [h264 @ 0x36b7a80] concealing 2025 DC, 2025 AC, 2025 MV errors in P frame
    [h264 @ 0x36920e0] concealing 1449 DC, 1449 AC, 1449 MV errors in P frame