
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (42)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...)
Sur d’autres sites (9002)
-
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();
 }



...


-
How to convert AC3 audio to Wav audio ?
18 janvier 2023, par Joey JoestarI would like to convert a AC3 audio file (ATSC A/52 aka AC-3 aka Dolby Digital stream 6 channels) to Wave audio file (16khz mono/1 channel).


While searching on the internet, a lot of people just used
ffmpeg -i file.ac3 file.wav
however, i'm not sure if that even works.

I keep getting


[ac3 @ 0x55ac1a0b0660] exponent -1 is out-of-rangets/s speed= 125x
[ac3 @ 0x55ac1a0b0660] error decoding the audio block
[ac3 @ 0x55ac1a0b0660] frame sync error
Error while decoding stream #0:0: Invalid data found when processing input
etc



while I do the same command.
How do I convert ac3 to wav (16khz mono) ?


*Note :
I also tried
ffmpeg -i file.ac3 -codec:a:1 ac3 -codec copy -b:a 384 file.wav -ac 1 -ar 16000
. But this doesn't output an actual wav file.

-
Youtube stream of looping JPG stops randomly
6 juillet 2021, par timw99Hi I'm fairly new at ffmpeg.


I'm currently trying to get a low FPS Youtube stream working over RTMP using a JPG on loop which content gets changed using a NodeJS script periodically. I'm using the following command to stream (variable 3 is my stream key) :


ffmpeg -re -loop 1 -pix_fmt bgr24 -framerate 5 -i img/now.jpg -re -stream_loop -1 -i output.mp3 -f flv -vcodec libx264 -profile:v main -g 60 -keyint_min 30 -b:v 400k -minrate 400k -maxrate 400k -preset ultrafast -tune zerolatency -bufsize 2000k rtmp://a.rtmp.youtube.com/live2/$3



There's multiple things wrong here. The bitrate doesn't actually stay at 400k/s. It just goes to around 200-1000k and then just starts decreasing until the stream stops (usually at around 200-300k bitrate). It still seems like data is being sent (bitrate and current FPS are still updated (though they're very low) and speed goes parabolic. The frame counter itself just stops and Youtube doesn't continue streaming. See example :


frame= 515 fps=5.0 q=12.0 size= 5803kB time=00:01:42.84 bitrate= 462.3kbits/
frame= 518 fps=5.0 q=11.0 size= 5824kB time=00:01:43.41 bitrate= 461.3kbits/
frame= 519 fps=5.0 q=11.0 size= 5838kB time=00:01:43.92 bitrate= 460.2kbits/
frame= 519 fps=5.0 q=11.0 size= 5838kB time=00:01:44.42 bitrate= 457.9kbits/
frame= 519 fps=4.9 q=11.0 size= 5838kB time=00:01:44.92 bitrate= 455.8kbits/
frame= 519 fps=4.9 q=11.0 size= 5838kB time=00:01:45.43 bitrate= 453.6kbits/
frame= 519 fps=4.9 q=11.0 size= 5838kB time=00:01:45.93 bitrate= 451.4kbits/
frame= 519 fps=4.9 q=11.0 size= 5838kB time=00:01:46.44 bitrate= 449.3kbits/
frame= 519 fps=4.8 q=11.0 size= 5838kB time=00:01:46.94 bitrate= 447.2kbits/
frame= 519 fps=4.8 q=11.0 size= 5838kB time=00:01:47.44 bitrate= 445.1kbits/
frame= 519 fps=4.8 q=11.0 size= 5838kB time=00:01:47.95 bitrate= 443.0kbits/
frame= 519 fps=4.8 q=11.0 size= 5838kB time=00:01:48.45 bitrate= 440.9kbits/
frame= 519 fps=4.8 q=11.0 size= 5838kB time=00:01:48.96 bitrate= 438.9kbits/
frame= 519 fps=4.7 q=11.0 size= 5838kB time=00:01:49.46 bitrate= 436.9kbits/
frame= 519 fps=4.7 q=11.0 size= 5838kB time=00:01:49.96 bitrate= 434.9kbits/
frame= 519 fps=4.7 q=11.0 size= 5838kB time=00:01:50.44 bitrate= 433.0kbits/
frame= 519 fps=4.7 q=11.0 size= 5838kB time=00:01:50.95 bitrate= 431.0kbits/
frame= 519 fps=4.7 q=11.0 size= 5838kB time=00:01:51.45 bitrate= 429.1kbits/
frame= 519 fps=4.6 q=11.0 size= 5838kB time=00:01:51.96 bitrate= 427.1kbits/
frame= 519 fps=4.6 q=11.0 size= 5838kB time=00:01:52.46 bitrate= 425.2kbits/
frame= 519 fps=4.6 q=11.0 size= 5838kB time=00:01:52.99 bitrate= 423.2kbits/



I'm using a Digital Ocean VPS to run it, but the same happens on my own desktop which definitely has the hardware for a simple stream like this. Could it have something to do with me replacing the JPG content while trying to stream it ? I get this error every once in a while, but it seems like it fixes itself judging by the info :


[mjpeg @ 0x562824d1fb40] overread 8
[mjpeg @ 0x562824d1fb40] EOI missing, emulating



I can provide more information if it's needed. Thanks in advance.