Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (40)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (8034)

  • Converting ffmpeg & ffprobe outputs to variables in an ffmpeg AWS Lambda Layer

    7 mars 2019, par Gracie

    I have two tasks I am trying to perform with the ffmpeg AWS Lambda layer.

    1) Convert an audio file from stereo to mono (with ffmpeg)

    2) Get the duration of the audio file and pass the result to a variable (with ffprobe)

    const { spawnSync } = require("child_process");
    const { readFileSync, writeFileSync, unlinkSync } = require("fs");
    const util = require('util');
    var fs = require('fs');

    exports.handler = (event, context, callback) => {

       // Windows 10 ffmpeg command to convert stereo to ffmpeg is
       // ffmpeg -i volando.flac -ac 1 volando-mono.flac

       // Convert from stereo to mono
       spawnSync(
           "/opt/bin/ffmpeg",
           [
               "-i",
               `volando.flac`,
               "-ac",
               "1",
               `/tmp/volando-mono.flac`
           ],
           { stdio: "inherit" }
       );

       //Pass result to a variable
       //var duration = stdio;

       //Read the content from the /tmp directory
       fs.readdir("/tmp/", function (err, data) {
           if (err) throw err;
           console.log('Contents of tmp file: ', data);
       });

       // Get duration of Flac file
       // Windows 10 ffmpeg command is
       // ffprobe in.wav -show_entries stream=duration -select_streams a -of compact=p=0:nk=1 -v 0
       spawnSync(
           "/opt/bin/ffprobe",
           [
               `in.wav`,
               "-show_entries",
               "stream=duration",
               "-select_streams",
               "a",
               "-of",
               "compact=p=0:nk=1",
               "-v",
               "0"
           ],
           { stdio: "inherit" }

           //Pass result to a variable
           //var duration = stdio;
       );

    };

    Can anyone who has had success with this ffmpeg Lambda layer help get an output for these commands ?

    Here are some resources regarding the FFmpeg Lambda layer :

    https://serverless.com/blog/publish-aws-lambda-layers-serverless-framework/
    https://github.com/serverlesspub/ffmpeg-aws-lambda-layer
    https://devopstar.com/2019/01/28/serverless-watermark-using-aws-lambda-layers-ffmpeg/

  • How to generate video thumbnail in NodeJs ?

    8 septembre 2020, par Schüler

    I am trying to generate video thumbnail but I am not getting an idea how to do that, I tried using fluent-ffmpeg & Video-thumbnail libraries but I don't know how to use them. Please, someone, help me
Note I cannot usersocket.io in my project

    



    I have tried this

    



    const ffmpeg = require('fluent-ffmpeg');
const ffmpeg_static = require('ffmpeg-static');    
 ffmpeg(req.file.path)
          .screenshots({
            timestamps: [0.0],
            filename: 'xx.png',
            folder: upload_folder
          }).on('end', function() {
            console.log('done');
          });


    



    getting this error

    



    events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: Cannot find ffmpeg


    


  • How can I get duration of a video in java program using ffmpeg ?

    4 mars 2019, par J Jain

    I want to get duration of video and save it to database. I am running a java program to convert video into mp4 format, after conversion I want to get the duration of video.

    [How to extract duration time from ffmpeg output ?

    I have gone threw this link, that command is running well in cmd, but it is giving ’exit code = 1’ with java program.

    Here is code :-

    String videoDuration = "" ;
    List args1 = new ArrayList() ;

       args1.add("ffmpeg");
       args1.add("-i");
       args1.add(videoFilePath.getAbsolutePath());
       args1.add("2>&1");
       args1.add("|");
       args1.add("grep");
       args1.add("Duration");
       args1.add("|");
       // args.add("awk");
       // args.add("'" + "{print $2}" + "'");
       // args.add("|");
       args1.add("tr");
       args1.add("-d");
       args1.add(",");

       String argsString = String.join(" ", args1);

       try
       {
           Process process1 = Runtime.getRuntime().exec(argsString);
           logger.debug(strMethod + " Process started and in wait mode");
           process1.waitFor();
           logger.debug(strMethod + " Process completed wait mode");
           // FIXME: Add a logger increment to get the progress to 100%.
           int exitCode = process1.exitValue();
           if (exitCode != 0)
           {
               throw new RuntimeException("FFmpeg exec failed - exit code:" + exitCode);
           }
           else
           {
               videoDuration = process1.getOutputStream().toString();
           }
       }
       catch (IOException e)
       {
           e.printStackTrace();
           new RuntimeException("Unable to start FFmpeg executable.");
       }
       catch (InterruptedException e)
       {
           e.printStackTrace();
           new RuntimeException("FFmpeg run interrupted.");
       }
       catch (Exception ex)
       {
           ex.printStackTrace();
       }

       return videoDuration;

    Updated Code :-

      List<string> args1 = new ArrayList<string>();

       args1.add("ffprobe");
       args1.add("-i");
       args1.add(videoFilePath.getAbsolutePath());
       args1.add("-show_entries");
       args1.add("format=duration");
       args1.add("-v");
       args1.add("quiet");
       args1.add("-of");
       args1.add("csv=\"p=0\"");
       args1.add("-sexagesimal");

       String argsString = String.join(" ", args1);

       try
       {
           Process process1 = Runtime.getRuntime().exec(argsString);
       }
       catch (InterruptedException e)
       {
               e.printStackTrace();
           }
    </string></string>