
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (65)
-
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (6518)
-
How the ffmpeg astats crest factor 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.
-
Why subprocess.run() have unexpected behavior in try else block ?
25 novembre 2023, par Nikita SavenkovTrying to make "to mp4" converter function using ffmpeg that is going to convert a file to mp4, delete original file and return True or False for specific conditions.
But I get some unexpected behavior of a subprocess.


Initially I used this construction :


def to_mp4_converter(file):

 input_file = file
 output_file = f"{re.sub(r'\..+$', "", file)}.mp4"

 try:
 subprocess.run(['ffmpeg', '-i', input_file, output_file])
 except subprocess.SubprocessError as e:
 print(f"Subprocess Error: {e}")
 return False
 else:
 try:
 os.remove(path=file)
 except OSError as e:
 print(f"Can't remove {file} file: {e}")
 finally:
 return True



Original file is removed, but output file is half of the expected size and quality of video is low.


But if I place subprocess.run() and os.remove() into separate try else blocks like that :


def to_mp4_converter(file):

 input_file = file
 output_file = f"{re.sub(r'\..+$', "", file)}.mp4"

 try:
 subprocess.run(['ffmpeg', '-i', input_file, output_file])
 except subprocess.SubprocessError as e:
 print(f"Subprocess Error: {e}")
 return False
 else:
 pass

 try:
 os.remove(path=file)
 except OSError as e:
 print(f"Can't remove {file} file: {e}")
 finally:
 return True



Everything works fine.


Isn't subprocess.run() should be a blocking operation, so the else statement in 1st example is unreachable until conversion is done ?


-
avfilter/af_channelmap : Fix double-free of AVFilterChannelLayouts on error
7 août 2020, par Andreas Rheinhardtavfilter/af_channelmap : Fix double-free of AVFilterChannelLayouts on error
The query_formats function of the channelmap filter tries to allocate
a list of channel layouts which on success are attached to more permanent
objects (an AVFilterLink) for storage afterwards. If attaching succeeds,
the link becomes one of the common owners (in this case, the only owner)
of the list. Yet if the list has been successfully attached to the link
and an error happens lateron, the list was manually freed, which is wrong,
because it is owned by its link so that the link's pointer to the list will
become dangling and there will be a double-free/use-after-free when the link
is later cleaned up automatically.This commit fixes this by removing the custom freeing code ; this will
temporarily add a leaking codepath (if attaching the list fails, the list
will leak), but this will be fixed soon by making sure that an
AVFilterChannelLayouts without owner will be automatically freed when
attaching it to an AVFilterLink fails.Reviewed-by : Nicolas George <george@nsup.org>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>