Recherche avancée

Médias (91)

Autres articles (64)

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

Sur d’autres sites (9977)

  • FFMPEG : Can not free AVPacket when decode H264 stream ?

    13 janvier 2016, par TTGroup

    I’m using FFMPEG to decode H264 stream, my code is below

    AVFormatContext *pFormatCtx = NULL;
    AVCodecContext  *pCodecCtx = NULL;
    AVFrame         *pFrame = NULL;
    AVPacket        packet;
    packet.data = NULL;

    pFormatCtx = avformat_alloc_context();  
    avformat_open_input(&pFormatCtx, videoStreamPath, NULL, NULL);
    liveHeader.pCodecCtx = pFormatCtx->streams[videoStreamIndex]->codec;

    int  bytesDecoded = 0;
    int  frameFinished = 0;
    while (true)
    {
       while (packet.size > 0)
       {
           // Decode the next chunk of data
           bytesDecoded = avcodec_decode_video2(pCodecCtx, pFrame,
               &frameFinished, &packet);

           // Was there an error?
           if (bytesDecoded < 0)
           {
               printf(strErr, "Error while decoding frame\n");
               commonGlobal->WriteRuntimeRecLogs(strErr);
               return RS_NOT_OK;
           }

           packet.size -= bytesDecoded;
           packet.data += bytesDecoded;
           if (frameFinished)
           {              
               //av_free_packet(&packet); //(free 1)
               return RS_OK;
           }
           // Did we finish the current frame? Then we can return
       }
       do
       {
           try
           {
               int ret = av_read_frame(pFormatCtx, &packet);
               if (ret < 0)
               {
                   char strErr[STR_LENGTH_256];
                   if (ret == AVERROR_EOF || (pFormatCtx->pb && pFormatCtx->pb->eof_reached))
                   {
                       sprintf(strErr, "Error end of file line %d", __LINE__);
                   }
                   if (pFormatCtx->pb && pFormatCtx->pb->error)
                   {
                       sprintf(strErr, "Error end of file line %d", __LINE__);
                   }
                   packet.data = NULL;
                   return RS_NOT_OK;
               }
           }
           catch (...)
           {
               packet.data = NULL;
               return RS_NOT_OK;
           }
       } while (packet.stream_index != videoStreamIndex);
    }

    //av_free_packet(&packet); //(free 2)

    The problem is I don’t know how to free memory of packet correctly.

    I have tried to delete packet’s data by calling one of two places av_free_packet(&packet); (free 1) and av_free_packet(&packet); (free 2). And the result is the application was crashed with the message "Heap Corruption..."

    If I do not free the packet, the memory leak is occur.

    Note that the above code is successful when decode H264 stream, the main problem is memory leak and crashed when I try to free the packet

    Someone can show me the problems in my code.

    Many thanks,

    T&T

  • FFMPEG : Making a specifc range of color pixels transparent

    28 décembre 2017, par Pan Ng

    I am trying to overlay one video on top of another using ffmpeg, but couldn’t quite understand the error.
    I based on the existing command from here

    More specifically, I want to replace the all colors close to a specific color (say brown r:82,g:44,b:11), and then have them set as transparent.

    ffmpeg -i moonmen.mp4 -i transparent_overlay.mp4 -filter_complex
    "[1]split[m][a];
    [a]geq='if(between(r(X,Y), 77, 87)*between(g(X,Y), 39, 49)*between(b(X,Y), 06, 16) ,255:255:255,0:0:0)';
    [m][al]alphamerge[ovr];
    [0][ovr]overlay"
    output.mp4

    but I got error :

    [Parsed_geq_1 @ 0x7fc8e2e08400] Either YCbCr or RGB but not both must be specified
    [AVFilterGraph @ 0x7fc8e2e07c60] Error initializing filter 'geq' with args 'if(between(r(X,Y), 77, 87)*between(g(X,Y), 39, 49)*between(b(X,Y), 06, 16) ,255:255:255,0:0:0)'
    Error initializing complex filters.
    Invalid argument
  • How to live stream a local video using FFmpeg [closed]

    20 novembre 2022, par param trivedi

    I have been trying to stream local video on VLC using the FFmpeg library like this :

    


    $ ffmpeg -i sample.mp4 -v 0 -vcodec mpeg4 -f mpegts udp://127.0.0.1:23000


    


    I have not been able to stream the file on VLC.