
Recherche avancée
Autres articles (30)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP 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 (4825)
-
"Critical error detected c0000374" when running av_packet_unref or av_frame_unref
15 mai 2021, par Shivang SharmaI am trying to read and decode frames which is happening nicely but when its reaching part of un-referencing frame or packet using
av_packet_unref
andav_frame_unref
it is giving error during second frame or third frame sometimes .

Error (Copied from visual studio output window) :


Critical error detected c0000374
Libav.exe has triggered a breakpoint



Here is some code of reading and decoding which is giving error :


void Decoder::streamNextFrame(int type = 0)
{
 while (av_read_frame(this->fileFormatCtx, this->latestpacket) >= 0) {
 if (this->audioDecoder->activeAudioStream != nullptr) {
 if (this->latestpacket->stream_index == this->audioDecoder->activeAudioStream->index) {
 avcodec_send_packet(this->audioDecoder->activeStreamDecoder, this->latestpacket);
 err = avcodec_receive_frame(this->audioDecoder->activeStreamDecoder, this->decodedFrame);
 if (err == AVERROR(EAGAIN)) {
 av_frame_unref(this->decodedFrame);
 av_packet_unref(this->latestpacket);
 continue;
 }

 {
 int currentIndex = (int)this->audioFrames->size();
 this->audioFrames->resize((int)this->audioFrames->size() + 1);
 int nb = 0;
 this->audioFrames->at(currentIndex).pts = (int)this->decodedFrame->pts;
 if (this->audioDecoder->activeStreamDecoder->sample_fmt != AV_SAMPLE_FMT_S16) {
 nb = 2048 * this->audioDecoder->activeStreamDecoder->channels;
 printf("%i\n", nb);
 this->audioFrames->at(currentIndex).data.resize(nb);
 if (!swr_is_initialized(swr)) {

 swr_alloc_set_opts(swr, this->audioDecoder->activeStreamDecoder->channel_layout, AV_SAMPLE_FMT_S16, this->audioDecoder->activeStreamDecoder->sample_rate, this->audioDecoder->activeStreamDecoder->channel_layout, this->audioDecoder->activeStreamDecoder->sample_fmt, this->audioDecoder->activeStreamDecoder->sample_rate, 0, nullptr);
 swr_init(swr);
 }

 uint8_t* buffer = this->audioFrames->at(currentIndex).data.data();
 swr_convert(swr, &buffer, nb, (const uint8_t**)this->decodedFrame->extended_data, this->decodedFrame->nb_samples);
 }
 else {
 nb = this->decodedFrame->nb_samples * this->audioDecoder->activeStreamDecoder->channels;
 this->audioFrames->at(currentIndex).data = std::vector(*this->decodedFrame->extended_data, *this->decodedFrame->extended_data + (uint8_t)nb);
 }

 this->audioFrames->at(currentIndex).buffersize = nb;
 }

 if (err == AVERROR_EOF) {
 this->audioDecoder->streamEnded = true;
 av_frame_unref(this->decodedFrame);
 av_packet_unref(this->latestpacket);
 break;
 }
 else if (err >= 0) {
 this->audioDecoder->streamEnded = false;
 }

 if (type != 0) {
 av_packet_unref(this->latestpacket);
 av_frame_unref(this->decodedFrame);
 break;
 }
 av_packet_unref(this->latestpacket);
 av_frame_unref(this->decodedFrame);
 }
 }
 else {
 printf("No active audio stream is set\n");
 if(type!=0)
 break;
 }
 }

}



I have removed some of code which was concerning the video and was not giving problem I think.


Some Information about above code :


this->audioFrames is a pointer to vector with following type.
std::vector<audioframeformat>* "AudioFrameFormat" is struct defined as following

struct AudioFrameFormat {
 std::vector data = {};
 int pts = 0;
 int buffersize = 0;
 };


swr is a private class member allocated in constructor
</audioframeformat>


Call Stack looks like :




I am getting from call stack is that I am not taking care of my heap memory.


Can someone please explain where problem is and, why some times it run till third frame and some time till second frame of the audio stream ?


And please tell how can I improve this code.


-
How to plot animated time series in R ?
28 août 2016, par pOrlandoI am trying use the ’animation’ package in R to plot an animated time series.
My dataset consists of a time vector and a value vector, each with 1800 rows.
I keep getting an error message after running the loop which reads :
Error in jpeg(gname[i]) : unable to start jpeg() device
In addition: Warning messages:
1: In jpeg(gname[i]) : unable to open file 'g11:30:00.jpg' for writing
2: In jpeg(gname[i]) : opening device failedHere’s the source code
timemax<-1800
setwd("~/Documents/Animation/")
graphdata<-read.csv("filling_line_data_construction_v2.csv")
attach(graphdata)
gname<-paste("g",time, ".jpg", sep="")
for (i in 1:timemax){
jpeg(gname[i])
plot(time[1],value[1],type="l",ylim=c(0,35), xlim=c(0,100),
ylim = c(0, 35),ylab = "", xlab="time")
lines(time[1:i],value[1:i])
dev.off(dev.cur())
}The end goal is to string together these 1800 plots as a stop animation video by calling the ffmpeg shell :
shell("C:/ffmpeg/bin/ffmpeg.exe -report -i g%d.jpg -b:v 2048k fillin_lineR.mpg",mustWork=FALSE)
This is code that I’ve been trying to adapt from http://www.animatedgraphs.co.uk/LondonR.html#slide-30, but this example uses a .tif file instead of .jpg, and my computer gives me 1800 error messages when trying to make a video from .tif files...
Thanks in advance !
-
Revision 2baccb18a0 : Use less tmp motion vectors in vp9_pick_inter_mode_sub8x8 This commit simplifie
30 décembre 2014, par Jingning HanChanged Paths :
Modify /vp9/encoder/vp9_pickmode.c
Use less tmp motion vectors in vp9_pick_inter_mode_sub8x8This commit simplifies the reference motion vector part for sub8x8
block coding in RTC mode and reduces the required local variables.Change-Id : I470d1482092563b68af22404dc1f497e7457b0a8