Recherche avancée

Médias (0)

Mot : - Tags -/api

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

Autres articles (23)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • 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 (6064)

  • imageJpeg and FFMPEG in windows vs linux

    25 janvier 2020, par Tanmay Gawankar

    I have a working code for converting image to a 5 seconds video using FFMPEG.

    The problem is, The code only works for downloaded images, FFMPEG doesn’t convert image to video when image is generated programmatically ONLY IN LINUX.

    PHP code

    <?php
       $downloadedF="folder/d.jpg";
       $downloadedV="folder/d.mp4";
       $renderedF="folder/r.jpg";
       $renderedV="folder/r.mp4";

       $op_d=shell_exec("ffmpeg -r 1/5 -i ".$downloadedF." -c:v libx264 -vf fps=25 -pix_fmt yuv420p ".$downloadedV);
       $op_r=shell_exec("ffmpeg -r 1/5 -i ".$renderedF." -c:v libx264 -vf fps=25 -pix_fmt yuv420p ".$renderedV);

       echo "Errors:<br />".$op_d."<br /><br />".$op_r;
    ?>

    The d.mp4(or output for downloaded image) is getting generated for both Windows and Linux
    The r.mp4(or output for rendered image) gets generated only in Windows and 48 bytes empty file is getting created in Linux

    System :

    XAMPP on Windows 10(Development)
    Godaddy Starter plan hosting - Linux(Probably redhat)(Production)

    File Structure

    root folder
       |-index.php
       |-ffmpeg (will be ffmpeg.exe in Windows)
       |-folder
           |-d.jpg (random downloaded image from google)
           |-d.mp4 (Will be created - video converted from downloaded image)
           |-r.jpg (rendered image using php imagejpg)
           |-r.mp4 (Will be created - video converted from rendered image)

    Rendered Image Code :

    $imgFF = imagecreatetruecolor($videoWidth, $videoHeight);
    //---adding many text using imagettftext();
    imagejpeg($imgFF, $path."-000.jpg");  //for this example, I copied output to folder as r.jpg

    Edit 1 :

    The return value of shell_exec has no error/output even after adding

    error_reporting(E_ALL);
    ini_set('display_errors', 1);

    Edit 2 :

    The log for successful conversion can be found at Here
    The log for unsuccessful conversion of rendered image can be found at Here

    Note :

    • The scenario here is minimized and code is separated from long code.
    • In Linux command i add ./ for FFMPEG

  • Mute parts of Wave file using Python/FFMPEG/Pydub

    20 avril 2020, par Adil Azeem

    I am new to Python, please bear with me. I have been able to get so far with the help of Google/StackOverflow and youtube :). So I have a long (2 hours) *.wav file. I want to mute certain parts of that file. I have all of those [start], [stop] timestamps in the "Timestamps.txt" file in seconds. Like this :

    &#xA;&#xA;

       0001.000 0003.000&#xA;   0744.096 0747.096&#xA;   0749.003 0750.653&#xA;   0750.934 0753.170&#xA;   0753.210 0754.990&#xA;   0756.075 0759.075&#xA;   0760.096 0763.096&#xA;   0810.016 0811.016&#xA;   0815.849 0816.849&#xA;

    &#xA;&#xA;

    What I have been able to do is read the file and isolate each tuple. I have just output the first tuple and printed it to check if everything looks good. It seems that the isolation of tuple works :) I plan to count the number of tuples (which is 674 in this case) and put in a 'for loop' according to that count and change the start and stop time according to the tuple. Perform the loop on that single *.wav file and output on file with muted sections as the timestamps. I have no idea how to implement my thinking with FFMPEG or any other utility in Python e.g pydub. Please help me.

    &#xA;&#xA;

       with open(&#x27;Timestamps.txt&#x27;) as f:&#xA;   data = [line.split() for line in f.readlines()]&#xA;   out = [(float(k), float(v)) for k, v in data]&#xA;&#xA;   r = out[0] &#xA;   x= r[0]&#xA;   y= r[1]&#xA;   #specific x and y values&#xA;   print(x)&#xA;   print(y)&#xA;

    &#xA;

  • how to create video from ffmpeg ?

    4 mai 2020, par Hong

    I have 10 images, 2 videos(mov, mp4) and 1 audio.

    &#xA;&#xA;

    My plan is

    &#xA;&#xA;

      &#xA;
    1. create images to video (images.mp4)
    2. &#xA;

    &#xA;&#xA;

    ffmpeg -framerate 0.75 -pattern_type glob -i &#x27;*.png&#x27; \&#xA; -c:v libx264 -vf "format=yuv420p,pad=ceil(iw/2)*2:ceil(ih/2)*2" -r 30 -pix_fmt yuv420p out.mp4  &#xA;

    &#xA;&#xA;

      &#xA;
    1. concat videos&#xA;filelist :
    2. &#xA;

    &#xA;&#xA;

    file &#x27;images.mp4&#x27;&#xA;file &#x27;video1.mov&#x27;&#xA;file &#x27;video2.mp4&#x27;&#xA;

    &#xA;&#xA;

    2-1 )&#xA;ffmpeg -f concat -safe 0 -i filelist.txt -auto_convert 1 -c copy output.mp4

    &#xA;&#xA;

    2-2 ) first. i'm encode mov to mp4. and change filelist.txt

    &#xA;&#xA;

    file &#x27;images.mp4&#x27;&#xA;file &#x27;video1.mp4&#x27;&#xA;file &#x27;video2.mp4&#x27;&#xA;ffmpeg -f concat -safe 0 -i filelist.txt -auto_convert 1 -c copy output.mp4&#xA;

    &#xA;&#xA;

      &#xA;
    1. add background music.&#xA;It has not yet reached this stage.&#xA;It's blocked in plan 2.
    2. &#xA;

    &#xA;&#xA;

    this plan is right ?&#xA;I'm not sure about this plan.

    &#xA;&#xA;

    Step 2 output is strange.&#xA;The frame of the video No. 1 and No. 2 is not smooth.

    &#xA;&#xA;

    How can I create video from images and meger another video.

    &#xA;