Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (109)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

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

Sur d’autres sites (11562)

  • How to access uploaded file from multer ?

    13 avril 2017, par Somename

    Im able to upload an image to S3. Now, if the file selected is .gif, I want to be able to convert the .gif file to .mp4 and upload the converted file to S3. I am able to convert a .gif to .mp4 with ffmpeg only if I give the path of the file. How do I access the uploaded file from Multer ? Below is my code :

    var express = require('express');
    var bodyParser = require('body-parser');
    var app = express();
    var aws = require('aws-sdk');
    var multer = require('multer');
    var multerS3 = require('multer-s3');
    var s3 = new aws.S3();
    var ffmpeg = require('fluent-ffmpeg');


    var upload = multer({
       storage: multerS3({
           s3: s3,
           bucket: 'myBucket',
           key: function (req, file, cb) {
               console.log(file);
               var extension = file.originalname.substring(file.originalname.lastIndexOf('.')+1).toLowerCase();

                   if(extension=="gif"){
                   console.log("Uploaded a .gif file");

                   ffmpeg(file) //THIS IS NOT WORKING
                       .setFfmpegPath("C:\\ffmpeg\\bin\\ffmpeg.exe")
                         .output('./outputs/2.mp4')    //TRYING TO UPLOAD LOCALLY, WHICH FAILS
                         .on('end', function() {
                           console.log('Finished processing');
                         })
                         .run();
               }

               cb(null, filename);
           }
       })
    });

    I’m trying to access the uploaded file like this : ffmpeg(file) since file is an argument passed in the multer function.

    My form :

    <form action="/upload" method="post" enctype="multipart/form-data">
       <input type="file" /> <br />
       <input type="submit" value="Upload" />
    </form>

    In which part of the process do I convert the file ?

    Please help. Many thanks.

  • ffmpeg and php using ajax javascript

    16 juillet 2014, par user3789242

    I want to make use of ffmpeg for converting an audio file from wav to pcm.upon searching I know that there is a command line to be executed in the php form,and that I need an ajax to execute that command line.but I don’t know what to write in the ajax form nor in the php page.I only know that this is the command line used to convert from wav to pcm

    ffmpeg -i file.wav -f s16be -ar 8000 -acodec pcm_s16be file.raw

    can please somebody help me build my ffmpeg php file and its ajax.thank you in advance.note that i’m very new in ffmpeg

  • How to upload dynamically generated video thumbnails as a BLOB into MySQL database in PHP

    26 novembre 2015, par Parthapratim Neog

    Here is the code that has been used to create a thumbnail of a uploaded video. The thumbnail is automatically generated successfully, but now, I want to store that thumbnail as a BLOB in the Database.
    I know how to upload an image as a BLOB using form posts, but there is no form posts involved in this.

    Could someone guide me through this ?




    <form action="index.php" method="POST" enctype="multipart/form-data">
     <input type="file" />
     <input type="submit" value="Upload" />
    </form>
    &lt;?php
    if(isset($_POST['submit'])){
     /*
     -i input file name
     -an Disabled audio
     -ss Get image from x seconds in the video
     -s  size of the image
     */
     //Get one thumbnail from the video
     $ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg";
     //echo $ffmpeg;
     $videoFile = $_FILES["file"]["tmp_name"];
     $imageFile = "1.jpg";
     $size = "120x90";
     $getFromSecond = 5;

     //echo "<pre>"; print_r($_FILES); die;
     //echo "video location: ",$videoFile,"<br />";
     echo $cmd = "$ffmpeg -i $videoFile -an -ss $getFromSecond -s $size $imageFile";

     echo "<br />";
     if(!shell_exec($cmd)){
      echo "Thumbnail Created!";
     }else{
      echo "Error creating Thumbnail";
     }

     /*// Get multiple thumbnails from one video
     $ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg";
     $videoFile = $_FILES["file"]["tmp_name"];
     $size = "120x90";
     for($num =1; $num&lt;=3; $num++){
      $interval = $num * 3;
      shell_exec("$ffmpeg -i $videoFile -an -ss $interval -s $size $num.jpg");
      echo "Thumbnail Created!- $num.jpg<br />";
     }
     echo "<br />$num thumbnails Created!";
     */
    }
    ?>


    </pre>