Recherche avancée

Médias (91)

Autres articles (1)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (2933)

  • Using Hazel to execute ffmpeg (installed via Homebrew) script to convert video to .gif

    9 août 2018, par benbennybenben

    What I want to do is set Hazel to watch a folder for a new video that I create and then when matched, an embedded FFMPEG script converts the video into a gif.

    I have the matching criteria done,
    Hazel matching rules

    I have the ffmpeg recipe done,

    ffmpeg -ss 5.0 -t 2.5 -i $1 -r 15 -filter_complex "[0:v] fps=15, scale=500:-1, split [a][b];[a] palettegen [p]; [b][p] paletteuse" $1.gif

    But when I put the ffmpeg recipe in the "Embedded Script" dialogue box, I get an error when the match runs.

    2018-08-09 18:43:15.818 hazelworker[68549] [Error] Shell script failed: Error processing shell script on file /Users/bengregory/Scripts/khgfygfjhbvmnb.mp4.
    2018-08-09 18:43:15.818 hazelworker[68549] Shellscript exited with non-successful status code: -900

    I’m not sure if it’s relevant to mention that I’ve install ffmpeg via homebrew

    This is what the embedded shell script looks like
    ffmpeg embedded script

    I’ve been trying to get this to work for weeks and so far not found anything that helps. I read through this article on how to use handbrakeCLI, but no luck
    Hazel and HandbrakeCLI tutorial

    Any help would be greatly received ! Cheers

  • FFMPEG error when making animations with certain frame dimensions

    10 août 2018, par jtam

    I have been using ffmpeg to successfully generate animations of png images with a size of 7205x4308 with the following command :

    -framerate 25 -f image2 -start_number 1 -i fig%4d.png -f mp4 -vf scale=-2:ih -vcodec libx264 -pix_fmt yuv420p 2015-2018.mp4

    When I try to run the same command for a group of images with a different size, e.g., 6404x5575, I get the following error :

    Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
    Conversion failed!

    I have concluded that the reason it is failing has something to do with the frame size because that is the only thing that is different between the first successful animation and the one that is failing. But, my intuition could be wrong(?). I have tried to remove the scaling parameter in the command but I get the same error.

    I am using ffmpeg version 3.4.2 on Mac OSX 10.13 via python.

    Any help would be much appreciated. Thanks !

  • How to Extract Frames from the uploaded video through ffmpeg using node js ?

    2 février 2021, par Aditya Vyas

    I have created application in which user uploads a video , from that video i want to extract 50 images using ffmpeg in nodejs, but i am unable to get that file after uploading it in specific folder. I am uploading video through multer as it stores video in specified folder, after that i read that video using read stream but it is not giving proper information on that particular video

    


    Code :

    


    var express = require('express');

var app = express();

var bodyParser = require('body-parser');

var path = require('path');

var multer = require('multer');

var cfenv = require('cfenv');

var watson = require('watson-developer-cloud');

var ffmpeg = require('ffmpeg');

app.use(bodyParser.json());

app.use(bodyParser.urlencoded({"extended": false}));

app.use(express.static(__dirname + '/public'));

var storage = multer.diskStorage({
    destination: function(req, file, callback){
        callback(null, './public/class'); // set the destination
    },
    filename: function(req, file, callback){
        callback(null, 199212+ '.avi'); // set the file name and extension
    }
});

var upload = multer({storage: storage});
 
 app.upload = upload;
 
 // get the app environment from Cloud Foundry
 var appEnv = cfenv.getAppEnv();

var VisualRecognitionV3 = require('watson-developer-cloud/visual-recognition/v3');

var fs = require('fs');


var visualRecognition = new VisualRecognitionV3({
  version: '2018-03-19',
  iam_apikey: 'aaIFu-fHWBXgj09eVarEQUFlIaTeH9bpgvRqHIJxu_8N'
});


app.post('/imgtable',app.upload.single('video-upl'),function(req,res){
                
    var video_file = fs.createReadStream(req.file.path);
                                    
 try {
    var process = new ffmpeg('./public/class/199212.avi');
    process.then(function (video) {
        // Video metadata
        console.log('******************************');
        console.log(video);
        // FFmpeg configuration
        console.log('*********************************');
        console.log(video.info_configuration);
    }, function (err) {
        console.log('Error: ' + err);
    });
} catch (e) {
    console.log(e.code);
    console.log(e.msg);
}

    
})

app.listen(3000);`