
Recherche avancée
Autres articles (55)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (11302)
-
Python, FFMPEG : Redirecting output of FFMPEG subprocess call to a string
31 décembre 2019, par user1452030I’ve managed to run an FFMPEG command using the subprocess module as shown below :
output = subprocess.check_output(command, shell=True)
This works fine, but it prints the verbose FFMPEG output to console. The program I’m writing is supposed to run for hundreds/thousands of files in a batch and I don’t want detailed outputs for every file processed, unless the user chooses to do so. Can I redirect the console outputs and errors to strings, so that I can decide when I should and shouldn’t print them ?
This might be lame, but I tried the following snippet :
outputBuffer = BytesIO()
output = subprocess.check_output(command, shell=True, stdout=outputBuffer)But it gave me the following error :
ValueError: stdout argument not allowed, it will be overridden.
I saw other examples where the
POpen
interface was used, but given that I’m not communicating with the external command as it is running, and that I need to run this for a large number of items, I’d prefer something simpler, if possible.Thanks in advance !
Note : I’ve found lots of questions in this broad topic, but I couldn’t find anything perfectly relevant to my situation.
-
Silence "string-plus-int" warning shown by clang.
6 janvier 2020, par Carl Eugen HoyosSilence "string-plus-int" warning shown by clang.
libswscale/utils.c:89:42 : warning : adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]
-
PowerShell doesn't recognize string correctly
20 janvier 2020, par fdroidI’m passing a command to powershell
Dim command As String
command = "ffmpeg -vsync 0 –hwaccel cuvid -c:v h264_cuvid –resize 1280x720 -i D:\Imagens\nova\bol.mkv -c:a copy -c:v h264_nvenc -b:v 5M D:\Imagens\nova\bol_encod.mkv"with
Dim powerShell As String = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
Process.Start("powershell", "-noexit " + command)but powershell returns
Unable to find a suitable output format for ’ÔÇôhwaccel’ ÔÇôhwaccel :
Invalid argumentwhere I believe ’ÔÇôhwaccel’ to be –hwaccel ; That’s completely strange, once when I past the code directly on PowerShell it works fine.
Is that a problem with my string ?
thank you !