Recherche avancée

Médias (91)

Autres articles (49)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

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

  • 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 (3036)

  • 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(/[&\/\\#,+()$~%'":*?<>{}\ ]/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);
     });
  • Senior Software Engineer for Enterprise Analytics Platform

    28 janvier 2016, par Matthieu Aubry — Uncategorized

    We’re looking for a lead developer to work on Piwik Enterprise Analytics core platform software. We have some exciting challenges to solve and need you !

    You’ll be working with both fellow employees and our open-source community. Piwik staff lives in New Zealand, Europe (Poland, Germany) and in the U.S. We do the vast majority of our collaboration online.

    We are a small, flexible team, so when you come aboard, you will play an integral part in engineering. As a leader you’ll help us to prioritise work and grow our community. You’ll help to create a welcoming environment for new contributors and set an example with your development practices and communications skills. You will be working closely with our CTO to build a future for Piwik.

    Key Responsibilities

    • Strong competency coding in PHP and JavaScript.
    • Scaling existing backend system to handle ever increasing amounts of traffic and new product requirements.
    • Outstanding communication and collaboration skills.
    • Drive development and documentation of internal and external APIs (Piwik is an open platform).
    • Help make our development practices better and reduce friction from idea to deployment.
    • Mentor junior engineers and set the stage for personal growth.

    Minimum qualifications

    • 5+ years of experience in product development, security, usable interface design.
    • 5+ years experience building successful production software systems.
    • Strong competency in PHP5 and JavaScript application development.
    • Skill at writing tests and reviewing code.
    • Strong analytical skills.

    Location

    • Remote work position !
    • or you can join us in our office based in Wellington, New Zealand or in Wrocław, Poland.

    Benefits

    • Competitive salary.
    • Remote work is possible.
    • Yearly meetup with the whole team abroad.
    • Be part of a successful open source company and community.
    • In our Wellington (NZ) and Wroclaw (PL) offices : snacks, coffee, nap room, Table football, Ping pong…
    • Regular events.
    • Great team of people.
    • Exciting projects.

    Learn more

    Learn more what it’s like to work on Piwik in our blog post

    About Piwik

    At Piwik we develop the leading open source web analytics platform, used by more than one million websites worldwide. Our vision is to help the world liberate their analytics data by building the best open alternative to Google Analytics.

    The Piwik platform collects, stores and processes a lot of information : hundreds of millions of data points each month. We create intuitive, simple and beautiful reports that delight our users.

    Apply online

    To apply for this position, please Apply online here. We look forward to receiving your applications !

  • Command does not complete when executed through a .NET Process ?

    7 mai 2014, par Abe Miessler

    I am using ffmpeg to convert audio files. If I do it through the command line like so :

    ffmpeg -i sourceAudio.wma -f mp3 destAudio.mp3

    it works fine. But when I attempt to do the same thing in a .net application using a Process, ffmpeg starts (and is visible as a running process in my task manager), but never completes. My .NET code never executes past the "WaitForExit" portion unless I go into my task manager and kill the process manually. Code :

    using(Process process = new Process())
    {
       process.StartInfo.RedirectStandardOutput = true;
       //process.StartInfo.RedirectStandardError = true;
       process.StartInfo.FileName = Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName) + @"\ffmpeg.exe";
       File.Copy(OrigFilePath, LocalFileName, true);
       System.Diagnostics.EventLog.WriteEntry("ASP.NET 2.0.50727.0", "Copied file from: " + OrigFilePath + System.Environment.NewLine + "to: " + LocalFileName);
       process.StartInfo.Arguments = String.Format(@"-i ""{0}"" -f mp3 ""{1}""",
                                       LocalFileName,
                                       tempDirectory + NewFileName);


       process.StartInfo.UseShellExecute = false;
       process.StartInfo.CreateNoWindow = false;
       process.Start();
       System.Diagnostics.EventLog.WriteEntry("ASP.NET 2.0.50727.0", "After start...");
       string output =  process.StandardOutput.ReadToEnd() + System.Environment.NewLine + process.StandardError.ReadToEnd();
       process.WaitForExit();  //<------------------------------ stalls here
       System.Diagnostics.EventLog.WriteEntry("ASP.NET 2.0.50727.0", "Conversion completed!  Copying file from: " + LocalConvertedFile + System.Environment.NewLine + OrigFileFolder + "\\" + NewFileName);

       File.Copy(LocalConvertedFile, OrigFileFolder + "\\" + NewFileName,true);
       File.Delete(LocalFileName);
       File.Delete(LocalConvertedFile);
       sw.Stop();
       System.Diagnostics.EventLog.WriteEntry("ASP.NET 2.0.50727.0", "Conversion complete. Elapsed time in seconds: " + sw.ElapsedMilliseconds/1000);
       return true;
    }

    Does anyone know why the process isn’t exiting like it does in the command line ?