Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (56)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (9186)

  • Merge commit ’3fb29588a27a711132106b924e27b53789a58dcb’

    17 mai 2013, par Michael Niedermayer
    Merge commit ’3fb29588a27a711132106b924e27b53789a58dcb’
    

    * commit ’3fb29588a27a711132106b924e27b53789a58dcb’ :
    vf_drawtext : don’t leak the expressions.
    vf_crop : make config_props work properly when called multiple times.
    vf_setdar : make config_props work properly when called multiple times.

    Conflicts :
    libavfilter/vf_aspect.c
    libavfilter/vf_drawtext.c

    Merged-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavfilter/vf_aspect.c
    • [DH] libavfilter/vf_crop.c
    • [DH] libavfilter/vf_drawtext.c
  • hls av_read_frame delay reading between segment files

    12 septembre 2016, par Debendra Modi

    I am trying to demux live HLS audio and find delays in the loop for reading frames whenever it starts reading the next segment file.

    The HLS audio segment files are MP3, 1 second target duration. Each 1 second file has 13 frames.

    The live HLS source and our code is started at the same time. avformat_open_input takes about 5 seconds to return, as it waits for 3 segment files as required by HLS standards.

    The av_read_frame loop reads 13 frames from each segment file and then it takes about 1.5 to 2 seconds before it starts reading the next 13 frames from the next segment file. Our interrupt callback is called several times within this duration and we return a 0 to continue reading.

    The playlist has several segment files available for it to read so it is not waiting for the segment file to be available in the playlist.

    Given below is the code snippet and attached is the m3u8.

    static int interrupt_cb(void *start_ticks)
    {
    long starttime = (long)start_ticks;  //the start time ticks is in opaque

       //timeout after 5 seconds of no activity
       if (GetTickCount() - starttime  >7000))
               return 1;
       log("Returning 0");
       return 0;
    }


    static bool hls_demuxer( char* fileName )
    {
       AVDictionary *options = NULL;
       av_dict_set(&amp;options, "analyzeduration", "100000", 0);

       AVFormatContext* formatContext = avformat_alloc_context( );

       formatContext->interrupt_callback.callback = interrupt_cb;
       long startticks = GetTickCount();
       formatContext->interrupt_callback.opaque = (void*) startticks;
       formatContext->flags|=AVFMT_FLAG_NONBLOCK;

       //added the following additional parameters to see if they would help to     speed up reading frames - but in vain

       formatContext->probesize = 2048;
       formatContext->max_delay = 100000; //0.1 secs, default 5 secs
       formatContext->probe_score = 100;
       formatContext->max_analyze_duration = 100000;   //0.1 secs

       if ( avformat_open_input( &amp;formatContext, fileName, NULL, NULL ) !=0 )
       {
           return false;
       }
       av_dict_free(&amp;options);


       av_dump_format(formatContext,0,filename,0);             //reaches here after 4 secs of start. Interrupt callback called several times.  This is OK.

       if (avformat_find_stream_info(formatContext,NULL) != 0)
           return false;

       AVPacket pkt;
       while(!threadstop)
       {  

    startticks = GetTickCount();


    //**THIS IS THE ISSUE** ->reads 13 frames from first segment file.
    // No interrupt callback.  Then before using the next segment file, calls
    //interrupt callback several times (about 1 to 2 secs) before reading next
    //segment file, then reads the next 13 frames.  Playlist has several files
    //available.  This continues between each segment file read, thereby    
    //delaying read for each new segment file in playlist.

    if (av_read_frame(formatContext,&amp;pkt) != 0)        
       return false;                      

           log("Packet read");
       //Do something with packet
           av_packet_unref(&amp;pkt);                      
       }
       return true;    //When the playlist ends, it has 38 files.The demuxer Takes over 30 seconds longer.
    }

    Any suggestions ? Thanks in advance.

  • ffmpeg memory usage, or memory leaks

    26 janvier, par happycoding-boy

    I'v write a simple program to get audio waveform data, which using ffmpeg version 6.1. And program works fine. But I get a problem : when program running at begin, system report using about 6MB memory, but when I call the function and cleanup the resouce alloced, system report about 9MB memory used. In my theory, after cleanup, it should be 6MB again. [I'm sure, I freed the AVPacket when read stream, and AVFrame for decoding.] My question is : Is this normal or not ?

    &#xA;

    int main(int argc, char *argv[])&#xA;{&#xA;    // breakpoint here: ~= 6MB&#xA;    get_audio_waveform();&#xA;    // breakpoint here: ~= 9MB&#xA;}&#xA;

    &#xA;

    The ffmpeg struct I used :

    &#xA;

    AVFormatContext*    p_input_fmt_ctx = nullptr;&#xA;AVCodecContext*     p_input_cdc_ctx = nullptr;&#xA;SwrContext*         p_resampler_ctx = nullptr;&#xA;AVAudioFifo*        p_audio_fifo    = nullptr;&#xA;uint8_t**           p_converted_input = nullptr;&#xA;uint8_t**           p_converted_output = nullptr;&#xA;

    &#xA;

    The cleanup func :

    &#xA;

    void _cleanup()&#xA;{&#xA;    avformat_close_input(&amp;p_input_fmt_ctx);&#xA;    avcodec_free_context(&amp;p_input_cdc_ctx);&#xA;    swr_free(&amp;p_resampler_ctx);&#xA;    &#xA;    if (p_audio_fifo)&#xA;    {&#xA;        av_audio_fifo_reset(p_audio_fifo);&#xA;        av_audio_fifo_free(p_audio_fifo);&#xA;        p_audio_fifo = nullptr;&#xA;    }&#xA;    &#xA;    if (p_converted_input)&#xA;    {&#xA;        av_freep(&amp;p_converted_input[0]);&#xA;        free(p_converted_input);&#xA;        p_converted_input = nullptr;&#xA;    }&#xA;    &#xA;    if (p_converted_output)&#xA;    {&#xA;        av_freep(&amp;p_converted_output[0]);&#xA;        free(p_converted_output);&#xA;        p_converted_output = nullptr;&#xA;    }&#xA;}&#xA;

    &#xA;

    In my opinion,If this function have about 3MB memory leaks6MB. when I run this function 5-times, it should be about 15MB memory leaks.6MB. But when I run this function 5-times. After that, system just reports about 10-11 memory used. I doubt wheather program uses runtime library (i.e. libc or equivalent) and the library allocates some memory for own needs? I do not known which step is wrong! :(

    &#xA;