
Recherche avancée
Médias (16)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (54)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
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 (...)
Sur d’autres sites (8939)
-
How to kill a stale process
12 avril 2015, par AndyI run transcoding on Ubuntu server and sometimes the process goes stale and provides no output but
ps aux
shows process is still running - but with stale CPU usageI can get the CPU usage with the following command(ffmpeg process i was working with has process id 4416 :
ps aux | grep -v grep | grep 4416 | awk '{print $3}'
and I could probably create a small script to kill a specific process but how would I create a loop that would check each ffmpeg process and kill it if its stale(runit will restart it afterwards) ?
I think it would need to execute the command to get CPU usage twice with a minute cron and kill the process if CPU usage is the same. Would would I do this ?
-
ffmpeg process not terminating - stuck in code
17 juillet 2023, par hello worldusing (Process process = new Process())
{
 process.StartInfo.FileName = "ffmpeg.exe";
 process.StartInfo.Arguments = "-i video.mp4 -loop 1 -i a.jpg -c:v copy -c:a copy -shortest output_temp.mp4";
 process.StartInfo.UseShellExecute = false;
 process.StartInfo.RedirectStandardOutput = true;
 process.StartInfo.RedirectStandardError = true;
 process.StartInfo.CreateNoWindow = true;
 process.Start();
 process.WaitForExit();
}



I have verified that the input files, video.mp4 and a.jpg, exist in the specified paths and are accessible. Additionally, I've tried removing the -shortest option to rule out an infinite loop, but the issue persists.


I've also redirected the standard output and error streams to log files, but there are no error messages reported.


I'm using the last version of ffmpeg on Windows.


What could be causing the ffmpeg process to get stuck and not terminate as expected ? Are there any other potential reasons I should investigate ? Any help or suggestions would be greatly appreciated. Thank you !


Edit : Also in the mean time ffmpeg command is not working.


-
C# FFMPEG Process and Multiple files
23 novembre 2023, par wesmanI am working on a C# Form tool that will help me convert all of my phone and DSLR video to HEVC, currently, i have a program that uploads the photos and videos to different directories in my home server each time i connect to the WiFi. Once a month or so, i manually convert all the videos, but thought I would automate the process.. I have the Form working perfectly for processing 1 file. but get into trouble when processing a Directory (with possible sub-directories) all at once..



Sorry, this is long, just want to be thorough. here is the button calls



private void processFile_Click(object sender, EventArgs e)
 {
 OpenFileDialog file = new OpenFileDialog();
 file.InitialDirectory = baseMediaDirectory;
 if (file.ShowDialog() == DialogResult.OK)
 {
 ProcessSinlgeFile(file.FileName);
 }
 }




(above)for one file and (below) for a directory



private void processDirectory_Click(object sender, EventArgs e)
{
 FolderBrowserDialog file = new FolderBrowserDialog();
 file.SelectedPath = baseMediaDirectory;
 if(file.ShowDialog() == DialogResult.OK)
 {
 ProcessDirectoryOfFiles(file.SelectedPath);
 }
}

private void ProcessDirectoryOfFiles(string selectedPath)
 {
 List<string> listOfFiles = GetAllFiles(selectedPath);
 foreach (string s in listOfFiles)
 {
 ProcessSinlgeFile(s);
 }
 }
</string>



both ultimately call this method, to do some checks and setup



private void ProcessSinlgeFile(string fileName)
 {

 if (IsAcceptableMediaFile(fileName))
 {
 outputWindow.AppendText("File to Process: " + fileName);
 processMediaFile = 
 new MediaFileWrapper(this.outputWindow, new MediaFile(fileName), new NReco.VideoInfo.FFProbe());
 if (processMediaFile.OkToProcess)
 {
 int initialCRFValue = 15;
 //ultrafast superfast veryfast faster fast medium slow slower veryslow placebo
 string intialSpeed = "veryfast";
 try {

 ConvertToMPEG(processMediaFile.getFFMPEGCommand(initialCRFValue, intialSpeed), processMediaFile);
 }
 catch
 {
 // at somepoint, we'll catch a bad file size (or compression)
 // then change the CRF value and/or compression speed
 }
 }
 }
 }




ultimately I get to this Method and run into trouble.



private async void ConvertToMPEG(string arguments, MediaFileWrapper processMediaFile)
 {
 startTime = DateTime.Now;
 watch = new Stopwatch();
 watch.Start();
 progressBar1.Minimum = 0;
 progressBar1.Maximum = processMediaFile.GetTotalMilliseconds();

 // Start the child process.
 p = new Process();

 //Setup filename and arguments
 outputWindow.AppendText("ffmpeg " + arguments);
 p.StartInfo.Arguments = arguments;
 p.StartInfo.FileName = "ffmpeg.exe";
 p.StartInfo.UseShellExecute = false;

 // Redirect the output stream of the child process.
 p.StartInfo.RedirectStandardOutput = true;
 p.StartInfo.RedirectStandardError = true;
 p.StartInfo.RedirectStandardInput = true;

 // capture the date for stdout and std error
 // note FFMPEG uses Stderr exclusively
 p.ErrorDataReceived += new DataReceivedEventHandler(ErrorDataReceived);
 p.OutputDataReceived += new DataReceivedEventHandler(OutputDataReceived);

 // Hide Console Window
 p.StartInfo.CreateNoWindow = true;
 p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;

 p.Start();
 p.BeginErrorReadLine();
 p.BeginOutputReadLine();
 await p.WaitForExitAsync();
 }




and WaitForExitAsync is in another class because in can not be in here with a Form



public static Task WaitForExitAsync(this Process process,
 CancellationToken cancellationToken = default(CancellationToken))
 {
 var tcs = new TaskCompletionSource();
 process.EnableRaisingEvents = true;
 process.Exited += (sender, args) => tcs.TrySetResult(null);
 if (cancellationToken != default(CancellationToken))
 cancellationToken.Register(tcs.SetCanceled);

 return tcs.Task;
 }




however, single files work fine, when I call a directory through, it continuously starts processes for each file, trying to run them all at the same time. You can see I tried implementing this 
process.WaitForExit() asynchronously
with no luck.