
Recherche avancée
Autres articles (44)
-
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 (...) -
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 (...) -
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
Sur d’autres sites (11394)
-
C# Windows Forms Using FFMPEG to change video format got no response
21 mai 2023, par TSLeeI am trying to make an exe program to change a video format by using FFMPEG instead of doing it in the terminal. The formatted video will be saved in the download folder. I have tried my code below and got no output response. I wonder if I used process() and StartInfo correctly, as examples I found and the documentation just confused me. I have double-checked the ffmpeg.exe is in the bin folder and the StartInfo() is just for getting information, which is under Process(). This is why Process() can access the information and use Start() to start the process. Please help and correct my understanding.
Below is part of my code :


private void convertButton_Click(object sender, EventArgs e)
 {
 String input = filepathTextBox.Text;
 String outputResolution = resolutionLabel.Text;
 String output;
 String outputFileType;
 int inputLength = input.Length;
 int l = 0;
 for (int i = (inputLength - 1); inputLength > -1; i--)
 {
 if (input[i] == '.')
 {
 l = i;
 break;
 }
 }
 output = input.Substring(0, l - 1);
 outputFileType = input.Substring(l + 1, inputLength - 1);
 Process process = new Process();
 process.StartInfo.UseShellExecute = true;
 process.StartInfo.FileName = "ffmpeg.exe";
 process.StartInfo.WorkingDirectory = @"C:\Users\User\Downloads\ffmpeg-2023-05-15-git-2953ebe7b6-full_build\bin";
 process.StartInfo.Arguments = "ffmpeg -i" + @"C:\Users\User\Downloads\file_example_MP4_640_3MG.mp4" + "-s 320x240 -r 25 -b:v 500000 -pix_fmt yuv420p -c:v libx264 -vprofile baseline -level 2.1 -x264opts stitchable=1:level=3.0:keyint=15:ref=1:merange=16:mvrange=32 -acodec pcm_s16le -ar 16000 -ac 1" + @"C:\Users\User\Downloads\440.mp4";
 process.Start();
 }



Output :
"myprogram.exe(CoreCLR : clrhost) : Loaded 'C :\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.15\System.Diagnostics.Process.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled."
The thread 0x79e0 has exited with code 0 (0x0).


-
using ffmpeg in Azure function to cut files using c#
22 janvier 2019, par abhishekmoondra1989I have written an Azure function in C# which will cut a big mp4 files into some small duration. I have copied everything that is required (ffmpeg executeable, video file) in home directory via KUDU console. But when I run the the function it runs for more than 5 minutes and it doesn’t give any files in the home directory.
Function :
using System;
using System.Diagnostics;
public static void Run(string input, TraceWriter log)
{
log.Info("Executing");
using (var process = new Process())
{
process.StartInfo.FileName = @"D:\home\ffmpeg.exe";
process.StartInfo.Arguments = @"-i D:\home\AmnestyInternational.mp4 -ss 00:00:03 -t 00:00:08 -async 1 D:\home\cut.mp4";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
log.Info(Directory.GetCurrentDirectory());
log.Info("Cutting starts:"+DateTime.Now.ToString("h:mm:ss tt"));
process.Start();
string output = process.StandardOutput.ReadToEnd();
process.WaitForExit();
log.Info("Cutting ends :"+DateTime.Now.ToString("h:mm:ss tt"));
log.Info(output);
}
}Output seen on Azure function Console :
2017-03-24T11:06:00.705 Function started (Id=df082f54-719a-415f-b7f1-b10548a213be)
2017-03-24T11:06:00.721 Executing
2017-03-24T11:06:00.721 D:\Windows\system32
2017-03-24T11:06:00.721 Cutting start :11:06:00 AM
2017-03-24T11:07:14 No new trace in the past 1 min(s).
2017-03-24T11:08:14 No new trace in the past 2 min(s).
2017-03-24T11:09:14 No new trace in the past 3 min(s).
2017-03-24T11:10:14 No new trace in the past 4 min(s).
2017-03-24T11:11:00.758 Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.ManualTriggerCSharp1.When I try to execute this same command on KUDU console or my own PC it only take 1.5 mins and I get a file of the desired duration
Could anyone please help me with this ? What I might be missing ?
-
using ffmpeg in Azure function to cut files using c#
24 mars 2017, par abhishekmoondra1989I have written an Azure function in C# which will cut a big mp4 files into some small duration. I have copied everything that is required (ffmpeg executeable, video file) in home directory via KUDU console. But when I run the the function it runs for more than 5 minutes and it doesn’t give any files in the home directory.
Function :
using System;
using System.Diagnostics;
public static void Run(string input, TraceWriter log)
{
log.Info("Executing");
using (var process = new Process())
{
process.StartInfo.FileName = @"D:\home\ffmpeg.exe";
process.StartInfo.Arguments = @"-i D:\home\AmnestyInternational.mp4 -ss 00:00:03 -t 00:00:08 -async 1 D:\home\cut.mp4";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
log.Info(Directory.GetCurrentDirectory());
log.Info("Cutting starts:"+DateTime.Now.ToString("h:mm:ss tt"));
process.Start();
string output = process.StandardOutput.ReadToEnd();
process.WaitForExit();
log.Info("Cutting ends :"+DateTime.Now.ToString("h:mm:ss tt"));
log.Info(output);
}
}Output seen on Azure function Console :
2017-03-24T11:06:00.705 Function started (Id=df082f54-719a-415f-b7f1-b10548a213be)
2017-03-24T11:06:00.721 Executing
2017-03-24T11:06:00.721 D:\Windows\system32
2017-03-24T11:06:00.721 Cutting start :11:06:00 AM
2017-03-24T11:07:14 No new trace in the past 1 min(s).
2017-03-24T11:08:14 No new trace in the past 2 min(s).
2017-03-24T11:09:14 No new trace in the past 3 min(s).
2017-03-24T11:10:14 No new trace in the past 4 min(s).
2017-03-24T11:11:00.758 Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.ManualTriggerCSharp1.When I try to execute this same command on KUDU console or my own PC it only take 1.5 mins and I get a file of the desired duration
Could anyone please help me with this ? What I might be missing ?