
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 (74)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)
Sur d’autres sites (10557)
-
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.
-
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.
-
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 ?