
Recherche avancée
Autres articles (32)
-
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (5711)
-
Revision 49516 : Le constructeur de formulaire peut prendre des options en troisième ...
8 juillet 2011, par rastapopoulos@… — LogLe constructeur de formulaire peut prendre des options en troisième argument. La première option possible est la possibilité de modifier le nom des champs (modifier_nom=true). Avec une autre option (nom_unique=true) on peut vérifier que le nom fournit par l’utilisateur n’existe pas déjà dans le (...)
-
ffmpeg writing the output of the command to a text file doesn't work with C#
5 février 2021, par LifshitzI am using ffmpeg commands with C# processes. I used a command to change the audio of a video and it was working but I also wanted to write the output to a text file. The new command works from cmd but apparently, it does not work while using a C# process.
The command that does not work with the Process is :


ffmpeg -i videoPath -i audioPath -c:v copy -map 0:v:0 -map 1:a:0 -shortest newVideoPath > textFilePath 2>&1



And the working command is the same without the last part :


ffmpeg -i videoPath -i audioPath -c:v copy -map 0:v:0 -map 1:a:0 -shortest newVideoPath



Here is the C# code :


Process proc = new Process();
 proc.StartInfo.FileName = ffmpegPath;
 proc.StartInfo.RedirectStandardError = true;
 proc.StartInfo.RedirectStandardOutput = true;
 proc.StartInfo.UseShellExecute = false;
 proc.StartInfo.CreateNoWindow = true;
 proc.StartInfo.Arguments = "-i " + videoPath + " -i " + newAudioPath + " -c:v copy" + " -map" + " 0:v:0 " + "-map 1:a:0 " + "-shortest " + newVideoPath + " > " + @"F:\Videos\log.txt"+ " 2>&1";
 proc.EnableRaisingEvents = true;
 proc.Exited += UpdateVideoSource;
 proc.Start();



I checked the arguments over and over again, and looked for missing spaces but nothing worked.
What can be the problem ?


-
How to extract stream of images from video file using ffmpeg
13 décembre 2013, par user3032143I want to extract stream of images from a video file using ffmpeg.
I know I can extract them straight to the hard drive using these arguments :
-i - -qscale 1 h :\out\img-%05d.jpg
But i would like to extract directly to a stream.
This is my code so far :
private void ExtractImagesFromVideo(byte[] data,string _args)
{
try
{
serverBuild = new Process();
serverBuild.StartInfo.WorkingDirectory = Environment.CurrentDirectory;
serverBuild.StartInfo.Arguments = _args;
serverBuild.StartInfo.FileName = Environment.CurrentDirectory + @"\ffmpeg.exe";
serverBuild.StartInfo.UseShellExecute = false;
serverBuild.StartInfo.RedirectStandardOutput = true;
serverBuild.StartInfo.RedirectStandardError = true;
serverBuild.StartInfo.RedirectStandardInput = true;
serverBuild.StartInfo.CreateNoWindow = true;
serverBuild.StartInfo.LoadUserProfile = false;
serverBuild.EnableRaisingEvents = true;
serverBuild.Start();
using (BinaryWriter bw = new BinaryWriter(serverBuild.StandardInput.BaseStream))
{
bw.Write(data);
}
mStandardOutput = serverBuild.StandardOutput.BaseStream;
mStandardOutput.BeginRead(mReadBuffer, 0, mReadBuffer.Length, StandardOutputReadCallback, null);
serverBuild.WaitForExit();
byte[] _data = mStandardOutputMs.ToArray();
mStandardOutput.Close();
}
catch (Exception _ex)
{
}
finally
{
serverBuild.Dispose();
}
}and I call like like this :
string _argsOut = @"-i pipe:0 -qscale 1 -f mjpeg pipe:1 ";
ExtractImagesFromVideo(data, _argsOut);and it hangs on this line :
bw.Write(data);
thanks