Recherche avancée

Médias (1)

Mot : - Tags -/illustrator

Autres articles (95)

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

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

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

Sur d’autres sites (10560)

  • avcodec_encode_video memory leaks

    13 juillet 2012, par user1522503

    I got some ffmpeg memory problems.
    I think they happen to avcodec_encode_video() ;

    When I used it to encode less than 6 YUV420 files(the size is different, 704x576 1600x1200 540x480),the memory was normal, but if more than 6, the system memories increased 100M/S, the program will crash soon.

    please advice, thanks.

    iOutSie = 0;
       ptPicture = (AVFrame *)malloc(sizeof(AVFrame));

       if (!ptPicture)
       {
           gbiLastErrorNumber = NPC_D_SMP_CODEC_ERROR_MALLOC_ERR;
           goto _NPC_CLEAR;
       }

       pYuvBuff = (NPC_BYTE *)malloc(1024*1024*8);

    if (!pYuvBuff)
     {

           goto _NPC_CLEAR;

       }

       avpicture_fill((AVPicture*)ptPicture, pYuvBuff, PIX_FMT_YUV420P, hEncode->tEncodeVideoParam.iWidth,
           hEncode->tEncodeVideoParam.iHeight);    


           scxt = sws_getContext(
               in_pOriBPS->iWith, //source width
               in_pOriBPS->iHeight, //source height
               PIX_FMT_YUV420P,    //source pix format
               hEncode->tEncodeVideoParam.iWidth, //destination width, height, and pix format
               hEncode->tEncodeVideoParam.iHeight,
               PIX_FMT_YUV420P,
               SWS_SINC,
               NULL,NULL,NULL
           );



       if(!scxt)
       {
           gbiLastErrorNumber = NPC_D_SMP_CODEC_ERROR_sws_getContext_ERR;
           goto _NPC_CLEAR;
       }

       sws_scale(
           scxt,
           hEncode->picture->data, hEncode->picture->linesize,
           0, in_pOriBPS->iHeight,
           ptPicture->data, ptPicture->linesize);

       if (in_pDestDataBufSize < (hEncode->tEncodeVideoParam.iWidth * hEncode->tEncodeVideoParam.iHeight * 3 / 2) )
       {
           gbiLastErrorNumber = NPC_D_SMP_CODEC_ERROR_PARAM_ERR;
           goto _NPC_CLEAR;
       }

       iOutSize = avcodec_encode_video(hEncode->c, out_pDestDataBuf, in_pDestDataBufSize, ptPicture);  

    _NPC_CLEAR:
    if(pYuvBuff) free(pYuvBuff);
    return iOutSize;
  • 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 ?

    


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


    


    The ffmpeg struct I used :

    


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


    


    The cleanup func :

    


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


    


    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! :(

    


  • concat 2 mini audio files and make a loop and add a background music

    11 octobre 2020, par Johny Sharma

    I Need to concatenate 2 small audio files with loop and add background music in a single command.

    



    I am capable to concatenate two audio files with a background music. My above given code is working.

    



    ffmpeg -i 1.mp3 -i 2.mp3 -i background.mp3 
-filter_complex "[0:0][1:0]concat=n=2:v=0:a=1,volume=1dB,aformat=fltp, pan=stereo|c0=c0|c1=c0[a0]; 
[2]volume=0.5dB,aformat=fltp,pan=stereo|c0=c0|c1=c1[a1];[a0][a1]amix=inputs=2:duration=longest,aformat=fltp[a]"
-map "[a]" -strict -2 -y output.mp3


    



    but i want to a make a loop of the concatenated files till the end of the background music. background music is longer than approx 5 times from concatenated files.

    



    If someone can suggest a single command solution.

    



    I know about amovie tag but unfortunately its not possible to use in here because amovie requires file name which is not possible with concatenated files as per my knowledge.

    



    Can anyone help me how can i achieve my goal !

    



    Thanks