Recherche avancée

Médias (91)

Autres articles (36)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

  • 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();
  • FFMPEG to OpenGL Texture

    23 avril 2014, par Spamdark

    I was here to ask, how can I convert an AVFrame to an opengl texture. Actually, I created a renderer the outputs me the audio (Audio is working) and the video, but the video is not outputing. Here is my code :

    Texture creation :

    glGenTextures(1,&amp;_texture);
    glBindTexture(GL_TEXTURE_2D,_texture);
    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

    glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
    glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );

    Code Info : _texture variable is a GLuint that keeps the texture ID

    Function that gets the AVFrame and convert it to OpenGL Texture :

    int VideoGL::NextVideoFrame(){
    // Get a packet from the queue
    AVPacket *videopacket = this->DEQUEUE(VIDEO);
    int frameFinished;
    if(videopacket!=0){
       avcodec_decode_video2(_codec_context_video, _std_frame,&amp;frameFinished,videopacket);

       if(frameFinished){

           sws_scale(sws_ctx, _std_frame->data, _std_frame->linesize, 0, _codec_context_video->height, _rgb_frame->data, _rgb_frame->linesize);

           if(_firstrendering){
           glBindTexture(GL_TEXTURE_2D,_texture);
           glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, _codec_context_video->width,_codec_context_video->height,0,GL_RGB,GL_UNSIGNED_BYTE,_rgb_frame->data[0]);

           _firstrendering = false;

           }else{

               glActiveTexture(_texture);
               glBindTexture(GL_TEXTURE_2D,_texture);
               glTexSubImage2D(GL_TEXTURE_2D,0,0,0,_codec_context_video->width,_codec_context_video->height,GL_RGB,GL_UNSIGNED_BYTE,_rgb_frame->data[0]);

           }
           av_free_packet(videopacket);
           return 0;
       }else{

           av_free_packet(videopacket);
           return -1;
       }

    }else{
       return -1;
    }
    return 0;
    }

    Code Information : There is a queue where a thread store the AVFrames, this function is frequently called to get the AVFrames, until it gets a NULL it stops to being called.

    That’s actually not working. (I tried to look at some questions in stack overflow, it’s still not working)
    Any example, or someone that helps me to correct any error there ?

    Additional Data : I tried to change the GL_RGB to GL_RGBA and started to play with the formats, anyway it crashes when I try GL_RGBA (Because the width and height are very big, anyway I tried to resize them). I have tried to change the sizes to Power Of 2, stills not working.

    1 Edit :

    Thread function :

    DWORD WINAPI VideoGL::VidThread(LPVOID myparam){

    VideoGL * instance = (VideoGL*) myparam;
    instance->wave_audio->Start();

    int quantity=0;

    AVPacket packet;
    while(av_read_frame(instance->_format_context,&amp;packet) >= 0){
       if(packet.stream_index==instance->videoStream){
           instance->ENQUEUE(VIDEO,&amp;packet);
       }
       if(packet.stream_index==instance->audioStream){
           instance->ENQUEUE(AUDIO,&amp;packet);
       }
    }

    instance->ENQUEUE(AUDIO,NULL);
    instance->ENQUEUE(VIDEO,NULL);

    return 0;
    }

    Thread creation function :

    CreateThread(NULL, 0, VidThread, this, NULL, NULL);

    Where this refers to the class that contains the NextVideoFrame, and the _texture members.

    Solved :

    I followed some of the datenwolf tips, and now the video is displaying correctly with the audio/video :

    Screenshot took

  • Announcing Long Term Support in Piwik 2 – The analytics platform for your mission critical projects

    11 janvier 2016, par Matthieu Aubry — About, Development

    We are proud to announce our Long Term Support (LTS) for Piwik 2.X !

    Why Long Term Support (LTS) ?

    Part of our mission is to ready Piwik for the enterprise — and ready the enterprise for Piwik. Our fast release cycle and our ability to quickly innovate has served us well for the past seven years and has lead Piwik to being one of the most popular open source projects, used by over one million websites worldwide. But Piwik’s success today has also shown us that this fast release cycle is not suited for all users and customers. Like most large open source projects (such as Ubuntu, Firefox, Debian, Symfony, Node.js, etc.) at Piwik we now also offer a Long Term Support release which gives users the confidence that Piwik can be used for mission critical projects for months to come.

    What does LTS mean for Piwik ?

    For the duration of the LTS period, Piwik 2.X will continue to receive the following fixes :

    • Critical bugs causing data loss or data corruption.
    • Major and Critical security issues.

    Our goal is to offer you a Piwik LTS release that you can trust for all your mission critical projects.

    How long will Piwik 2.X be supported ?

    Piwik 2.X will be supported for at least 12 months after the initial release of Piwik 3.0.0.
    Piwik 3.0.0 is expected to be released in the second half of 2016.
    This means that Piwik 2.X will be supported at least until the second half of 2017.

    Which Piwik version is LTS ?

    The latest Piwik 2.16.X release is our Long Term Support version.

    How do I benefit from the LTS version ?

    To get the full benefits of Piwik LTS, please make sure you are using the latest LTS version. First, update to the latest Piwik 2.X version, then Configure Piwik to use the LTS release channel and then update to the latest LTS version.

    How do I configure Piwik to use the LTS version ?

    By default, Piwik will not use the LTS version. When you use the one-click update your Piwik instance will be updated to the very latest release : when Piwik 3.0.0 will be released, the one click update will update your instance to 3.0.0. It is however possible to configure your Piwik so that you will stay on Piwik 2.X and keep using the LTS Long Term Support version :

    • Login Piwik as the Super User,
    • Go to Settings > General > Update settings,
    • Under “Release channel” click “Latest stable 2.X Long Term Support version”, and click “Save”.

    How do I get professional Piwik Support ?

    If you need professional support for your Piwik service get in touch with the Piwik PRO experts.


    For other questions, feedback or discussion, feel free to join our forums and comment on this LTS forum post.

    We wish you all a fantastic year 2016 !