Recherche avancée

Médias (0)

Mot : - Tags -/publication

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

Autres articles (57)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (7679)

  • Révision 99882 : Revert de r99881 finalement car wikipedia indique que l’abbréviation de numéro es...

    10 octobre 2016, par marcimat@rezo.net

    https://fr.wikipedia.org/wiki/%E2%84%96 … bon… tant pis pour le title du coup.

  • Calling ffmpeg from php

    7 juillet 2013, par v3ga

    I need to run ffmpeg from a php script. The ffmpeg wiki page on the same topic (http://ffmpeg.org/trac/ffmpeg/wiki/Using%20FFmpeg%20from%20PHP%20scripts) suggests using shell_exec over ffmpeg-php. Some other pages suggests using ffmpeg-php. Which method is better ? Is ffmpeg-php compatible with latest versions of php ? My only purpose is to convert any videos hosted by the user into mp4 (h.264,aac).

  • Pass individual frames as BGRA byte array and set the timestamps via pipe to FFmpeg

    30 juillet 2023, par Nicke Manarin

    I have a set of images (as BGRA byte[]) with their respective timestamps in milliseconds and I want to pass it to FFmpeg to build an animation.

    


    I'm using FFmpeg v6 right now and in this example I'm expecting a GIF as output, but I'm going to export to multiple formats later.

    


    var arguments = "-vsync passthrough  
-f rawvideo 
-pix_fmt bgra 
-video_size {width}x{height} 
-i -  
-loop 0 
-lavfi palettegen=stats_mode=diff[pal],[0:v][pal]paletteuse=new=1:dither=sierra2_4a:diff_mode=rectangle 
-f gif 
-y \"C:\Users\User\Desktop\test.gif\"";

var process = new Process
{
    StartInfo = new ProcessStartInfo
    {
        FileName = "./ffmpeg.exe",
        Arguments = arguments.Replace("{width}", width.ToString()).Replace("{height}", height.ToString()),
        RedirectStandardInput = true,
        RedirectStandardOutput = true,
        UseShellExecute = false,
        CreateNoWindow = true
    }
};

_process.Start();



    


    Then on my render loop, I'm trying to send the frames and their timestamps one by one.

    


    public void EncodeFrame(IntPtr bufferAddress, int bufferStride, int width, int height, int index, long timestamp, int delay)
{
    var frameSize = height * bufferStride;
    var frameBytes = new byte[frameSize];
    System.Runtime.InteropServices.Marshal.Copy(bufferAddress, frameBytes, 0, frameSize);

    _process.StandardInput.BaseStream.Write(frameBytes, 0, frameSize);
    _process.StandardInput.BaseStream.Write(_delimiter, 0, _delimiter.Length);
    _process.StandardInput.BaseStream.Write(BitConverter.GetBytes(timestamp), 0, sizeof(long));
}


    


    The issue is that I'm getting an IOException (The pipe has been ended), so probably I'm not sending the frames correctly (not sending the delimiter and timestamp doesn't help).

    


    Is this even possible ?