
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (27)
-
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 (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (4437)
-
avfilter/vf_bilateral : stop using sigmaS as percent of width/height
17 juillet 2020, par Paul B Mahol -
avfilter/avf_avectorscope : stop making output fully transparent
7 août 2015, par Paul B Mahol -
How to capture desktop using ffmpeg ? getting error when stop recording : System.InvalidOperationException : 'StandardIn has not been redirected.'
4 octobre 2023, par SharonHemedI want it to record the entire desktop then when stopping to save the file to the hard drive. and to hide without the console window of the ffmpeg.


but getting this exception error. and i'm setting the RedirectStandardInput to true.
so i'm not sure why it's showing this error.


The exception error is on the line


process.StandardInput.BaseStream.Write(qKey, 0, 1);



The full code


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using NAudio.CoreAudioApi;
using NAudio.Wave;

namespace Desktop_Recorder
{
 public partial class Form1 : Form
 {
 Process process;

 public Form1()
 {
 InitializeComponent();

 process = new Process();
 Start(@"d:\test.mp4", 30);
 }

 private void Form1_Load(object sender, EventArgs e)
 {
 
 }

 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
 Stop();
 }

 public void Start(string FileName, int Framerate)
 {
 process.StartInfo.FileName = @"d:\ffmpeg\ffmpeg.exe"; // Change the directory where ffmpeg.exe is. 
 process.EnableRaisingEvents = false;
 process.StartInfo.WorkingDirectory = @"D:\"; // 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.StartInfo.RedirectStandardError = true;
 process.Start();
 System.Threading.Thread.Sleep(3000); //Wait 3 seconds (for testing).
 Stop();
 }

 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();
 }


 private void btnStartRecording_Click(object sender, EventArgs e)
 {

 }
 }
}