
Recherche avancée
Autres articles (100)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 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, parMultilang 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, parMediaSPIP 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 Almeravfilter/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>
-
How to fill AVFrame with audio data
12 décembre 2014, par AndyI 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(&hWaveIn,&wf);
// Prepare Wave In Header and allocate memory
WAVEHDR waveHdr;
DWORD dataSize = 240000L;
PrepareWaveIn(&hWaveIn, &waveHdr, dataSize);
// Start recording
StartRecord(&hWaveIn);
// Stop recording
MMTIME mmt;
StopRecord(&hWaveIn, &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 toAVFrame
?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 mFeinsteinI 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[]
andframe->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(&bgrFrame->data[0]);
av_frame_free(&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(&bgrFrame->data[0]);
av_frame_free(&bgrFrame);
return;
/////////////////////////////////////So if I remove the
av_freep(&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 ?