Recherche avancée

Médias (1)

Mot : - Tags -/portrait

Autres articles (62)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (9777)

  • Free music recognition API

    12 mars 2014, par AmirH

    I'm developing an application to recognize the music played by speakers. It records 32 seconds of the sound played and send a request via an API of music recognition. So far I used Echonest. But my api_key has been banned because of to many requests since I published my freeware, used by more than 200 users.

    So I looked for MusicBrainz but it needs the exact duration of the entire song to receive a acceptable response, duration that my application can't guess.

    So I'm looking for a free music recognition API so my freeware works. Do you know one ?

    Note : I used Echonest by :

    I tried to use MusicBrainz by :

    • capturing 32 seconds with ffmpeg
    • generating the fingerprint using Chromaprint with this command :

      fpcalc sound.mp3 > fingerprint.txt

    • sending this command via cURL :

      curl -F "client=XXX" -F "meta=recordings" -F "duration=32" -F "fingerprint=ABC" "http://api.acoustid.org/v2/lookup" > info.txt

  • ffmpeg in server cant upload video over 4 minutes

    12 octobre 2020, par Victor01288888

    here's my code

    


      ffmpeg(stream)
      .output(videoPath)
      .on("start", function () {
        console.log("Starting video compression... please wait...");
      })
      .on("error", function (err) {
        console.log("Something went wrong: " + err.message + " " + err.name);
      })
      .outputOptions(
        "-vcodec",
        "libx264",
        "-crf",
        "35", // change the crf value: high = lower quality & size, low = higher quality & size
        "-format",
        "mp4"
      )
      .on("progress", function (progress) {
        console.log(
          "Processing: " +
            Math.round(progress.currentKbps / progress.targetSize) +
            "% done"
        );
      })
      .on("end", async function () {
        console.log("[ffmpeg] processing done");
        // finish compressing then upload to S3
        console.log("uploading to S3... please wait");
        // const stream2 = await fileType.stream(createReadStream());
        let stream2 = fs.createReadStream(videoPath);
        // saving data in aws(s3)
        let origin = uploadToS3(`${newFileName}`);
        stream2.pipe(origin.writeStream);

        origin && (await origin.promise);
        await Video.updateOne({ _id: video._id }, { status: "success" });

        // del tmp video
        fs.unlink(videoPath, (err) => {
          if (err) {
            console.error(err);
          }
          console.log("Converted file delete from tmp folder server");
        });
      })
      .run();


    


    I uses this code in my server.
If I upload video in 1 minute it's ok.
But when I upload one more then 4 minute it just not appears in AWS.
and the journey only writes 0% without any error.

    


  • On upload rename the file to input.mp4 not working [SOLVED]

    14 février 2015, par T.A.R.D.I.S_wolf

    Ok so i’m trying to make it to were the file is uploaded then renamed to input.mp4 so that it over rights the old one. But its not working ?

    But it still keeps uploading with the original file name.
    Or is there a way to just delete the files in the folder uploads after 30 min ? Both the uploaded file and output file.

    <?php
    $fileName = $_FILES["file1"]["name"]; // The file name
    $fileTmpLoc = $_FILES["file1"]["tmp_name"]; // File in the PHP tmp folder
    $fileType = $_FILES["file1"]["type"]; // The type of file it is
    $fileSize = $_FILES["file1"]["size"]; // File size in bytes
    $fileErrorMsg = $_FILES["file1"]["error"]; // 0 for false... and 1 for true
    if (!$fileTmpLoc) { // if file not chosen
       echo "ERROR: Please browse for a file before clicking the upload button.";
       exit();
    }

       $newfilename = $fileName . input.mp4';
       rename($fileName, $newfilename);

    if(move_uploaded_file($fileTmpLoc, "uploads/$newfilename")){

     echo "Starting ffmpeg... <br />";
     echo shell_exec("ffmpeg -y -i uploads/".$newfilename." uploads/output.mp3");
     echo "Done. <br /><br />";

    echo '<a href="http://test.tw-wcs.com:82/ffmpeg/MP4_To_MP3/uploads/output.mp3" target="_blank">Click Here</a> To open your file in a new tab.';

    } else {
       echo "move_uploaded_file function failed";
    }
    ?>