Recherche avancée

Médias (91)

Autres articles (23)

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

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

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (4012)

  • Render FFmpeg AVFrame as OpenGL texture ?

    5 mars 2019, par ZeroDefect

    I’m attempting to to render a jpeg image (1024x1024 pixels) in the form of an FFmpeg AVFrame as a texture in OpenGL. What I get instead is something that appears as a 1024x1024 dark green quad :

    dark green quad screenshot

    The code to render the AVFrame data in OpenGL is shown below. I have convinced myself that the raw RGB data held within the FFmpeg AVFrame data is not solely dark green.

    GLuint g_texture = {};

    //////////////////////////////////////////////////////////////////////////
    void display()
    {
       // Clear color and depth buffers
       glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
       glMatrixMode(GL_MODELVIEW);     // Operate on model-view matrix

       glEnable(GL_TEXTURE_2D);
       GLuint texture = g_texture;
       glBindTexture(GL_TEXTURE_2D, texture);

       // Draw a quad
       glBegin(GL_QUADS);
       glVertex2i(0, 0); // top left
       glVertex2i(1024, 0); // top right
       glVertex2i(1024, 1024); // bottom right
       glVertex2i(0, 1024); // bottom left
       glEnd();

       glDisable(GL_TEXTURE_2D);
       glBindTexture(GL_TEXTURE_2D, 0);

       glFlush();
    }

    /* Initialize OpenGL Graphics */
    void initGL(int w, int h)
    {
       glViewport(0, 0, w, h); // use a screen size of WIDTH x HEIGHT
       glEnable(GL_TEXTURE_2D);     // Enable 2D texturing

       glMatrixMode(GL_PROJECTION);     // Make a simple 2D projection on the entire window
       glOrtho(0.0, w, h, 0.0, 0.0, 100.0);
       glMatrixMode(GL_MODELVIEW);    // Set the matrix mode to object modeling
       //glTranslatef( 0, 0, -15 );

       glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
       glClearDepth(0.0f);
       glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear the window
    }

    //////////////////////////////////////////////////////////////////////////
    int main(int argc, char *argv[])
    {
       std::shared_ptr<avframe> apAVFrame;
       if (!load_image_to_AVFrame(apAVFrame, "marble.jpg"))
       {
           assert(false);
           return 1;
       }

       // From here on out, the AVFrame is RGB interleaved
       // and is sized to 1,024 x 1,024 (power of 2).

       glutInit(&amp;argc, argv);
       glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
       glutInitWindowSize(1060, 1060);
       glutInitWindowPosition(0, 0);
       glutCreateWindow("OpenGL - Creating a texture");

       glGenTextures(1, &amp;g_texture);

       //glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
       glBindTexture(GL_TEXTURE_2D, g_texture);
       glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, apAVFrame->width,
                    apAVFrame->height, 0, GL_RGB, GL_UNSIGNED_BYTE,
                    apAVFrame->data[0]);
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); /* We will use linear interpolation for magnification filter */
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); /* We will use linear interpolation for minifying filter */

       initGL(1060, 1060);

       glutDisplayFunc(display);

       glutMainLoop();

       return 0;
    }
    </avframe>

    Environment :

    • Ubuntu 18.04
    • GCC v8.2

    EDIT : As per @immibis’ suggestion below, it all works when I change the rendering of the quad to :

    // Draw a quad
    glBegin(GL_QUADS);
    glTexCoord2f(0, 0);
    glVertex2i(0, 0); // top left
    glTexCoord2f(1, 0);
    glVertex2i(1024, 0); // top right
    glTexCoord2f(1, 1);
    glVertex2i(1024, 1024); // bottom right
    glTexCoord2f(0, 1);
    glVertex2i(0, 1024); // bottom left
    glEnd();
  • Detecting missing audio in MOV files

    27 décembre 2013, par user1479359

    i'm curious if there is a way to detect if audio is missing or broken from a MOV video file. Recently there was a MOV file which was playable, but the audio was "missing".

    I tried ffmpeg to get specific errors but it did not give me any. I only noticed that the audio bitrate was very low, 2kb/s. Apart from checking the audio bitrate is there a way to detect such broken video clips with ffmpeg ?

    The mising audio could have been caused by an unsuccessful copying of the file.

  • How do dcraw and stdin work together ?

    25 juillet 2018, par Metin Akkın

    I want to use this :

    dcraw -a -q 3 -6 -v -I &lt; a.nef

    but the picture becomes a dark image. I changed draw.c library but it doesnt work. I want to use stdin and I use this link : https://blog.mclemon.io/dcraw-and-stdin. Please help me.