Recherche avancée

Médias (91)

Autres articles (109)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (8835)

  • Insert Random silence multiple times between Audios in ffmpeg

    23 septembre 2021, par Gracie williams

    suppose I have MP3 of around 1 minute duration and increase its duration longer.Duration can be any.

    


    I want to randomly add N seconds of silence to that audio.

    


    I can generate the silence like below

    


    ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono -t <seconds> -q:a 9 -acodec libmp3lame out.mp3&#xA;</seconds>

    &#xA;

    And I can insert silence to audio like below

    &#xA;

    ffmpeg -i in.wav -filter_complex "anullsrc,atrim=0:4[s];[0]atrim=0:14[a];[0]atrim=14,asetpts=N/SR/TB[b];[a][s][b]concat=3:v=0:a=1" out.wav&#xA;

    &#xA;

    Is there anyway to insert silence at multiple areas.With php I can generate random time to insert based on 60 seconds audio like below.

    &#xA;

    $arr = [];&#xA;$arr[3] = 2; //here 3 is original audio insert time and 2 is the duration of silence&#xA;$arr[6] = 3;  //here 6 is original audio insert time and 3 is the duration of silence&#xA;$arr[10] = 1;&#xA;$arr[12] = 3;&#xA;

    &#xA;

    Now I want to insert silence between seconds based on above array like

    &#xA;

    2 seconds silence at 3rd second&#xA;3 seconds silence at 6th second&#xA;1 second silence at 10th second&#xA;

    &#xA;

    and son on..

    &#xA;

  • Problem with processing FFMPEG video , the output video is totally black in first 3 seconds

    13 janvier 2021, par Trần Minh Tuấn

    I want to make a slideshow by using concat demuxer like this link :&#xA;https://trac.ffmpeg.org/wiki/Slideshow

    &#xA;

    Here is the textfile preinputFiles.txt :

    &#xA;

    file &#x27;path a&#x27;&#xA;duration 2&#xA;file &#x27;path b&#x27;&#xA;duration 2&#xA;file &#x27;path c&#x27;&#xA;duration 2&#xA;file &#x27;path c&#x27;&#xA;

    &#xA;

    and my command array is :

    &#xA;

    String[] cmd = new String[]{&#xA;            "-f","concat","-i",&#xA;            textFile,&#xA;            "-vsync", "vfr", "-pix_fmt", "yuv420p",&#xA;            dest.getAbsolutePath()};&#xA;

    &#xA;

    the video has 3 seconds that it is totally black and run from 3s to 9s even the gallery shows that it is a 6 seconds long video .

    &#xA;

    Thanks for the help !

    &#xA;

  • 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) &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&#39;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 success to change pFrameRGB to a java bitmap, but i just want to change it to a texture in the c code,