Recherche avancée

Médias (91)

Autres articles (50)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (6788)

  • Add white noise to audio stream at specific time stamp for specific duration using FFMPEG

    25 mai 2022, par cpron

    I have a video.mov file of 1 minute. What I want is to make the volume of the current audio stream to 0 for a specific duration and add noise at that specific timestamp.

    


    ffmpeg -y -i video.mov -filter_complex volume=enable='between(t,15,20)':volume=0[main];anoisesrc=d=5:c=pink:r=44100:a=0.5[noise];[main][noise]amix=inputs=2


    


    Thank you in advance.

    


  • 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

  • Revision 31286 : flag_gz detecte quand on en a besoin (suite de ...

    2 septembre 2009, par fil@… — Log

    flag_gz detecte quand on en a besoin (suite de http://trac.rezo.net/trac/spip/changeset/14451 )