
Recherche avancée
Médias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (27)
-
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 -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (7282)
-
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