Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (100)

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

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (11886)

  • avfilter/vsrc_testsrc : also fill alpha planes with a test pattern in {rgb,yuv}testsrc

    31 mars, par James Almer
    avfilter/vsrc_testsrc : also fill alpha planes with a test pattern in rgb,yuvtestsrc
    

    And add support for more formats.

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavfilter/vsrc_testsrc.c
    • [DH] tests/ref/fate/filter-rgbtestsrc-rgba
    • [DH] tests/ref/fate/filter-yuvtestsrc-ayuv
    • [DH] tests/ref/fate/filter-yuvtestsrc-ayuv64
    • [DH] tests/ref/fate/filter-yuvtestsrc-vuya
  • How to fill AVFrame with audio data

    12 décembre 2014, par Andy

    I use Win32 API to implement a desktop recording program.
    The video capture feature works, but I have no idea to put the audio in the FFmpeg encoder’s data structure.

    The below code will get the data of the default output audio.

    // Set wave format when sampling the audio
    WAVEFORMATEX wf;
    wf->wFormatTag = WAVE_FORMAT_PCM;
    wf->nChannels = 1;
    wf->nSamplesPerSec = 12000;
    wf->nBlockAlign = 1;
    wf->wBitsPerSample = 8;
    wf->cbSize = 0;
    wf->nAvgBytesPerSec = nChannels * nSamplesPerSec * wBitsPerSample / 8;

    // Open wave input channel
    HWAVEIN hWaveIn;
    OpenWaveIn(&amp;hWaveIn,&amp;wf);

    // Prepare Wave In Header and allocate memory
    WAVEHDR waveHdr;
    DWORD dataSize = 240000L;
    PrepareWaveIn(&amp;hWaveIn, &amp;waveHdr, dataSize);

    // Start recording
    StartRecord(&amp;hWaveIn);

    // Stop recording
    MMTIME mmt;
    StopRecord(&amp;hWaveIn, &amp;mmt);

    waveHdr->lpData is a pointer to locked data buffer.

    The question is how can I implement the below function let the waveHdr->->lpData can be saved to AVFrame ?

    static AVFrame *get_audio_frame(OutputStream *ost)
    {
       AVFrame *frame = ost->tmp_frame;
       int j, i, v;
       int16_t *q = (int16_t*)frame->data[0];
       AVRational arg;
       arg.num = 1;
       arg.den = 1;

       //the transform code should be put here

       frame->pts = ost->next_pts;
       ost->next_pts += frame->nb_samples;
       return frame;
    }

    Does someone know how can implement this ?

  • Fill a BGR Frame Data in FFMPEG

    23 février 2016, par mFeinstein

    I am following the FFmpeg video enconding example here, but it makes some dummy YUV420P frames and I have a BGR image already captured from a camera.

    I am not sure how to use frame->data[] and frame->linesize[] for filling them with my BGR image instead, so I can encode an H264 video.


    EDIT :

    I have the following code (it’s called for every new picture the camera sends) after Ronald’s answer :

       .............
       AVFrame *bgrFrame = av_frame_alloc();

       bgrFrame->width = originalBGRImage.cols;
       bgrFrame->height = originalBGRImage.rows;

       ret = av_image_alloc(bgrFrame->data, bgrFrame->linesize, bgrFrame->width, bgrFrame->height, AV_PIX_FMT_BGR24, 32);

       /////////////////////////////////////
       // This works and prevents memory leak....if I remove it, it consumes all the RAM....but I can't free this memory here, since I will use it later...
       av_freep(&amp;bgrFrame->data[0]);
       av_frame_free(&amp;bgrFrame);
       return;
       /////////////////////////////////////

       ret = av_image_fill_pointers(bgrFrame->data, AV_PIX_FMT_BGR24, bgrFrame->height, originalBGRImage.data, bgrFrame->linesize);

       /////////////////////////////////////
       // Here is where I am done using the memory so I will want to free it...but this same code crashes the program.
       av_freep(&amp;bgrFrame->data[0]);
       av_frame_free(&amp;bgrFrame);
       return;
       /////////////////////////////////////

    So if I remove the av_freep(&amp;bgrFrame->data[0]); at the end of the code I will have a memory leak...but leaving it there crashes....so what’s the correct way to free the used memory ?