Advanced search

Medias (0)

Tag: - Tags -/xml-rpc

No media matches your criterion on the site.

Other articles (97)

  • Installation en mode ferme

    4 February 2011, by

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

  • Websites made ​​with MediaSPIP

    2 May 2011, by

    This page lists some websites based on MediaSPIP.

  • Possibilité de déploiement en ferme

    12 April 2011, by

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus; de pouvoir déployer rapidement une multitude de sites uniques; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

On other websites (10035)

  • Update Database After shell_exec() Using FFMPEG/Laravel

    25 April 2020, by Mike

    I want to update a database record (MySQL) after the FFMPEG process is complete. Normally I would just call a function just after the FFMPEG command, but I needed to add > /dev/null 2>/dev/null & so I didn't have to wait for the FFMPEG process to complete which would mean the REST call would hang for a LONG time and that would cause bad UX for the front-end.

    



    I'm not sure where to begin with it. My first thought is to make a REST request, but maybe calling the method in Laravel directly would be better.

    



    Can I do a curl call after the FFMPEG command? Or can I call a PHP method? Or is there a better way?

    



    PHP FFMPEG Method

    



    private function transcode($movie)
{
    try {
        $name       = 'master.' . $movie->extension;
        $this->path = storage_path('app/public/movies/') . $movie->id . '/';
        $fps        = $this->getFrameRate($name);
        $width      = $this->getVideoWidth($name);
        $height     = $this->getVideoHeight($name);

        // ffmpeg commands
        $c = $this->buildCommand($width, $height, $fps);

        // ffmpeg -  added '> /dev/null 2>/dev/null &' so it will not wait to finish
        $ffmpeg = shell_exec('ffmpeg -i ' . $this->path . $name . ' -progress ' . $this->path . 'transcode.log' . $c . ' > /dev/null 2>/dev/null &');

        return response()->json(['message' => 'transcode initiated'], 200); 

    }
    catch(\Exception $e)
    {
        return response()->json(['error' => $e->getMessage()], 500);
    }
}


    



    Here is the bash curl post idea

    



    $curl = 'curl --data "param1=value1&param2=value2" http://hostname/transcode/complete';

$ffmpeg = shell_exec('ffmpeg -i ' . $this->path . $name . ' -progress ' . $this->path . 'transcode.log' . $c . '; $curl > /dev/null 2>/dev/null &');


    



    I could be going down the wrong path with the above, but I'm trying to move forward with something.

    


  • Matplotlib animation MovieWriters fails on Ubuntu 12.04

    13 February 2013, by jjwebster

    I am attempting to save matplotlib animations to a movie via ffmpeg on Ubuntu 12.04 LTS (32-bit Desktop). Following the matplotlib example, it fails to load the animation writer: AttributeError: 'module' object has no attribute 'writers' (line 15 of the example):

    import numpy as np
    import matplotlib
    matplotlib.use("Agg")
    import matplotlib.pyplot as plt
    import matplotlib.animation as animation

    def update_line(num, data, line):
       line.set_data(data[...,:num])
       return line,

    # Set up formatting for the movie files
    Writer = animation.writers['ffmpeg']

    Via apt-get, I've tried installing ffmpeg, every codec imaginable, and even tried to compile ffmpeg from source. Nothing works.

    How do I get matplotlib to talk to ffmpeg on Ubuntu?

  • Making a video out of frames in Python

    6 June 2021, by amit

    I have to create a video using earlier extracted frames and the following code works fine:

    


    import os
    
fps = 25

os.system("ffmpeg -r fps -i Encode/encode_image%01d.png -vcodec mpeg4 -y movie.mp4")


    


    But storing framerate (which is 25 in this case) in fps variable and passing it in -r, I am getting following error:

    


    


    "Error parsing framerate fps."

    


    


    Meanwhile, the code below, creates a video:

    


    import os

fps = 25
os.system("ffmpeg -r 25 -i Encode/encode_image%01d.png -vcodec mpeg4 -y movie.mp4")


    


    But the framerate is different for every one of my videos (that's why I am storing it in a variable).
Due to above error I am unable to pass different frame rate value each time and, I cannot type the value (like 25) directly.

    


    Please suggest me some way to tackle this problem or provide me with another Python code to combine frames into video.