Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (111)

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (9288)

  • 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";
    }
    ?>
  • ffmpeg in server cant upload video over 4 minutes

    12 octobre 2020, par Victor01288888

    here's my code

    &#xA;

      ffmpeg(stream)&#xA;      .output(videoPath)&#xA;      .on("start", function () {&#xA;        console.log("Starting video compression... please wait...");&#xA;      })&#xA;      .on("error", function (err) {&#xA;        console.log("Something went wrong: " &#x2B; err.message &#x2B; " " &#x2B; err.name);&#xA;      })&#xA;      .outputOptions(&#xA;        "-vcodec",&#xA;        "libx264",&#xA;        "-crf",&#xA;        "35", // change the crf value: high = lower quality &amp; size, low = higher quality &amp; size&#xA;        "-format",&#xA;        "mp4"&#xA;      )&#xA;      .on("progress", function (progress) {&#xA;        console.log(&#xA;          "Processing: " &#x2B;&#xA;            Math.round(progress.currentKbps / progress.targetSize) &#x2B;&#xA;            "% done"&#xA;        );&#xA;      })&#xA;      .on("end", async function () {&#xA;        console.log("[ffmpeg] processing done");&#xA;        // finish compressing then upload to S3&#xA;        console.log("uploading to S3... please wait");&#xA;        // const stream2 = await fileType.stream(createReadStream());&#xA;        let stream2 = fs.createReadStream(videoPath);&#xA;        // saving data in aws(s3)&#xA;        let origin = uploadToS3(`${newFileName}`);&#xA;        stream2.pipe(origin.writeStream);&#xA;&#xA;        origin &amp;&amp; (await origin.promise);&#xA;        await Video.updateOne({ _id: video._id }, { status: "success" });&#xA;&#xA;        // del tmp video&#xA;        fs.unlink(videoPath, (err) => {&#xA;          if (err) {&#xA;            console.error(err);&#xA;          }&#xA;          console.log("Converted file delete from tmp folder server");&#xA;        });&#xA;      })&#xA;      .run();&#xA;

    &#xA;

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

    &#xA;

  • 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