Recherche avancée

Médias (91)

Autres articles (45)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • 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

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (8091)

  • avfilter/vf_showinfo : remove backspaces

    21 juillet 2022, par Michael Niedermayer
    avfilter/vf_showinfo : remove backspaces
    

    They mess with storing editing and comparing the results

    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavfilter/vf_showinfo.c
  • Trouble concatenating with ffmpeg (threads)

    4 janvier 2014, par mistypants

    I'm writing a batch script to automate one of my video editing processes. I've gotten everything done up to the final step, when I concatenate the video intro (1080.avi) with the video itself, then output. Here's the concatenate part of the script :

    ffmpeg -i 1080.avi -i %input%-lossless.avi ^
    -filter_complex "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]" ^
    -map "[v]" -map "[a]" ^
    -c:v libx264 -preset veryslow -pix_fmt yuv420p ^
    -b:a 160k ^
    -threads 2 %input%-final.mp4

    It seems to work fine, but my computer overheats (it's a laptop) while it runs. I had this problem with just simple conversions and ffmpeg, so I added the -threads 2 part which eliminated the problem. It's back now.

    Did I mess up something in the script, or does concatenating just use more of the CPU ? If the latter, could I just decrease it to 1 thread ?

  • Converting FFmpeg frame to OpenGL ES texture

    10 juillet 2015, par joe

    I’m trying to convert from a video using FFmpeg to an OpenGL ES texture in jni, but all that I get is a black texture. I have output the OpenGL with the glGetError(), but there is no 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) &amp;&amp; (av_read_frame(pFormatCtx, &amp;packet)>=0)) {
           if(packet.stream_index==videoStream) {
           avcodec_decode_video2(pCodecCtx, pFrame, &amp;frameFinished, &amp;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, &amp;(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(&amp;packet);
    }

    I have succeeded in changing pFrameRGB to a java bitmap, but I just want to change it to a texture in the c code.

    Edit1 I have output the Texture ID, it is 0 ; could texture ID be zero ? I changed my code
    but it always be zero.

    Edit2
    the Texture display, but it is a mess.