Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (96)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (13914)

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

    7 mars 2018, par 57_Wolve

    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";
    }
    ?>
  • 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.

    &lt;?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;