Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (32)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (6670)

  • FFmpeg changing Keyframe Interval / GoP values while reencoding a Livestream ?

    17 juin 2015, par eCronik

    I am using ffmpeg in an nginx environment to reencode Livestreams on Ubuntu.

    So there are 2 Livestreams with the exact identical options going into the reencode. Both are streaming to a server in germany - one comes from germany, the other comes from the US eastcoast. So I have the problem, that the receiver after the reencode moans after some time about the Keyframe Interval growing higher of the stream coming from the US - until a certain point where it stops. This is not always happening in the same amount of time or to the same extent.

    This is the line I am using to reencode :

    exec_push ffmpeg -i rtmp://localhost/input/$name -c:v libx264 -preset slow -profile:v main -b:v 2175k -minrate 2175k -maxrate 2175k -bufsize 2175k -r 40 -g 80 -c:a aac -strict -2 -b:a 160k -f flv rtmp://server \-c copy -f flv rtmp://server;

    Does anybody have a clue what could cause this and how to prevent it ? Changing x264 cpu preset on the machine where the stream comes from to something faster doesn’t work, and the reencode-server is just at 50% usage with ’slow’ as well.

    Here my version info :

    ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
    built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
    configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
    libavutil      54. 20.100 / 54. 20.100
    libavcodec     56. 26.100 / 56. 26.100
    libavformat    56. 25.101 / 56. 25.101
    libavdevice    56.  4.100 / 56.  4.100
    libavfilter     5. 11.102 /  5. 11.102
    libavresample   2.  1.  0 /  2.  1.  0
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  1.100 /  1.  1.100
    libpostproc    53.  3.100 / 53.  3.100

    Thanks a bunch,
    eC

  • Not able to decode mp4 file using latest ffmpeg library : av_decode_video2

    8 février 2017, par suvirai

    I am writing a wrapper code around latest ffmpeg library. I am supplying MP4 files from local system. My problem is that I am unable to get any decoded frames when I use av_decode_video2(). The return value comes out to be negative. I have used av_read_frame() which returns 0. I googled about the problem I am facing but no where could I find the correct explanation. Please give me insight here. Pasting the pseudo code here.

       av_init_packet(avpkt);
       picture=av_frame_alloc();
       pFrameRGB=av_frame_alloc();
       codec = avcodec_find_decoder(CODEC_ID_H264);
       c= avcodec_alloc_context3(codec)
       avcodec_open2(decoderLibraryData->c, decoderLibraryData->codec, NULL)
       FormatContext = avformat_alloc_context();
       char *pUrl ="./1.MP4";

       iRet = avformat_open_input(atContext, pUrl, pFmt, NULL);

       if(FormatContext == NULL)
       {
           printf("could not assign any memory !!!!!!!!! \n");
       }

       avformat_find_stream_info(FormatContext, NULL);


       while(av_read_frame(FormatContext,avpkt) >= 0)
       {

         len = avcodec_decode_video2(c, picture, &got_picture,avpkt);

         printf("CODEC MANAGER len %d Frame decompressed %d \n",len,got_picture);

         if (len <= 0)
         {
           return ERROR;
         }
       }
    }



           if(lastHeight != 0 && lastWidth != 0)
           {
               if(lastWidth != c->width || lastHeight != c->height )
               {
                   av_free(buffer);
                   buffer = NULL;
                   lastWidth = c->width;
                   lastHeight = c->height;

               }
           }
           else
           {
               lastWidth = c->width;
               lastHeight = c->height;
           }
           decodeFlag = 1;
           if(!buffer)
           {
               int numBytes;
               v_mutex_lock(globalCodecLock);
               switch(inPixFormat)
               {
               case RGB:


                   // Determine required buffer size and allocate buffer
                   numBytes=avpicture_get_size(PIX_FMT_RGB24, c->width, c->height);

                   buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
                   avpicture_fill((AVPicture *)pFrameRGB,buffer,PIX_FMT_RGB24,c->width, c->height);

                   if(cntxt)
                       sws_freeContext(cntxt);

                   cntxt = sws_getContext(c->width, c->height, c->pix_fmt,
                           c->width, c->height, PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL);

                   break;

               }
               v_mutex_unlock(globalCodecLock);
               if(cntxt == NULL)
               {
                   printf("sws_getContext error\n");
                   return ERROR;
               }
               }

           {
               sws_scale(cntxt, picture->data, picture->linesize, 0, c->height, pFrameRGB->data, pFrameRGB->linesize);
               if(rgbBuff)
               {


                   if(c->width <= *width && c->height <= *height)
                   {                  
                       saveFrame(pFrameRGB, c->width, c->height, rgbBuff,inPixFormat);

                       *width = c->width;
                       *height = c->height;
                       rs = SUCCESS;
                       break;
                   }
                   else
                   {
                       rs = VA_LOWBUFFERSIZE;
                   }
               }
               else
               {
                   rs = VA_LOWBUFFERSIZE;
               }
           }
           if(width)
           {
               *width = c->width;
           }
           if(height)
           {
               *height = c->height;
           }
           if(rs == VA_LOWBUFFERSIZE)
           {
               break;
           }

    I am getting the return value of av_read_frame as 0 but av_decode_video2 returns value in negative. I am not able to get any clue here.

  • "MPEG audio header not found" error when opening with TagLib after converting with ffmpeg

    6 juillet 2015, par Avrohom Yisroel

    I converted a wma file simply by doing something like this...

    ffmpeg -i song.wma -f mp3 song.mp3

    I can then play the mp3 file in Windows Media player, so it looks like the conversion worked.

    However, if I try to open the file in TagLib, I get an error "MPEG audio header not found" on the following line...

    TagLib.File tf = TagLib.File.Create("song.mp3");

    I’ve tried this on a few wma files, so it’s not just that one that’s at fault.

    Anyone have any idea what I did wrong ? I find the docs for ffmpeg pretty overwhelming, and as a complete ignoramus in the field of audio encoding, I haven’t a clue what most of it means. Could be I’m missing something in the conversion, although that wouldn’t explain why WMP can play it but TagLib can’t open it.