Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (55)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (6009)

  • why ffmpeg frame to opengles texture is black

    5 juin 2012, par joe

    I'm trying to converted from a video using ffmpeg to an opengles texture in jni, but i just get a black texture. I have output the opengl with the glGetError(), there is any error.
    Here is my code :

    void*              pixels;    int err;
    int i;
    int frameFinished = 0;
    AVPacket packet;
    static struct SwsContext *img_convert_ctx;
    static struct SwsContext *scale_context = NULL;
    int64_t seek_target;

    int target_width = 320;
    int target_height = 240;
    GLenum error = GL_NO_ERROR;
    sws_freeContext(img_convert_ctx);  

    i = 0;
    while((i==0) && (av_read_frame(pFormatCtx, &packet)>=0)) {
       if(packet.stream_index==videoStream) {
           avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);

           if(frameFinished) {
               LOGI("packet pts %llu", packet.pts);
               img_convert_ctx = sws_getContext(pCodecCtx->width, pCodecCtx->height,
                      pCodecCtx->pix_fmt,
                      target_width, target_height, PIX_FMT_RGB24, SWS_BICUBIC,
                      NULL, NULL, NULL);
               if(img_convert_ctx == NULL) {
                   LOGE("could not initialize conversion context\n");
                   return;
               }
               sws_scale(img_convert_ctx, (const uint8_t* const*)pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);
               LOGI("sws_scale");

               videoTextures = new Texture*[1];
               videoTextures[0]->mWidth = 256; //(unsigned)pCodecCtx->width;
               videoTextures[0]->mHeight = 256; //(unsigned)pCodecCtx->height;
               videoTextures[0]->mData = pFrameRGB->data[0];

               glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

               glGenTextures(1, &(videoTextures[0]->mTextureID));
               glBindTexture(GL_TEXTURE_2D, videoTextures[0]->mTextureID);
               glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
               glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

               if(0 == got_texture)
               {
                   glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, videoTextures[0]->mWidth, videoTextures[0]->mHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid *)videoTextures[0]->mData);

                   glTexSubImage2D(GL_TEXTURE_2D, 0, 0,0, videoTextures[0]->mWidth, videoTextures[0]->mHeight, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid *)videoTextures[0]->mData);
               }else
               {
                   glTexSubImage2D(GL_TEXTURE_2D, 0, 0,0, videoTextures[0]->mWidth, videoTextures[0]->mHeight, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid *)videoTextures[0]->mData);

               }

               i = 1;
               error = glGetError();
               if( error != GL_NO_ERROR ) {
                   LOGE("couldn't create texture!!");
                      switch (error) {
                       case GL_INVALID_ENUM:
                       LOGE("GL Error: Enum argument is out of range");
                       break;
                       case GL_INVALID_VALUE:
                           LOGE("GL Error: Numeric value is out of range");
                       break;
                       case GL_INVALID_OPERATION:
                           LOGE("GL Error: Operation illegal in current state");
                       break;
                       case GL_OUT_OF_MEMORY:
                           LOGE("GL Error: Not enough memory to execute command");
                       break;
                       default:
                           break;
                      }
               }
           }
       }
       av_free_packet(&packet);
    }

    i success to change pFrameRGB to a java bitmap, but i just want to change it to a texture in the c code,

  • FFMPEG : replacing audio at specific part start and end time

    2 juin 2020, par steve

    I have this code I found and it works on the start part but not the end.
    
I want it to start at 2 seconds and finish at 10 seconds.

    



    ffmpeg -y -i "C:\Users\test\Desktop\vidz\New folder (2)\target\demo.mp4" -i "C:\Users\test\Desktop\vidz\New folder (2)\target\2.mp3" -filter_complex "[0]atrim=0:2[Apre];[0]atrim=end=0:6,asetpts=PTS-STARTPTS[Apost];[Apre][1][Apost]concat=n=3:v=0:a=1" -vcodec copy -y "C:\Users\test\Desktop\vidz\New folder (2)\target\output1.mp4"


    



    were you se atrim=0:2 starts at 2 seconds this works and atrim=end=0:10 not working

    


  • Revision 5576a4e1cb : Merge "Refactoring of rate control - part 1"

    22 novembre 2013, par Deb Mukherjee

    Changed Paths :
     Modify /vp9/encoder/vp9_onyx_if.c



    Merge "Refactoring of rate control - part 1"