
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (80)
-
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
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 ;
Sur d’autres sites (4568)
-
ffmpeg to count words in audio text
17 juillet 2020, par Joel ParkerI am new to signal processing but wanted to take an audio file and determine how many words are spoken in one minute. I was thinking I could use the top of the loudness peaks to count the words but do not quite understand how to achieve this.


First I used ffmpeg to remove the audio from the mp4 file I am using :


ffmpeg -i courtcase.mp4 audiofile.mp4


Then I tried to detect the loudness :


ffmpeg -t 10 -i audiofile.mp4 -af "volumedetect" -f null /dev/null


This produced some statistical information :


video:157kB audio:1723kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[Parsed_volumedetect_0 @ 0x7fa6b26068c0] n_samples: 882000
[Parsed_volumedetect_0 @ 0x7fa6b26068c0] mean_volume: -20.6 dB
[Parsed_volumedetect_0 @ 0x7fa6b26068c0] max_volume: -4.0 dB
[Parsed_volumedetect_0 @ 0x7fa6b26068c0] histogram_4db: 64
[Parsed_volumedetect_0 @ 0x7fa6b26068c0] histogram_5db: 88
[Parsed_volumedetect_0 @ 0x7fa6b26068c0] histogram_6db: 220
[Parsed_volumedetect_0 @ 0x7fa6b26068c0] histogram_7db: 843




I am not sure why it still shows 157kB of video, maybe my first command is wrong ?


Anyway, assuming the file is just audio I found this command, which I believe shows dbm slices for 10 seconds :


ffmpeg -i audiofile.mp4 -af astats=metadata=1:reset=1,ametadata=print:key=lavfi.astats.Overall.RMS_level:file=- -f null -



and it produced a bunch of output :


