Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

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

Autres articles (101)

  • Les sons

    15 mai 2013, par
  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

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

Sur d’autres sites (12128)

  • Cannot display a decoded video frame on Raylib

    20 décembre 2024, par gabriel_tiso

    I'm trying to explore libav and raylib just to understand how audio and video work, and also to learn how to build nice interfaces using the raylib project. I've implemented a simple struct capable of decoding audio and video frames. When a video frame appears, I convert it to the RGBA format, which packs the values into 32bpp. This is the setup :

    


        if (av_image_alloc((uint8_t **)media->dst_frame->data,
                       media->dst_frame->linesize, media->ctxs[0]->width,
                       media->ctxs[0]->height, AV_PIX_FMT_RGBA, 1) < 0) {
        fprintf(stderr, "Failed to setup dest image\n");
        return -1;
    }

    media->sws_ctx = sws_getContext(
        media->ctxs[0]->width, media->ctxs[0]->height, media->ctxs[0]->pix_fmt,
        media->ctxs[0]->width, media->ctxs[0]->height, AV_PIX_FMT_RGBA,
        SWS_BILINEAR, NULL, NULL, 0);

    // Later on, in the decode function:
    int ret = sws_scale(media->sws_ctx, media->frame->data,
                            media->frame->linesize, 0, media->frame->height,
                            media->dst_frame->data, media->dst_frame->linesize);



    


    In the main file, I init raylib, and setup the necessary steps to load the texture (here I'm trying to fetch the first video frame in order to show the user a preview of the video, later on I plan to reset the stream to allow a correct playback routine). I think the format of the image is right.

    


        Image previewImage =
        GenImageColor(videoArea.width, videoArea.height, BLACK);
    // I assume this makes the formats compatible
    ImageFormat(&previewImage, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8);

    Texture2D videoTexture = LoadTextureFromImage(previewImage);
    UnloadImage(previewImage);


    


    
        if (!state->has_media) {
            DrawText("Drop a video file here!", videoArea.x + 10,
                     videoArea.y + 10, 20, GRAY);
        } else {
            if (state->first_frame) {
                do {
                    decode_packet(state->media);
                } while (!is_frame_video(state->media));

                UpdateTexture(videoTexture, state->media->dst_frame->data[0]);

                state->first_frame = 0;
            }
        }

        DrawTexture(videoTexture, videoArea.x, videoArea.y, WHITE);


    


    Anyway, this is what I get when a mp4 file is dropped :
raylib window

    


    It seems like an alignment issue maybe ? Can someone point me in the right direction in order to correctly solve this problem ?

    


  • how to display raw ID3D11Texture2D using Direct3D 11 ? [closed]

    4 novembre 2024, par SkillfulElectro

    I’m working on a video decoding project using Ffmpeg and Direct3D 11, where I obtain frames in the format ID3D11Texture2D. My goal is to display these frames directly without transferring data back to the CPU, in order to minimize overhead.

    


    I’ve decided to use Direct3D 11 for rendering, but I’m unsure of the best approach to efficiently display the ID3D11Texture2D textures.

    


    Could someone provide guidance, relevant keywords, or example code on how to render these textures directly to the screen ?

    


    Environment : Ffmpeg, Direct3D 11

    


    What I’ve tried :

    


      

    • I’ve researched methods for rendering textures in Direct3D but haven’t found a clear, CPU-efficient approach.
    • 


    


    Any advice or code samples ?

    


  • Issues with VLC Displaying FFmpeg Stream from NamedPipeServerStream : Freezing and No Display on Late Start [closed]

    15 juillet 2024, par Roy Raihenshtein

    Disclaimer :

    


    This is a follow-up question to :
Streaming an updating folder of images with ffmpeg without restarting the script.

    


    After implementing my NamedPipeServerStream as a dynamic input (which works great), I've encountered two issues :

    


    If I don't start VLC network streaming before the application that contains the pipe, VLC will not display anything.
After roughly 30-40 seconds, the output image freezes for 40-70 seconds, then becomes active again for about 20 seconds before freezing again.
Here is my FFmpeg command :

    


    ffmpeg -f image2pipe -vcodec mjpeg -framerate 8 -pixel_format bgra -video_size 2048x2048 -i \\.\pipe\imagePipe -b:v 512k -bufsize 1024k -c:v libx264 -preset ultrafast -tune zerolatency -crf 35 -pix_fmt yuv444p -f mpegts udp://127.0.0.1:8554?pkt_size=1316&buffer_size=64k


    


    Additional details :

    


      

    • The pipe is being filled at a rate of 40 fps.
Each frame takes 16 MB.

      


    • 


    • Is it possible that I can't rely on the output when I use my machine as both the input and output ?

      


    • 


    


    I'm using .NET Framework 4.7.2 and WinForms. For playback, I use the VLC application.