
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
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
Autres articles (11)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (3325)
-
Revision eeae6f946d : fix a problem where an invalid mv used in search The commit added reset of pred
16 septembre 2013, par Yaowu XuChanged Paths :
Modify /vp9/encoder/vp9_encodeframe.c
Modify /vp9/encoder/vp9_rdopt.c
fix a problem where an invalid mv used in searchThe commit added reset of pred_mv at the beginning of each SB64x64
partition mv search, also limited the usage of pred_mv only when
search on the largest partition is already done. This is to fix
a crash at speed 1/2 encoder where an invalid mv is used in mv
search.Change-Id : I39010177da76d054e3c90b7899a44feb2e3a5b1b
-
Revision db6ad0138c : Added stricter Q control flag. Added a variant of the one shot maxQ flag for tw
26 février 2013, par Paul WilkinsChanged Paths : Modify /vp9/encoder/vp9_onyx_if.c Modify /vp9/encoder/vp9_onyx_int.h Modify /vp9/encoder/vp9_ratectrl.c Added stricter Q control flag. Added a variant of the one shot maxQ flag for two pass that forces a fixed Q for the normal inter frames. Disabled by default. Also small adjustment (...)
-
How to solve Accord.Video.FFMPEG memory leak problem
26 mai 2021, par mfwooI am developing a digital billboard application that allow customer to click on the touch screen to go back and forth.


Screen 0 -> touch -> Screen 1 -> touch -> Screen 2 -> time out -> Screen 0


If no interaction happens Screen 0 will loop indefinitely. Every Screen is running its own MP4 file.


However, for every running cycle of Screen 1, it gobbled up memory and in no time the application crash.


Is it because of VideoFileSource's video object is not being dispose properly or because of some threading problem in video_NewFrame ?


Because I get this error occasionally - "Invoke or BeginInvoke cannot be called on a control until the windows handle is created"


I am using VS2017 .NET Framework 4.5 with Accord.Video.FFMPEG by Accord.NET version 3.8


Screen 0 MP4 size - 5.5MB
Screen 1 MP4 size - 5.6MB
Screen 2 MP4 size - 7.0MB


Here is my code :-
...


Bitmap image;
VideoFileSource video;
int screenIdx = 0;
bool enableClicking = true;
bool isTimeOut = false;
string VideoPath = @"d:\KioskApp\Bkgrnd\"

public frmMain()
 {
 InitializeComponent(); 
 StartFirstScreen();
 tmrScreen01.Interval = 10000;
 tmrScreen02.Interval = 10000;
 }
 
 private void StartFirstScreen()
 {
 try
 {
 string fileName = VideoPath + Screen00();
 video = new VideoFileSource(fileName);
 video.PlayingFinished += new Accord.Video.PlayingFinishedEventHandler(video_Finished);
 video.NewFrame += new Accord.Video.NewFrameEventHandler(video_NewFrame);
 video.Start();
 screenIdx = 1;
 }
 catch (Exception ex)
 {
 string strErrMsg = strMsg + " - " + ex.Message;
 MessageBox.Show(strErrMsg);
 }
 }
 
 private void video_NewFrame(object sender, Accord.Video.NewFrameEventArgs eventArgs)
 {
 try
 {
 Invoke(new Action(() =>
 {
 System.Drawing.Image OldImage;
 OldImage = pictureBox1.Image;
 pictureBox1.Image = AForge.Imaging.Image.Clone(eventArgs.Frame);
 if (OldImage != null)
 OldImage.Dispose();
 })); 
 }
 catch (Exception ex)
 {
 var strErrMsg = "video_NewFrame - " + ex.Message;
 MessageBox.Show(strErrMsg);
 }
 }
 
 private void video_Finished(object sender, Accord.Video.ReasonToFinishPlaying reason)
 {
 try
 {
 if (screenIdx == 1)
 {
 video.PlayingFinished -= video_Finished;
 video.NewFrame -= video_NewFrame;
 video = null; 
 StartFirstScreen();
 return;
 }
 enableClicking = true;

 }
 catch (Exception ex)
 {
 var strErrMsg = "video_Finished - " + ex.Message;
 MessageBox.Show(strErrMsg);

 }
 }
 
 void startLastScreen()
 {
 string fileName = string.Empty;
 video.SignalToStop();
 fileName = VideoPath + Screen02();
 screenIdx = 0;
 if (object.ReferenceEquals(null, video))
 {
 video = new VideoFileSource(fileName);
 }
 else
 {
 video = null;
 video = new VideoFileSource(fileName);
 }

 video.PlayingFinished += new Accord.Video.PlayingFinishedEventHandler(video_Finished);
 video.NewFrame += new Accord.Video.NewFrameEventHandler(video_NewFrame);
 video.Start();
 enableClicking = false;
 }
 
 private void pictureBox1_Click(object sender, EventArgs e)
 {
 if (!enableClicking && screenIdx != 1) return;

 tmrScreen01.Stop();
 tmrScreen02.Stop();
 
 // Check clickable area before allow to proceed to the next screen 
 string fileName = string.Empty;
 video.SignalToStop();
 video.Stop();

 if (screenIdx == 0)
 {
 fileName = VideoPath + Screen00();
 screenIdx = 1;
 }
 else if (screenIdx == 1)
 {
 fileName = VideoPath + Screen01();
 screenIdx = 2;
 
 }
 else if (screenIdx == 2)
 {
 fileName = VideoPath + Screen02();
 screenIdx = 0;
 
 }

 if (object.ReferenceEquals(null, video))
 {
 video = new VideoFileSource(fileName);
 }
 else
 {
 video = null;
 video = new VideoFileSource(fileName);
 }
 video.PlayingFinished += new Accord.Video.PlayingFinishedEventHandler(video_Finished);
 video.NewFrame += new Accord.Video.NewFrameEventHandler(video_NewFrame);
 enableClicking = false;
 isTimeOut = false;
 video.Start();
 }



...