video:5782kB audio:63504kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[Parsed_astats_0 @ 0x7ff74c004bc0] Channel: 1
[Parsed_astats_0 @ 0x7ff74c004bc0] DC offset: 0.000240
[Parsed_astats_0 @ 0x7ff74c004bc0] Min level: -0.166239
[Parsed_astats_0 @ 0x7ff74c004bc0] Max level: 0.127112
[Parsed_astats_0 @ 0x7ff74c004bc0] Min difference: 0.000003
[Parsed_astats_0 @ 0x7ff74c004bc0] Max difference: 0.025335
[Parsed_astats_0 @ 0x7ff74c004bc0] Mean difference: 0.004455
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS difference: 0.006165
[Parsed_astats_0 @ 0x7ff74c004bc0] Peak level dB: -15.585332
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS level dB: -26.251394
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS peak dB: -26.251394
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS trough dB: -26.251394
[Parsed_astats_0 @ 0x7ff74c004bc0] Crest factor: 3.414311
[Parsed_astats_0 @ 0x7ff74c004bc0] Flat factor: 0.000000
[Parsed_astats_0 @ 0x7ff74c004bc0] Peak count: 2
[Parsed_astats_0 @ 0x7ff74c004bc0] Noise floor dB: nan
[Parsed_astats_0 @ 0x7ff74c004bc0] Noise floor count: 0
[Parsed_astats_0 @ 0x7ff74c004bc0] Bit depth: 32/32
[Parsed_astats_0 @ 0x7ff74c004bc0] Dynamic range: 72.297593
[Parsed_astats_0 @ 0x7ff74c004bc0] Zero crossings: 74
[Parsed_astats_0 @ 0x7ff74c004bc0] Zero crossings rate: 0.072266
[Parsed_astats_0 @ 0x7ff74c004bc0] Number of NaNs: 0
[Parsed_astats_0 @ 0x7ff74c004bc0] Number of Infs: 0
[Parsed_astats_0 @ 0x7ff74c004bc0] Number of denormals: 0
[Parsed_astats_0 @ 0x7ff74c004bc0] Channel: 2
[Parsed_astats_0 @ 0x7ff74c004bc0] DC offset: 0.000240
[Parsed_astats_0 @ 0x7ff74c004bc0] Min level: -0.166239
[Parsed_astats_0 @ 0x7ff74c004bc0] Max level: 0.127112
[Parsed_astats_0 @ 0x7ff74c004bc0] Min difference: 0.000003
[Parsed_astats_0 @ 0x7ff74c004bc0] Max difference: 0.025335
[Parsed_astats_0 @ 0x7ff74c004bc0] Mean difference: 0.004455
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS difference: 0.006165
[Parsed_astats_0 @ 0x7ff74c004bc0] Peak level dB: -15.585332
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS level dB: -26.251394
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS peak dB: -26.251394
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS trough dB: -26.251394
[Parsed_astats_0 @ 0x7ff74c004bc0] Crest factor: 3.414311
[Parsed_astats_0 @ 0x7ff74c004bc0] Flat factor: 0.000000
[Parsed_astats_0 @ 0x7ff74c004bc0] Peak count: 2
[Parsed_astats_0 @ 0x7ff74c004bc0] Noise floor dB: nan
[Parsed_astats_0 @ 0x7ff74c004bc0] Noise floor count: 0
[Parsed_astats_0 @ 0x7ff74c004bc0] Bit depth: 32/32
[Parsed_astats_0 @ 0x7ff74c004bc0] Dynamic range: 72.297593
[Parsed_astats_0 @ 0x7ff74c004bc0] Zero crossings: 74
[Parsed_astats_0 @ 0x7ff74c004bc0] Zero crossings rate: 0.072266
[Parsed_astats_0 @ 0x7ff74c004bc0] Number of NaNs: 0
[Parsed_astats_0 @ 0x7ff74c004bc0] Number of Infs: 0
[Parsed_astats_0 @ 0x7ff74c004bc0] Number of denormals: 0
[Parsed_astats_0 @ 0x7ff74c004bc0] Overall
[Parsed_astats_0 @ 0x7ff74c004bc0] DC offset: 0.000240
[Parsed_astats_0 @ 0x7ff74c004bc0] Min level: -0.166239
[Parsed_astats_0 @ 0x7ff74c004bc0] Max level: 0.127112
[Parsed_astats_0 @ 0x7ff74c004bc0] Min difference: 0.000003
[Parsed_astats_0 @ 0x7ff74c004bc0] Max difference: 0.025335
[Parsed_astats_0 @ 0x7ff74c004bc0] Mean difference: 0.004455
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS difference: 0.006165
[Parsed_astats_0 @ 0x7ff74c004bc0] Peak level dB: -15.585332
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS level dB: -26.251394
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS peak dB: -26.251394
[Parsed_astats_0 @ 0x7ff74c004bc0] RMS trough dB: -26.251394
[Parsed_astats_0 @ 0x7ff74c004bc0] Flat factor: 0.000000
[Parsed_astats_0 @ 0x7ff74c004bc0] Peak count: 2.000000
[Parsed_astats_0 @ 0x7ff74c004bc0] Noise floor dB: nan
[Parsed_astats_0 @ 0x7ff74c004bc0] Noise floor count: 0.000000
[Parsed_astats_0 @ 0x7ff74c004bc0] Bit depth: 32/32
[Parsed_astats_0 @ 0x7ff74c004bc0] Number of samples: 1024
[Parsed_astats_0 @ 0x7ff74c004bc0] Number of NaNs: 0.000000
[Parsed_astats_0 @ 0x7ff74c004bc0] Number of Infs: 0.000000
[Parsed_astats_0 @ 0x7ff74c004bc0] Number of denormals: 0.000000
ts_time:368.268
lavfi.astats.Overall.RMS_level=-29.670653
frame:15861 pts:16241664 pts_time:368.292
lavfi.astats.Overall.RMS_level=-30.851195
frame:15862 pts:16242688 pts_time:368.315
lavfi.astats.Overall.RMS_level=-30.700943
frame:15863 pts:16243712 pts_time:368.338
lavfi.astats.Overall.RMS_level=-33.638604
frame:15864 pts:16244736 pts_time:368.361
lavfi.astats.Overall.RMS_level=-21.873170
frame:15865 pts:16245760 pts_time:368.385
lavfi.astats.Overall.RMS_level=-20.001936
frame:15866 pts:16246784 pts_time:368.408
lavfi.astats.Overall.RMS_level=-18.571318
frame:15867 pts:16247808 pts_time:368.431
lavfi.astats.Overall.RMS_level=-18.470749
frame:15868 pts:16248832 pts_time:368.454
lavfi.astats.Overall.RMS_level=-19.506688
frame:15869 pts:16249856 pts_time:368.477
lavfi.astats.Overall.RMS_level=-21.270579
frame:15870 pts:16250880 pts_time:368.501
lavfi.astats.Overall.RMS_level=-25.007862
frame:15871 pts:16251904 pts_time:368.524
lavfi.astats.Overall.RMS_level=-25.654372
frame:15872 pts:16252928 pts_time:368.547
lavfi.astats.Overall.RMS_level=-24.948357
frame:15873 pts:16253952 pts_time:368.57
lavfi.astats.Overall.RMS_level=-30.523540
frame:15874 pts:16254976 pts_time:368.594
....



