
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (101)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (9380)
-
How to stop ffmpeg when recording the desktop to save the file to the hard disk ?
27 juin 2022, par Eliot SheinI'm trying to record the desktop with the ffmpeg and save a video file to the hard disk.


using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Testings
{
 internal class FFmpeg_Capture
 {
 Process process;

 public FFmpeg_Capture()
 {
 process = new Process();
 }

 public void Start(string FileName, int Framerate)
 {
 process.StartInfo.FileName = @"D:\Captured Videos\ffmpeg.exe"; // Change the directory where ffmpeg.exe is. 
 process.EnableRaisingEvents = false;
 process.StartInfo.WorkingDirectory = @"D:\Captured Videos"; // The output directory 
 process.StartInfo.Arguments = @"-f gdigrab -framerate " + Framerate +
 " -i desktop -preset ultrafast - pix_fmt yuv420p " + FileName;
 process.Start();
 process.StartInfo.UseShellExecute = false;
 process.StartInfo.CreateNoWindow = false;
 Stop();
 }

 public void Stop()
 {
 process.Close();
 }
 }
}



And using it in form1 :


private void btnRecord_Click(object sender, EventArgs e)
 {
 recordToggle = !recordToggle;

 if (recordToggle)
 {
 btnRecord.Text = "Stop";
 record.Start("Testing", 60);
 }
 else
 {
 btnRecord.Text = "Record";
 record.Stop();
 }
 }



but the file Testing never saved to the hard disk. my guess is that


process.Close();



is not like ctrl+ c and ctrl + c is what stopping the ffmpeg and save the file.


This is working but how to remove the black window of the ffmpeg ?




using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Testings
{
 internal class FFmpeg_Capture
 {
 Process process;

 public FFmpeg_Capture()
 {
 process = new Process();
 }

 public void Start(string FileName, int Framerate)
 {
 process.StartInfo.FileName = @"D:\Captured Videos\ffmpeg.exe"; // Change the directory where ffmpeg.exe is. 
 process.EnableRaisingEvents = false;
 process.StartInfo.WorkingDirectory = @"D:\Captured Videos\"; // The output directory 
 process.StartInfo.Arguments = @"-y -f gdigrab -framerate " + Framerate +
 " -i desktop -preset ultrafast -pix_fmt yuv420p " + FileName;
 process.StartInfo.UseShellExecute = false;
 process.StartInfo.CreateNoWindow = false;
 process.StartInfo.RedirectStandardInput = true; //Redirect stdin
 process.Start();
 }

 public void Stop()
 {
 byte[] qKey = Encoding.GetEncoding("gbk").GetBytes("q"); //Get encoding of 'q' key
 process.StandardInput.BaseStream.Write(qKey, 0, 1); //Write 'q' key to stdin of FFmpeg sub-processs
 process.StandardInput.BaseStream.Flush(); //Flush stdin (just in case).
 process.Close();
 }
 }
}



-
Save a RTSP stream to mp4 file in android
22 décembre 2015, par aviI am working on a project where I need to read input stream from an IPCamera. I am able to fetch this in through an rtsp url.
Display the IPCamera stream. I am able to do same by using -
videoView = (VideoView) this.findViewById(R.id.videoView1);
MediaController mc = new MediaController(this);
videoView.setMediaController(mc);
videoView.setVideoURI(Uri.parse("rtsp://xxxxxxxx/camera1"));
videoView.requestFocus();Now I want to record this stream to an MP4 file. For same I am using mediarecorder.Here I am stuck.
MediaRecorder mediaRecorder = new MediaRecorder();
//mediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
mediaRecorder.setOutputFile("rtsp://xxxxxxxxx/camera1");
try {
mediaRecorder.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mediaRecorder.start();Thanks
-
Save a RTSP stream to mp4 file in android
13 février 2019, par aviI am working on a project where I need to read input stream from an IPCamera. I am able to fetch this in through an rtsp url.
Display the IPCamera stream. I am able to do same by using -
videoView = (VideoView) this.findViewById(R.id.videoView1);
MediaController mc = new MediaController(this);
videoView.setMediaController(mc);
videoView.setVideoURI(Uri.parse("rtsp://xxxxxxxx/camera1"));
videoView.requestFocus();Now I want to record this stream to an MP4 file. For same I am using mediarecorder.Here I am stuck.
MediaRecorder mediaRecorder = new MediaRecorder();
//mediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
mediaRecorder.setOutputFile("rtsp://xxxxxxxxx/camera1");
try {
mediaRecorder.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mediaRecorder.start();Thanks