
Recherche avancée
Médias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (77)
-
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
L’espace de configuration de MediaSPIP
29 novembre 2010, parL’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
Il permet de configurer finement votre site.
La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)
Sur d’autres sites (10542)
-
Piping the output of ffmpeg directly to Audacity
21 décembre 2020, par colin baguleyI'm trying to make a 2 stage process into one CLI command.


First :- I want to extract the audio from a video file


Second :- I want to open up that audio file in Audacity


On the command line at the moment I do this :-


-ffmpeg -i inputfile.mp4 -vn sound.wav ; audacity sound.wav


which works but involves writing the sound.wav to my disc ( I don't want to keep sound.wav)


It strikes me that it would be quicker if I could just pipe the ffmpeg output directly into audacity but I can't seem to work out how to do it.


Yes - I know that using the GUI of Audacity I can just 'open' the mp4 directly into audacity but I would like to use a CLI command


Thank you for your help ( and have a peaceful and joyful Christmas !)


-
Explicitly set soundManager.preferFlash = true for some demo/API/docs cases
31 juillet 2011m demo/360-player/canvas-visualization-basic.html m demo/360-player/canvas-visualization.html m demo/animation-1/script/animation.js m demo/animation-2a/index.html m demo/animation-2b/script/animation.js m demo/api/index.html m demo/christmas-lights/christmaslights.js m (...)
-
How to print Continuous output of Popen when reset character is used
25 août 2022, par cclloydI have a snippet of code that runs a video conversion using
ffmpeg
.

I read the output to analyze it later in the application, and also want to print it to console, for user feedback.


So I have


p = Popen(['ffmpeg', *args], stderr=STDOUT, stdout=PIPE)
while True:
 line = p.stdout.readline()
 if not line: 
 break
 print(line.decode('utf-8'), end='')

p.wait()
if p.returncode == 0:
 pass




Which works, somewhat. It prints the initial output of the ffmpeg command, as those are simple print statements.


But once the conversion starts, all the output is updated on one line, presumably using some reset character to move the cursor position back to the start of the line.


Is there a way to continue to print that output ?


Edit :


Answer


p = subprocess.Popen(args, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, universal_newlines=True)

with p.stdout:
 for line in iter(p.stdout.readline, None):
 if not line:
 break
 if line.startswith('frame'):
 print(f'\033[2K{line.strip()}\r', end='')
 else:
 print(line, end='')



This includes the cursor return, and clears the current line before printing to it again. And still prints the part I want on the same line, like it normally does.