Recherche avancée

Médias (91)

Autres articles (51)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • 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.

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

Sur d’autres sites (9525)

  • ffmpeg - Incompatible sample format '(null)'

    17 juin 2012, par abrahab

    I convert videos from different sources with ffmpeg to mp4 with libx264 codec. After conversation time to time I got incorrect format error when trying to load already converted video with ffmpeg : Incompatible sample format '(null)' for codec 'aac', auto-selecting format 's16'

    Seems, it is audio stream problem with aac codec ? How to fix or how to convert videos to mp4 to be sure that I will not get the following error ? Maybe somehow need to specify audio format at the ffmpeg convert command ?

    ps. Video must work at Iphone/Ipad.
    pps. the main problem, that such videos with the following error can not be pseudo-streamed with nginx (got 500 Error)
    ppps. and sorry for my bad english, please, correct my text if need. thanks.

    Some additional info from file :

     Duration: 00:00:10.30, start: 0.000000, bitrate: 614 kb/s
       Stream #0.0(rus): Video: h264 (High), yuv420p, 1024x576, 567 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
       Metadata:
         creation_time   : 1970-01-01 00:00:00
       Stream #0.1(rus): Audio: aac, 22050 Hz, stereo, s16, 57 kb/s
       Metadata:
         creation_time   : 1970-01-01 00:00:00
  • 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) && (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 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.

  • Mixing audio and video with ffmpeg [closed]

    3 septembre 2013, par Narendra DroidWorm

    I am having an mp4 video (without audio), to which I want to add music using ffmpeg, and also want the output video to be of the same length as the input video.

    But, as a result, I am getting an video merged with audio, but consuming a little more time (abt 1-2 seconds) in the start with a black screen.

    I am using the following command for my desired output.

    ffmpeg -i audio.mp3 -i video.avi -acodec copy -vcodec copy output.avi

    Please suggest, what modifications should I do to get my desired output.