Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (12)

  • 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

  • ANNEXE : Les extensions, plugins SPIP des canaux

    11 février 2010, par

    Un plugin est un ajout fonctionnel au noyau principal de SPIP. MediaSPIP consiste en un choix délibéré de plugins existant ou pas auparavant dans la communauté SPIP, qui ont pour certains nécessité soit leur création de A à Z, soit des ajouts de fonctionnalités.
    Les extensions que MediaSPIP nécessite pour fonctionner
    Depuis la version 2.1.0, SPIP permet d’ajouter des plugins dans le répertoire extensions/.
    Les "extensions" ne sont ni plus ni moins que des plugins dont la particularité est qu’ils se (...)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (3542)

  • Merge remote-tracking branch ’cigaes/master’

    8 mars 2014, par Michael Niedermayer
    Merge remote-tracking branch ’cigaes/master’
    

    * cigaes/master :
    lavf/concatdec : reindent after last commit.
    lavf/concatdec : more reliable test for absolute URLs.
    lavf : add subfile protocol.
    lavfi/af_atempo : clear references before returning error.
    lavd/xv : take aspect ratio into account.
    lavc/pthread : copy packet side data.

    Merged-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] Changelog
    • [DH] doc/protocols.texi
    • [DH] libavcodec/pthread_frame.c
    • [DH] libavdevice/xv.c
    • [DH] libavfilter/af_atempo.c
    • [DH] libavformat/Makefile
    • [DH] libavformat/allformats.c
    • [DH] libavformat/concatdec.c
    • [DH] libavformat/subfile.c
    • [DH] libavformat/version.h
  • glTexSubImage2D does not update texture

    27 février 2014, par user3177342

    I am writing video program with ffmpeg and opengl. Generate 2 textures and swap them when paint.
    the code of DrawFirstFrame invoked once is

    avcodec_decode_video2(pCodecCtx, pFrame, &amp;frameFinished,
                                 &amp;packet);

           // Did we get a video frame?
           if(frameFinished)
           {
               f++;

               pFrameRGB=avcodec_alloc_frame();
               //Allocate memory for the raw data we get when converting.
               uint8_t *buffer;
               int numBytes;
               numBytes = avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
               buffer = (uint8_t *) av_malloc(numBytes*sizeof(uint8_t));

               //Associate frame with our buffer
               avpicture_fill((AVPicture *) pFrameRGB, buffer, PIX_FMT_RGB24,
                              pCodecCtx->width, pCodecCtx->height);
               pFrameRGB->linesize[0]= pCodecCtx->width*3; // in case of rgb4  one plane
               struct SwsContext* swsContext = sws_getContext(pCodecCtx->width, pCodecCtx->height,
                                               pCodecCtx->pix_fmt,
                                               pCodecCtx->width, pCodecCtx->height, AV_PIX_FMT_RGB24, SWS_BICUBIC,
                                               NULL, NULL, NULL);
               if (swsContext == NULL)
               {
                   fprintf(stderr, "Cannot initialize the conversion context!\n");
                   exit(1);
               };

               sws_scale(swsContext, pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);
               current_Vtex=&amp;VideoTexture;

               glGenTextures(1, &amp;VideoTexture);
               glBindTexture(GL_TEXTURE_2D, VideoTexture);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
               //  glTexImage2D(GL_TEXTURE_2D, 0, 3, pCodecCtx->width, pCodecCtx->height, 0, GL_RGB, GL_UNSIGNED_BYTE, pFrameRGB->data[0]);
               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, pCodecCtx->width, pCodecCtx->height, 0, GL_RGB, GL_UNSIGNED_BYTE, pFrameRGB->data[0]);

               glGenTextures(1, &amp;VideoTexture2);
               glBindTexture(GL_TEXTURE_2D, VideoTexture2);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
               //  glTexImage2D(GL_TEXTURE_2D, 0, 3, pCodecCtx->width, pCodecCtx->height, 0, GL_RGB, GL_UNSIGNED_BYTE, pFrameRGB->data[0]);
               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, pCodecCtx->width, pCodecCtx->height, 0, GL_RGB, GL_UNSIGNED_BYTE, pFrameRGB->data[0]);
               //glDeleteTextures(1, &amp;VideoTexture);
               GLenum err;
               while ((err = glGetError()) != GL_NO_ERROR)
               {
                   cerr &lt;&lt; "OpenGL error: " &lt;&lt; err &lt;&lt; endl;
               }
              av_free(buffer);
           }
       }

       // Free the packet that was allocated by av_read_frame
       av_free_packet(&amp;packet);

       if (f>1) break;
    }

    then in a cycle

    if (token.IsSameAs("frame"))
                   {
                       this->panel->DrawNextFrame();
                       wxPaintEvent evt;
                       this->panel->GetEventHandler()->AddPendingEvent(evt);
                       GetThread()->Sleep(500);
                       token=tkz.GetNextToken();
                       token.ToLong(&amp;lastframe);
                       wxCriticalSectionLocker lock(*CSect);
                       this->fram->Clear();
                   }

    DrawNextFrame() code is here, trying to update the textures generated in DrawFirstFrame

       void BasicGLPane::DrawNextFrame()
    {
    int f=1;
    while(av_read_frame(pFormatCtx, &amp;packet)>=0)
       {
           // Is this a packet from the video stream?
           if(packet.stream_index==videoStream)
           {


               // Decode video frame
               avcodec_decode_video2(pCodecCtx, pFrame, &amp;FrameFinished,
                                     &amp;packet);

               // Did we get a video frame?
               if(FrameFinished)
               {
                   f++;
                    pFrameRGB=avcodec_alloc_frame();
                   //Allocate memory for the raw data we get when converting.
                   uint8_t *buffer;
                   int numBytes;
                   numBytes = avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
                   buffer = (uint8_t *) av_malloc(numBytes*sizeof(uint8_t));

                   //Associate frame with our buffer
                   avpicture_fill((AVPicture *) pFrameRGB, buffer, PIX_FMT_RGB24,
                                  pCodecCtx->width, pCodecCtx->height);
                   pFrameRGB->linesize[0]= pCodecCtx->width*3; // in case of rgb4  one plane
                   struct SwsContext* swsContext = sws_getContext(pCodecCtx->width, pCodecCtx->height,
                                                   pCodecCtx->pix_fmt,
                                                   pCodecCtx->width, pCodecCtx->height, AV_PIX_FMT_RGB24, SWS_BICUBIC,
                                                   NULL, NULL, NULL);
                   if (swsContext == NULL)
                   {
                       fprintf(stderr, "Cannot initialize the conversion context!\n");
                       exit(1);
                   };

                   sws_scale(swsContext, pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);
                   //glGenTextures(1, &amp;VideoTexture);
                   if ((*current_Vtex)==VideoTexture) current_Vtex = &amp;VideoTexture2;else current_Vtex = &amp;VideoTexture;
                   glBindTexture(GL_TEXTURE_2D, (*current_Vtex));
                   glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
                   glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
                   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
                   glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, pCodecCtx->width, pCodecCtx->height, GL_RGB, GL_UNSIGNED_BYTE, pFrameRGB->data[0]);
                   //glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, pCodecCtx->width, pCodecCtx->height, 0, GL_RGB, GL_UNSIGNED_BYTE, pFrameRGB->data[0]);
                   //glDeleteTextures(1, &amp;VideoTexture);
                   GLenum err;
                   while ((err = glGetError()) != GL_NO_ERROR)
                   {
                       cerr &lt;&lt; "OpenGL error: " &lt;&lt; err &lt;&lt; endl;
                   }

               }
           }

           // Free the packet that was allocated by av_read_frame
           av_free_packet(&amp;packet);
           if (f>1) break;
       }

    av_free(pFrameRGB);
    Refresh();
    }

    Render Function renders (*current_Vtex) in a quad.

    if ((*current_Vtex) != 0)
           {
           GLfloat z = 0;
           glEnable(GL_TEXTURE_2D);
           glPushMatrix();
           glBindTexture(GL_TEXTURE_2D, (*current_Vtex));
           glBegin(GL_QUADS);
           glTexCoord2i(0, 0);
           glVertex3f(0.0f, 0.0f, z);
           glTexCoord2i(1, 0);
           glVertex3f(Width, 0,z);
           glTexCoord2i(1, 1);
           glVertex3f(Width, Height,z);
           glTexCoord2i(0, 1);
           glVertex3f(0, Height,z);
           glEnd();
           glPopMatrix();
           glDisable(GL_TEXTURE_2D);
           }

       wxCriticalSectionLocker lock(*CSect);
       this->fram->render();

       glFlush();
       SwapBuffers();

    THe problem is that the picture on screen doesn't update (why ?) only shows what was generated in DrawFirstFrame. I surely know that the program swaps textures when paint.

  • mp3 : Tweak the probe scores

    6 décembre 2014, par Luca Barbato
    mp3 : Tweak the probe scores
    

    Having more than 10 consecutive frames decoded as mp3 should be
    considered a clear signal that the sample is mp3 and not mpegps.

    Reported-By : Florian Iragne <florian@iragne.fr>
    CC : libav-stable@libav.org

    • [DH] libavformat/mp3dec.c