
Recherche avancée
Autres articles (45)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)
Sur d’autres sites (7313)
-
Increase fps in record video ffmpeg
16 juin 2017, par BadfishmaanI need to record 2 videos from 2 cameras in full hd 30 fps.
I use ffmpeg and wrapper - Aforge for c#.init device :
_videoCaptureDevice = new VideoCaptureDevice(deviceName);
_videoCaptureDevice.VideoResolution = _videoCaptureDevice.VideoCapabilities[0];
_videoCaptureDevice.DesiredFrameRate = _fps;
_videoSourcePlayer.VideoSource = _videoCaptureDevice;
_videoCaptureDevice.NewFrame += _videoCaptureDevice_NewFrame;
_videoSourcePlayer.Start();saving frames
if (_videoRecordStatus == VideoRecordStatus.Recording)
{
_videoFileWriter.WriteVideoFrame(eventArgs.Frame);
}and init file writer
_videoFileWriter = new VideoFileWriter();
_videoFileWriter.Open(_fileName, _videoCaptureDevice.VideoResolution.FrameSize.Width,
_videoCaptureDevice.VideoResolution.FrameSize.Height, 30, VideoCodec.MPEG4, 10 * 1000 * 1000);now _videoCaptureDevice.VideoResolution.FrameSize equals 1280x720 and 640x480 (for second device). But I already have problems with recording. Maximum fps is 24 for 480p and 13-14 for 720p (when I try to record videos from 2 cameras in the same time)
How to increase it ?
Or it isn’t possible ? Maybe more powerfull computer will solve this problem (I have Pentium(R) Dual-Core CPU 2.50Ghz and usual videocart (Geforse 8500 GT) for working with two displays, usual hdd, usb 2.0) ?I will glad any help (maybe another library, but not language (c#))
PS
I already used Emgu.CV and faced with simular problems.. -
Record video with Accord.net (AForge)
26 novembre 2020, par ghasem dehI used Accord.net (AForge) for connect to the webcam and record video
But stored videos is slow motion ...
this my project :



using AForge.Video;
using AForge.Video.DirectShow;
using AForge.Video.FFMPEG;
using System;
using System.Drawing;
using System.IO;
using System.Threading;
using System.Windows.Forms;

namespace CaptureWebcam
{
 public partial class Form1 : Form
 {
 private VideoCaptureDeviceForm captureDevice;
 private string path = Path.GetDirectoryName(Application.ExecutablePath) + @"\Videos\";
 private FilterInfoCollection videoDevice;
 private VideoCaptureDevice videoSource;
 private VideoFileWriter FileWriter = new VideoFileWriter();
 private Bitmap video;
 bool isRecord = false;

 public Form1()
 {
 InitializeComponent();
 }

 private void videoSource_NewFrame(object sender, NewFrameEventArgs eventArgs)
 {
 video = (Bitmap)eventArgs.Frame.Clone();
 pictureBox1.Image = (Bitmap)eventArgs.Frame.Clone();
 }

 private void btnStartCam_Click(object sender, EventArgs e)
 {
 videoDevice = new FilterInfoCollection(FilterCategory.VideoInputDevice);
 captureDevice = new VideoCaptureDeviceForm();
 if (captureDevice.ShowDialog(this) == DialogResult.OK)
 {
 videoSource = captureDevice.VideoDevice;
 videoSource = captureDevice.VideoDevice;
 videoSource.NewFrame += new NewFrameEventHandler(videoSource_NewFrame);
 videoSource.Start();
 timer1.Enabled = true;
 }
 //videoSource.DisplayPropertyPage(IntPtr.Zero);
 }

 private Thread workerThread = null;
 private bool stopProcess = false;

 private void recordLiveCam()
 {
 if (!stopProcess)
 {
 while (isRecord)
 {
 FileWriter.WriteVideoFrame(video);
 }
 FileWriter.Close();
 }
 else
 {
 workerThread.Abort();
 } 
 }

 private void btnRecord_Click(object sender, EventArgs e)
 {
 //try
 //{
 isRecord = true;
 if (!Directory.Exists(path))
 {
 Directory.CreateDirectory(path);
 }
 int h = captureDevice.VideoDevice.VideoResolution.FrameSize.Height;
 int w = captureDevice.VideoDevice.VideoResolution.FrameSize.Width;
 FileWriter.Open(path + "recorded at " + DateTime.Now.ToString("HH-mm-ss") + ".mp4", w, h, 25, VideoCodec.MPEG4);
 stopProcess = false;
 workerThread = new Thread(new ThreadStart(recordLiveCam));
 workerThread.Start();

 //}
 //catch (Exception ex)
 //{
 // MessageBox.Show(ex.Message);
 //}
 }

 private void Form1_Load(object sender, EventArgs e)
 {

 }

 private void btnStopRecord_Click(object sender, EventArgs e)
 {
 stopProcess = true;
 isRecord = false;
 FileWriter.Close();
 workerThread.Abort();
 video = null;

 }

 private void btnStopCam_Click(object sender, EventArgs e)
 {
 try
 {
 if (videoSource.IsRunning)
 {
 videoSource.SignalToStop();
 videoSource.Stop(); 
 pictureBox1.Image = null;
 pictureBox1.Invalidate();
 if (FileWriter.IsOpen)
 {
 FileWriter.Close();
 video = null;
 }
 }
 else
 return;
 }
 catch
 {
 videoSource.Stop();
 FileWriter.Close();
 video = null;
 }
 }

 float fts = 0.0f;
 private void timer1_Tick(object sender, EventArgs e)
 {
 fts = videoSource.FramesReceived;
 label1.Text = "Frame Rate : " + fts.ToString("F2") + " fps";
 }
 }
}




And when click the btnStopRecord following error :





Additional information : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.




-
How can I record an audio from USB audio device using C++ with ffmpeg on Linux ?
9 mai 2018, par Hunter Haimin ZhangHow can I record an audio from USB audio device using C++ with ffmpeg on Linux ?
I have the following code. But I have no idea how to set the parameter of ’url’ in the function of avformat_open_input.
Could assistance be provided by anybody ? Much appreciated.27 av_register_all();
28 avdevice_register_all();
29
30 //pAudioInputFmt =av_find_input_format("dshow");
31 pAudioInputFmt =av_find_input_format("alsa");
32 //assert(pAudioInputFmt != NULL);
33 if (!(pAudioInputFmt != NULL))
34 {
35 printf("Error %s %d\n", __FILE__, __LINE__);
36 char ch = cin.get();
37 cout << "ch = "<< ch << endl;
38 return (-1);
39 }
40
41 // I have no idear how to set the second parameter on Linux.
42 if (!(avformat_open_input(&pFmtCtx, "=Device)", pAudioInputFmt,NULL) == 0))
43 {
44 printf("Error %s %d\n", __FILE__, __LINE__);
45 system("pause");
46 return (-1);
47 }