Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (64)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (13667)

  • Anomalie #3216 : Cron ne se déclenchant plus ?

    15 mai 2014, par Maïeul Rouquette

    si besoin je peux activer des logs + complet.

  • 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 ?

    


  • Setting individual pixels of an RGB frame for ffmpeg encoding

    15 mai 2013, par Camille Goudeseune

    I'm trying to change the test pattern of an ffmpeg streamer, Trouble syncing libavformat/ffmpeg with x264 and RTP , into familiar RGB format. My broader goal is to compute frames of a streamed video on the fly.

    So I replaced its AV_PIX_FMT_MONOWHITE with AV_PIX_FMT_RGB24, which is "packed RGB 8:8:8, 24bpp, RGBRGB..." according to http://libav.org/doxygen/master/pixfmt_8h.html .

    To stuff its pixel array called data, I've tried many variations on

    for (int y=0; y/  const double j = y/double(HEIGHT);
       rgb[0] = 255*i;
       rgb[1] = 0;
       rgb[2] = 255*(1-i);
     }
    }

    At HEIGHTxWIDTH= 80x60, this version yields
    screenshot of red-to-blue stripes, when I expect a single blue-to-red horizontal gradient.

    640x480 yields the same 4-column pattern, but with far more horizontal stripes.

    640x640, 160x160, etc, yield three columns, cyan-ish / magenta-ish / yellow-ish, with the same kind of horizontal stripiness.

    Vertical gradients behave even more weirdly.

    Appearance was unaffected by an AV_PIX_FMT_RGBA attempt (4 not 3 bytes per pixel, alpha=255). Also unaffected by a port from C to C++.

    The argument srcStrides passed to sws_scale() is a length-1 array, containing the single int HEIGHT.

    Access each Pixel of AVFrame asks the same question in less detail, so far unanswered.

    The streamer emits one warning, which I doubt affects appearance :

    [rtp @ 0x269c0a0] Encoder did not produce proper pts, making some up.

    So. How do you set the RGB value of a pixel in a frame to be sent to sws_scale() (and then to x264_encoder_encode() and av_interleaved_write_frame()) ?