
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (59)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
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 (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (6829)
-
Evolution #4339 : Relancer les inscriptions en attente
4 novembre 2020, par b bMy bad, il n’y a rien à faire du côté du formulaire d’inscription, après test en 3.3 il ne génère pas d’erreur lors de la tentative de réinscription et renvoie bien le mail de confirmation.
cf le test sur le statut ’nouveau’ ici https://git.spip.net/spip/dist/src/branch/master/formulaires/inscription.php#L86
-
CreateComponent(AMFVideoEncoderVCE_AVC) failed with error 36
16 février 2021, par Mitrajeet GolsangiI am working on a matplotlib project and want to save it in a mp4 video format.
I am using the ffmpeg program for converting the animation in a video. This is the code for conversion


# The animation definition

ani = FuncAnimation(figure, my_frame_function, frames=100,
 interval=5, init_func=init, blit=True, repeat=True)


# Path for ffmpeg

plt.rcParams['animation.ffmpeg_path'] = 'C:/ffmpeg/bin/ffmpeg.exe'


# Setting up the writer

Writer = writers['ffmpeg']
writer = Writer(fps=10, metadata=dict(artist='Mitrajeet'), bitrate=None)

# Trying to Save the file
ani.save("test.png", writer=writer) # ---- Error here



After running the file I get this Error


MovieWriter stderr:
[h264_amf @ 00000000004ec840] CreateComponent(AMFVideoEncoderVCE_AVC) failed with error 36
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Traceback (most recent call last):
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\animation.py", line 251, in saving
 yield self
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\animation.py", line 1161, in save
 writer.grab_frame(**savefig_kwargs)
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\animation.py", line 363, in grab_frame
 self.fig.savefig(self._frame_sink(), format=self.frame_format,
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\figure.py", line 2311, in savefig
 self.canvas.print_figure(fname, **kwargs)
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 81, in print_figure
 super().print_figure(*args, **kwargs)
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\backend_bases.py", line 2210, in print_figure
 result = print_method(
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\backend_bases.py", line 1639, in wrapper
 return func(*args, **kwargs)
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\backends\backend_agg.py", line 456, in print_raw
 fh.write(renderer.buffer_rgba())
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "prime_counting_function.py", line 63, in <module>
 ani.save("D:/PycharmProjects/Math Graphs/Prime Numbers/output/test.png", writer=writer)
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\animation.py", line 1161, in save
 writer.grab_frame(**savefig_kwargs)
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
 self.gen.throw(type, value, traceback)
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\animation.py", line 253, in saving
 self.finish()
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\animation.py", line 354, in finish
 self.cleanup()
 File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\animation.py", line 390, in cleanup
 raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command '['C:/ffmpeg/bin/ffmpeg.exe', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '640x480', '-pix_fmt', 'rgba', '-r', '10', '-loglevel', 'error', '-i', 'pipe:', '-vcodec', 'h264', '-pix_fmt', 'yuv420p', '-metadata', 'artist=Mitrajeet', '-y', 'D:/PycharmProjects/Math Graphs/Prime Numbers/output/test.png']' returned non-zero exit status 1.
</module>


So whats wrong here ??


-
python 3 using ffmpeg in a subprocess getting stderr decoding error
4 mai 2024, par jdauthreI am running ffmpeg as a subprocess and using the stderr to get various bits of data like the subtitles stream Id's. It works fine for most videos, but one with japanese subtitles results in an error :


'charmap' codec can't decode byte in position xxx : character maps to


Much googling suggests the problem is that the japanese requires unicode, whereas English does not. Solutions offered refer to problems with files, and I cannot find a way of doing the same with the stderr. Relevent Code is below :


command = [ffmpeg,"-y","-i",fileSelected,"-acodec","pcm_s16le",
 "-vn","-t","3", "-f", "null","-"]
print(command) 
proc = subprocess.Popen(command,stderr=PIPE,Jstdin=subprocess.PIPE,
 universal_newlines=True,startupinfo=startupinfo)
 
stream = "" 
for line in proc.stderr:
 try:
 print("line",line)
 except exception as error:
 print("print",error)
 line = line[:-1]
 if "Stream #" in line:
 estream = line.split("#",1)[1]
 estream =estream.split(" (",1)[0]
 print("estream",estream)
 stream = stream + estream +"\n" #.split("(",1)[0] 
 stream = stream + estream +"\n"