
Recherche avancée
Autres articles (98)
-
MediaSPIP : Modification des droits de création d’objets et de publication définitive
11 novembre 2010, parPar défaut, MediaSPIP permet de créer 5 types d’objets.
Toujours par défaut les droits de création et de publication définitive de ces objets sont réservés aux administrateurs, mais ils sont bien entendu configurables par les webmestres.
Ces droits sont ainsi bloqués pour plusieurs raisons : parce que le fait d’autoriser à publier doit être la volonté du webmestre pas de l’ensemble de la plateforme et donc ne pas être un choix par défaut ; parce qu’avoir un compte peut servir à autre choses également, (...) -
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 (...) -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)
Sur d’autres sites (9122)
-
Python 3 subprocess.popen() doesn't work on linux. Works on windows [closed]
30 avril 2021, par user2628458process = subprocess.Popen(
 cmd, shell=True,
 stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
 universal_newlines=True)
for line in process.stdout:
 # ...



I have this line that executes an FFmpeg job and throws out every line in the output to a variable. It works fine on Windows, but doesn't work at all on Linux. The
for
loop never gets executed. I can't find anything about this, or the difference between Windows and Linuxsubprocess.Popen()
. Can you please point me the right way to fix this ?

-
Trying to find a way to limit the number of List that can run at one time
14 mars 2024, par JakeMy application has a List of Tasks. Each Task launches a FFMPEG process that requires a lot of resources on my machine. At times, this list can contain 200+ processes to FFMPEG. While processing, my memory is at 99% and everything freezes up.


I need to limit the amount of processes that can run at one time. I have read a little about SemaphoreSlim ; however, I cannot wrap my mind around it's implementation.


Is this a solution for this particular problem and if so, any ideas on how to implement it in my code ?


Below is my code :


public async System.Threading.Tasks.Task GetVideoFiles()
{ 
 OpenFileDialog openFileDialog = new OpenFileDialog();
 openFileDialog.Multiselect = true;
 
 if (openFileDialog.ShowDialog() == true)
 {
 AllSplices.Clear();
 AllSplices = new ObservableCollection<splicemodel>();
 IsBusy = true;
 IsBusyMessage = "Extracting Metadata";
 IsBusyBackgroundVisible = "Visible";
 NotifyPropertyChanged(nameof(IsBusy));
 NotifyPropertyChanged(nameof(IsBusyMessage));
 NotifyPropertyChanged(nameof(IsBusyBackgroundVisible));
 metaTasks = new List>(); 
 extractFramesTask = new List();
 
 foreach (string file in openFileDialog.FileNames)
 {
 FileInfo fileInfo = new FileInfo(file);
 bool canAdd = true;
 var tempFileName = fileInfo.Name;
 
 foreach (var video in AllVideos)
 {
 if (file == video.VideoPath)
 {
 canAdd = false;
 break;
 }

 if (video.VideoName.Contains(tempFileName))
 {
 video.VideoName = "_" + video.VideoName; 
 } 
 }
 if (canAdd)
 { 
 metaTasks.Add(System.Threading.Tasks.Task.Run(() => ProcessMetaData(file))); 
 } 
 }
 var metaDataResults = await System.Threading.Tasks.Task.WhenAll(metaTasks); 
 
 foreach (var vid in metaDataResults)
 { 
 if(vid == null)
 {
 continue;
 }
 
 vid.IsNewVideo = true; 
 AllVideos.Add(vid);
 
 // This list of task launches up to 200 video processing processes to FFMPEG
 extractFramesTask.Add(System.Threading.Tasks.Task.Run(() => ExtractFrames(vid)));
 
 vid.IsProgressVisible = "Visible";
 TotalDuration += vid.VideoDuration;
 vid.NumberOfFrames = Convert.ToInt32(vid.VideoDuration.TotalSeconds * 30);
 _ = ReportProgress(vid);
 }
 
 IsBusyMessage = "Importing Frames";
 NotifyPropertyChanged(nameof(IsBusyMessage)); 
 await System.Threading.Tasks.Task.WhenAll(extractFramesTask); 
 }
</splicemodel>


-
Process won't stop
14 mai 2018, par Srdjan M.The process goes in infinite loop or it’s waiting something and I don’t know what. It won’t pass
WaitForExit
methode.FFmpeg :
-ss 0 -i output.mp4 -t 10 -an -y test.mp4
C# Code :
using (Process process = new Process())
{
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.FileName = FileName; // ffmpeg.exe
process.StartInfo.Arguments = Arguments; //-ss 0 -i output.mp4 -t 10 -an -y test.mp4
process.Start();
process.WaitForExit(); // stops here and waits
return process.StandardOutput.ReadToEnd();
}Edit :
Adding
-loglevel quiet
to myffmpeg
query made my problem disappear. Why ?