
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (35)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (5922)
-
FFmpeg memory leak
10 septembre 2015, par SpamdarkI have developed just a simple library modifing a library that I found on the internet.
What scares me, is that, when I play an avi, it plays and free the memory when the video ends, but when I play the video, it’s like a memory leak ! It grows to 138mb although the video has ended and the FreeAll method (A function that deletes the context, etc...) has been called.
Here is the code of the method that is causing the memory leak :
int VideoGL::NextVideoFrame(){
int frameDone = 0;
int result = 0;
double pts = 0;
if(!this->ended){
if (!_started) return 0;
AVPacket* packet;
// Get the number of milliseconds passed and see if we should display a new frame
int64_t msPassed = (1000 * (clock() - _baseTime)) / CLOCKS_PER_SEC;
if (msPassed >= _currentPts)
{
// If this is not the current frame, copy it to the buffer
if (_currentFramePts != _currentPts){
_currentFramePts = _currentPts;
memcpy(buffer_a,buffer, 3 * _codec_context_video->width * _codec_context_video->height);
result = 1;
}
// Try to load a new frame from the video packet queue
bool goodop=false;
AVFrame *_n_frame = avcodec_alloc_frame();
while (!frameDone && (packet = this->DEQUEUE(VIDEO)) != NULL)
{
if (packet == (AVPacket*)-1) return -1;
goodop=true;
_s_pts = packet->pts;
avcodec_decode_video2(_codec_context_video, _n_frame, &frameDone, packet);
av_free_packet(packet);
if (packet->dts == AV_NOPTS_VALUE)
{
if (_n_frame->opaque && *(uint64_t*)_n_frame->opaque != AV_NOPTS_VALUE) pts = (double) *(uint64_t*)_n_frame->opaque;
else pts = 0;
}
else pts = (double) packet->dts;
pts *= av_q2d(_codec_context_video->time_base);
}
if (frameDone)
{
// if a frame was loaded scale it to the current texture frame buffer, but also set the pts so that it won't be copied to the texture until it's time
sws_scale(sws_ctx,_n_frame->data, _n_frame->linesize, 0, _codec_context_video->height, _rgb_frame->data, _rgb_frame->linesize);
double nts = 1.0/av_q2d(_codec_context_video->time_base);
_currentPts = (uint64_t) (pts*nts);
}
avcodec_free_frame(&_n_frame);
av_free(_n_frame);
if(!goodop){
ended=true;
}
}
}
return result;
}I’ll be waiting for answers, thanks.
-
Android how to increase ffmpeg mp4 perfromance ?
4 janvier 2013, par testCoderI have detected that function
avcodec_decode_audio3
works slow with mp4 format, here my code cycle for decoding audio :while (av_read_frame(av_format_context, &packet) >= 0 && is_play == 1) {
if (av_codec_context->codec_type == AVMEDIA_TYPE_AUDIO
&& is_play == 1) {
int out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
int size = packet.size;
int n;
int dataLength = size;
int decoded = 0;
while (size > 0) {
//start measure time
gettimeofday(&tvBegin, NULL);
int len = avcodec_decode_audio3(av_codec_context,
(int16_t *) pAudioBuffer, &out_size, &packet);
//stop measure time
gettimeofday(&tvEnd, NULL);
timeval_subtract(&tvDiff, &tvEnd, &tvBegin);
LOGI("%d", tvDiff.tv_usec / 1000);
LOGI("len='%d'", len);
LOGI("out_size='%d'", out_size);
if (len < 0) {
break;
return 1;
}
if (out_size > 0) {
jbyte *bytes = (*env)->GetByteArrayElements(env, array,
NULL);
memcpy(bytes, (int16_t *) pAudioBuffer, out_size);
(*env)->ReleaseByteArrayElements(env, array, bytes, 0);
(*env)->CallVoidMethod(env, obj, play, array, out_size,
is_play);
}
size -= len;
}
}
if (packet.data)
av_free_packet(&packet);
}But with other formats like flac and mp3 it works fine.
avcodec_decode_audio3
take about 1-2 milisecounds for decoding mp3 frame without_size
= 4608 but with the same frame size in mp4 decoding take about 6-7 millisecounds. I got my build script from here.Does it normal behavior ? Is any way to increase performance of decoding mp4 ?
-
close the running application in vb.net from background
22 janvier 2016, par TOMi want to stop the running (ffmpeg) process from background . i use the
process.kill()
i wrote the code . but in this process the output file is getting corrupted.
Dim pProcess() As Process = Process.GetProcesses
For Each p As Process In pProcess
If p.ProcessName = "ffmpeg" Then
p.WaitForExit(1000)
p.Kill()
p.Close()
End If
Nextis there any other method to terminate the process without file being corrupt
thanks