Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (32)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (2906)

  • Problem with ffmpeg function avformat_seek_file()

    14 mars 2020, par Kael

    I am trying to seek the given frame in the video using ffmpeg library. I knew that there is av_seek_frame() function but it was recommended to use avformat_seek_file()instead. Something similar mentioned here.

    I know that avformat_seek_file() can’t always take you to exact frame you want, but this is ok for me. I just want to jump to the nearest keyframe. So i open the video, find videostream and calling it like this :

    avformat_seek_file( formatContext, streamId, 0, frameNumber, frameNumber, AVSEEK_FLAG_FRAME )

    It always returns 0, so i understand it as correct finish. However, it doesn’t work as it should to. I check byte position like here before and after calling avformat_seek_file(). Actually it changes, but it changes always in the same way whenever i’m trying to put different target frame numbers ! I mean that byteposition after this call is always same even with different frameNumber values. Obviously, i’m doing something wrong but i don’t know what exactly. I don’t know if it does matter but i’m using .h264 files for that. I tried different flags, different files, using timestamps instead of frames, flushing buffers before and after and so on but it doesn’t work for me. I will be very grateful if someone could show me what is wrong with it.

  • Cannot find the class in php oop [duplicate]

    30 décembre 2018, par mr stark

    This question already has an answer here :

    I’m trying to make a class for video streaming with FFMpeg Php package.

    I’m getting this error on browser :

    Fatal error : Uncaught Error : Class ’Classes\Video’ not found in C :\xampp\htdocs\php\index.php:5 Stack trace : #0 main thrown in C :\xampp\htdocs\php\index.php on line 5

    this is my index.php :

     use Classes\Video;

     $video = new Video();

     $video->videoStreaming("video.mp4",320,240,"myVideo","WMV");

    and Video in Classes directory :

       namespace Classes;
       use FFMpeg\Coordinate\Dimension;
       use FFMpeg\FFMpeg;
       use FFMpeg\Format\Video\WMV;
       require "../vendor/autoload.php";

       class Video
       {
           private $ffmpeg;
           private $video;

    public function __construct()
    {
       $this->ffmpeg = FFMpeg::create([
           'ffmpeg.binaries' => 'C:\ffmpeg\ffmpeg.exe',
           'ffprobe.binaries' => 'C:\ffmpeg\ffprobe.exe',
           'timeout' => 3600,
           'ffmpeg.threads' => 12,
       ]);
    }

    public function videoStreaming($videoPath,$width,$height,$newName,$newExtension)
    {
       $this->video = $this->ffmpeg->open($videoPath);
       if ($width && $height) {
           $this->video->filters()->resize(new Dimension($width,$height))->synchronize();
       }
       $this->video->save(new WMV(), $newName . $newExtension);
    }

       }
  • FFMPEG is not working in AWS lambda function

    13 novembre 2022, par Arun

    I am trying to convert a video file into an audio file using AWS lambda function whenever a file is uploaded into an S3 bucket. So I am using FFMPEG for converting a video file into audio. But I keep getting this error while converting a video file. I have seen similar questions but none of the solutions is not working for me. So If anyone knows please share your solutions.

    



    Error message

    



        TypeError: Cannot create property 'stack' on string 
'Could not find ffmpeg executable, tried "/var/task/node_modules/@ffmpeg-installer/linux-x64/ffmpeg" and "/var/task/node_modules/@ffmpeg-installer/ffmpeg/node_modules/@ffmpeg-installer/linux-x64/ffmpeg"'


    



    Code

    



        const
    ffmpegPath = require("@ffmpeg-installer/ffmpeg").path,
    ffmpeg = require("fluent-ffmpeg");

    // set ffmpeg package path
    ffmpeg.setFfmpegPath(ffmpegPath);
    function convert(input, output, callback) {
        ffmpeg(input)
            .output(output)
            .on('end', function() {                    
                console.log('conversion ended');
                callback(null);
            }).on('error', function(err){
                console.log('error: ', err.code, err.msg);
                callback(err);
            }).run();
    }

    exports.handler = function (event, context, callback) {
        const key = decodeURIComponent(event.Records[0].s3.object.key.replace(/\+/g, ' '));
        console.log("key ", key);
        console.log("event ", event.Records[0].s3);
        convert(key, `/tmp/${key}.mp3`, function(err){
            if(!err) {
                console.log('conversion complete');
            } else {
                console.log('Error');
            }
        });
    }


    const
        ffmpegPath = require("@ffmpeg-installer/ffmpeg").path,
        ffmpeg = require("fluent-ffmpeg");

    // set ffmpeg package path
    ffmpeg.setFfmpegPath(ffmpegPath);
    function convert(input, output, callback) {
        ffmpeg(input)
            .output(output)
            .on('end', function() {                    
                console.log('conversion ended');
                callback(null);
            }).on('error', function(err){
                console.log('error: ', err.code, err.msg);
                callback(err);
            }).run();
    }

    exports.handler = function (event, context, callback) {
        const key = decodeURIComponent(event.Records[0].s3.object.key.replace(/\+/g, ' '));
        console.log("key ", key);
        console.log("event ", event.Records[0].s3);
        convert(key, `/tmp/${key}.mp3`, function(err){
            if(!err) {
                console.log('conversion complete');
            } else {
                console.log('Error');
            }
        });
    }


    



    package.json

    



        "dependencies": {
    "@ffmpeg-installer/ffmpeg": "^1.0.17",
    "fluent-ffmpeg": "^2.1.2",
    "fs": "0.0.1-security"
  }