
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (81)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (10442)
-
How to read realtime microphone audio volume in python and ffmpeg or similar
1er septembre 2023, par Ryan MartinI'm trying to read, in near-realtime, the volume coming from the audio of a USB microphone in Python.


I have the pieces, but can't figure out how to put it together.


If I already have a .wav file, I can pretty simply read it using wavefile :


from wavefile import WaveReader

with WaveReader("/Users/rmartin/audio.wav") as r:
 for data in r.read_iter(size=512):
 left_channel = data[0]
 volume = np.linalg.norm(left_channel)
 print(volume)



This works great, but I want to process the audio from the microphone in real-time, not from a file.


So my thought was to use something like ffmpeg to PIPE the real-time output into WaveReader, but my Byte knowledge is somewhat lacking.


import subprocess
import numpy as np

command = ["/usr/local/bin/ffmpeg",
 '-f', 'avfoundation',
 '-i', ':2',
 '-t', '5',
 '-ar', '11025',
 '-ac', '1',
 '-acodec','aac', '-']

pipe = subprocess.Popen(command, stdout=subprocess.PIPE, bufsize=10**8)
stdout_data = pipe.stdout.read()
audio_array = np.fromstring(stdout_data, dtype="int16")

print audio_array



That looks pretty, but it doesn't do much. It fails with a
[NULL @ 0x7ff640016600] Unable to find a suitable output format for 'pipe:'
error.

I assume this is a fairly simple thing to do given that I only need to check the audio for volume levels.


Anyone know how to accomplish this simply ? FFMPEG isn't a requirement, but it does need to work on OSX & Linux.


-
Can speex be packed into mpegts stream ?
24 juillet 2013, par user2384001I want to use speex in a real-time application. I want to playback this mpegts stream by ffmpeg. Are there any means to pack speex into mpegts stream ?
-
ffmpeg copy stream preserving FPS
10 mars 2017, par James TaylorI have a stream that I know is outputting at a certain frame rate (30 FPS). I want to use ffmpeg to make a copy of this stream and save it to disk.
I have the following command :
ffmpeg -i http://input/ -c copy -map 0 \
-f segment -strftime 1 -segment_time 900 \
-segment_atclocktime 1 -segment_format mp4 %Y-%m-%d_%H-%M-%S.mp4But when I run the command, I see the following :
frame= 32 fps=3.9 q=-1.0 Lsize=N/A time=00:00:01.27 bitrate=N/A
Where it appears the FPS is hovers around 4.0 FPS and
time
moves slower than real time.I tried added
-re
(copy the rate of the input stream) and-r 30
(manually set the rate to 30 FPS) flag specified before the input file, but it didn’t seem to work.I also read a similar question here using
-framerate 30
, but that option doesn’t exist in the man pages and is anInvalid option
.Any help would be greatly appreciated !
So I let the modified command (removing the flags
-c copy -map 0
) run for exactly 5 minutes. Runningffprobe
yields :Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2017-03-10_01-09-12.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.2.100
Duration: 00:00:15.43, start: 0.066016, bitrate: 13416 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1024x768, 13414 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandlerAgain, this only produces 15 seconds of video and I can’t seem to get a 1:1 relationship between the input stream of 30 FPS and an output stream also in 30 FPS in real time. Playing the video yields something that’s sped up.