This is where I'm stuck. I think I have the information I need to determine the number of words spoken in a minute, except I don't know how to put all together. Also the last command just measures 10s slices, would I need to change that to 60s ? Does anyone know how to do this or if there is a better approach ?


-
How the ffmpeg astats crest factor is calculated
30 août 2017, par FranGarI’m scripting a ffmpeg chain process for my work. The aim is normalizing/compressing lot of audio files (mp3’s).
It’s done in Python and the critical part is the line :ffmpeg -y -i "Input.mp3" -codec:a libmp3lame -b:a 96k -af acompressor=threshold=-15dB:ratio=5:attack=0.01:release=1000:knee=2,dynaudnorm=g=3:m=2:p=0.95 "Output.mp3"
The python script it’s complete and working BUT the nature of the audios (voice recordings) are very different so I can’t use the same params for all of them.
I make some experimenting with the values of the ffmpeg filter astats and i discovered that the crest factor (Standard ratio of peak to RMS level ) gave a good reference to programatically get the better params.
In fact I saw that a recording with a nice dynamic range sound and smooth in shape, get crest values around 9-15 (the compress/normlz params will be somehow conservative). But audios with crest around 22-30 need more aggressive processing.
(All empirically)Somebody can clarify how the crest values are really calculated ? Which are the peaks taken to account ? (Why the flat factor is always 0 ?)
Or if somebody knows how to get a value representing the sound ’smoothness’ will be nice also.Thanks for the ideas.
-
How the ffmpeg astats crest factor value of an audio track is calculated
29 août 2017, par FranGarI’m scripting a ffmpeg chain process for my work. The aim is normalizing/compressing lot of audio files (mp3’s).
It’s done in Python and the critical part is the line :ffmpeg -y -i "Input.mp3" -codec:a libmp3lame -b:a 96k -af acompressor=threshold=-15dB:ratio=5:attack=0.01:release=1000:knee=2,dynaudnorm=g=3:m=2:p=0.95 "Output.mp3"
The python script it’s complete and working BUT the nature of the audios (voice recordings) are very different so I can’t use the same params for all of them.
I make some experimenting with the values of the ffmpeg filter astats and i discovered that the crest factor (Standard ratio of peak to RMS level ) gave a good reference to programatically get the better params.
In fact I saw that a recording with a nice dynamic range sound and smooth in shape, get crest values around 9-15 (the compress/normlz params will be somehow conservative). But audios with crest around 22-30 need more aggressive processing.
(All empirically)Somebody can clarify how the crest values are really calculated ? Which are the peaks taken to account ? (Why the flat factor is always 0 ?)
Or if somebody knows how to get a value representing the sound ’smoothness’ will be nice also.Thanks for the ideas.