Recherche avancée

Médias (91)

Autres articles (92)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (9327)

  • Upload ffmpeg file output to AWS s3 using NodeJS

    29 janvier 2020, par Durrani

    The ffmpeg.output("path/file.mp4") need a string path as an argument to write the output file to it. But s3 bucket.upload(parms, ...) need a Binary File as a value to the Body: in parms JSON

    Problem : Unable to provide file data using the file path to s3 bucket in NodeJS Environment

    FFmpeg()
     .input("source.mp4") //video
     .setStartTime(startTime)
     .setDuration(duration)
     .output(output)    //output file path: string
     .on("end", function() {
       console.log("Processing finished successfully");
       var params = {
         Bucket: process.env.S3_BUCKET,
         Key: "videos/filename.mp4",
         Body: output    //binary file data to be provided not file path
       };
       const bucket = new S3({
         accessKeyId: process.env.S3_ACCESS_KEY_ID,
         secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
         region: process.env.S3_REGION
       });
       bucket.upload(params, function(err, data) {
         console.log(err, data);
       });
     })
     .run();
  • Fluent-ffmpeg and Multer Cut video lenght on Upload

    29 juin 2020, par jjplack

    After setup a simple upload file with Multer, I would like to cut the length and take a screenshot of the video after upload it.

    


    The upload works fine but the FFMPEG did cut the video length.

    


    First I follow the doc added the cut on setStartTime and setDuration.

    


      .setStartTime("00:00:00") 
  .setDuration("00:01:00")


    


    The video still uploaded with full length and then I tried the addInputOption and outputOptions

    


    .addInputOption("-ss 00:00:00 -t 00:01:00")
        .outputOptions([
          "-ss 00:00:00 -t 00:01:00",
        "-c:v libx264",
        "-r 30",
        "-pix_fmt yuv420p"
        ])


    


    The video still uploading with full lenght.

    


    So someone can help ?

    


    Here is the Code

    


      fastify.route({
    method: "POST",
    url: "/posts",
    //userCreateOpts,
    // schema: {
    // body: {
    // type: "object",

    // properties: {
    //video: { type: "string" },
    // title: { type: "string" }
    //}
    //}
    //},
    preValidation: [fastify.retrieveToken, fastify.retrieveUser],
    preHandler: upload.single("video"),

    handler: async function(request, reply) {
      const { Post } = fastify.sequelize;
      const { User } = fastify.sequelize;

      const user = await User.findByPk(request.user.id);

      //const fileInfo = path.parse(request.file.filename);
      const videoPath = "./public/uploads/";

      var params = {
        input: request.file.path,
        start: 0,
        duration: 1,
        output: videoPath
      };

      const proc = new ffmpeg();

      proc
        .addInput(request.file.path)

        .setStartTime("00:00:00") 
        .setDuration("00:01:00")
        //.duration("00:01.00")
        .on("start", function(ffmpegCommand) {
          /// log something maybe
        })
        .on("progress", function(data) {
          /// do stuff with progress data if you want
        })
        .on("end", function() {
          /// encoding is complete, so callback or move on at this point
        })
        .on("error", function(error) {
          /// error handling
        })
        //.addInputOption("-ss 00:00:00 -t 00:01:00")
        //.outputOptions([
        //  "-ss 00:00:00 -t 00:01:00",
        //"-c:v libx264",
        //"-r 30",
        //"-pix_fmt yuv420p"
        //])
        .output(videoPath)
        .run();

      const post = await Post.create({
        video: request.file.path,
        title: request.body.title,
        userId: user.id
    
      });
      reply.code(201).send(post);
    }
  });

  done();
};


    


  • ffmpeg Windows stream desktop real time to web

    14 avril 2019, par ilapasle

    Hello i want to stream my Windows desktop in realtime with ffmpeg

    for capture desktop i use this code :

    ffmpeg.exe -f gdigrab -framerate 60 -i desktop output.mkv

    it’s work

    Now i not want to record video of my desktop but stream my desktop and view this in web browser.
    i need to export stream video in m3u8 file

    i have use this code :

    ffmpeg.exe -f gdigrab -framerate 60 -i desktop -c:v libx264 -crf 18 -maxrate 400k -bufsize 1835k -pix_fmt yuv420p -hls_time 10 -hls_wrap 6 output.m3u8

    in my current dir i have 6 ts file and output.m3u8 but i can not open output.m3u8 file, the file is empty why ?

    i want to read this file in web browser like this code :

       



    <div>
    <video autoplay="true" controls="controls" width="640" height="480">
    <source src="output.m3u8" type="application/x-mpegURL"></source>
    Your browser does not support HTML5 streaming!
    </video>
    </div>

    thanks for advance for your help