
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (83)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5629)
-
MoviePy error : failed to read the first frame of video file ****. That might mean that the file is corrupted
14 juillet 2022, par Udit Hari VashishtI am trying to reverse a video using MoviePy. My code is as under : -


from moviepy.editor import VideoFileClip
from moviepy.video.fx.all import time_mirror

clip = VideoFileClip("udit.mp4")

clip = clip.fx(time_mirror)

clip.write_videofile("reversed.mp4")



But, when I run it I get the following error :-


Traceback (most recent call last):
 File "/Users/uditvashisht/projects/experiments/script.py", line 6, in <module>
 clip = clip.fx(time_mirror)
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/Clip.py", line 212, in fx
 return func(self, *args, **kwargs)
 File "", line 2, in time_mirror
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/decorators.py", line 54, in requires_duration
 return f(clip, *a, **k)
 File "", line 2, in time_mirror
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/decorators.py", line 29, in apply_to_mask
 newclip = f(clip, *a, **k)
 File "", line 2, in time_mirror
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/decorators.py", line 41, in apply_to_audio
 newclip = f(clip, *a, **k)
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/video/fx/time_mirror.py", line 13, in time_mirror
 return self.fl_time(lambda t: self.duration - t, keep_duration=True)
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/Clip.py", line 187, in fl_time
 return self.fl(lambda gf, t: gf(t_func(t)), apply_to,
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/Clip.py", line 136, in fl
 newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
 File "", line 2, in set_make_frame
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/decorators.py", line 14, in outplace
 f(newclip, *a, **k)
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/video/VideoClip.py", line 644, in set_make_frame
 self.size = self.get_frame(0).shape[:2][::-1]
 File "", line 2, in get_frame
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/decorators.py", line 89, in wrapper
 return f(*new_a, **new_kw)
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/Clip.py", line 93, in get_frame
 return self.make_frame(t)
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/Clip.py", line 136, in <lambda>
 newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/Clip.py", line 187, in <lambda>
 return self.fl(lambda gf, t: gf(t_func(t)), apply_to,
 File "", line 2, in get_frame
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/decorators.py", line 89, in wrapper
 return f(*new_a, **new_kw)
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/Clip.py", line 93, in get_frame
 return self.make_frame(t)
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/video/io/VideoFileClip.py", line 113, in <lambda>
 self.make_frame = lambda t: self.reader.get_frame(t)
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/video/io/ffmpeg_reader.py", line 184, in get_frame
 result = self.read_frame()
 File "/opt/homebrew/lib/python3.9/site-packages/moviepy/video/io/ffmpeg_reader.py", line 133, in read_frame
 raise IOError(("MoviePy error: failed to read the first frame of "
OSError: MoviePy error: failed to read the first frame of video file udit.mp4. That might mean that the file is corrupted. That may also mean that you are using a deprecated version of FFMPEG. On Ubuntu/Debian for instance the version in the repos is deprecated. Please update to a recent version from the website
</lambda></lambda></lambda></module>


I have tried the code on both Mac and Windows PC. The other functionality of MoviePy works fine, but I am not able to reverse the video. Both of my systems have ImageMagick and FFMPEG installed.


-
MoviePy, using a gif as an ImageClip ?
13 avril 2018, par SlakeUsing a gif inside an ImageClip doesn’t work, is it a normal behavior ?
The code
#!/usr/bin/env python
from moviepy.editor import *
video = VideoFileClip('./video.mp4')
watermark = (ImageClip("./my.gif")
.set_duration(10))
watermaked = CompositeVideoClip([video, watermark], size=video.size)
watermaked.write_videofile('./gif_output.mp4', fps=30, threads=1).
The error
ValueError: could not broadcast input array from shape (150,150) into shape (150,150,3)
.
The stack error
Traceback (most recent call last):
File "./gif_test.py", line 9, in <module>
watermaked.write_videofile('./gif_output.mp4', fps=30, threads=1)
File "", line 2, in write_videofile
File "/Library/Python/2.7/site-packages/moviepy/decorators.py", line 54, in requires_duration
return f(clip, *a, **k)
File "", line 2, in write_videofile
File "/Library/Python/2.7/site-packages/moviepy/decorators.py", line 137, in use_clip_fps_by_default
return f(clip, *new_a, **new_kw)
File "", line 2, in write_videofile
File "/Library/Python/2.7/site-packages/moviepy/decorators.py", line 22, in convert_masks_to_RGB
return f(clip, *a, **k)
File "/Library/Python/2.7/site-packages/moviepy/video/VideoClip.py", line 349, in write_videofile
progress_bar=progress_bar)
File "/Library/Python/2.7/site-packages/moviepy/video/io/ffmpeg_writer.py", line 209, in ffmpeg_write_video
fps=fps, dtype="uint8"):
File "/Library/Python/2.7/site-packages/tqdm/_tqdm.py", line 833, in __iter__
for obj in iterable:
File "/Library/Python/2.7/site-packages/moviepy/Clip.py", line 475, in generator
frame = self.get_frame(t)
File "", line 2, in get_frame
File "/Library/Python/2.7/site-packages/moviepy/decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
File "/Library/Python/2.7/site-packages/moviepy/Clip.py", line 95, in get_frame
return self.make_frame(t)
File "/Library/Python/2.7/site-packages/moviepy/video/compositing/CompositeVideoClip.py", line 110, in make_frame
f = c.blit_on(f, t)
File "/Library/Python/2.7/site-packages/moviepy/video/VideoClip.py", line 611, in blit_on
return blit(img, picture, pos, mask=mask, ismask=self.ismask)
File "/Library/Python/2.7/site-packages/moviepy/video/tools/drawing.py", line 45, in blit
new_im2[yp1:yp2, xp1:xp2] = blitted
ValueError: could not broadcast input array from shape (150,150) into shape (150,150,3)
</module> -
Anomalie #2115 (Nouveau) : Pas de moderation si syndication désactivée
3 juin 2011, par guytarr °Si la syndication automatique est désactivée dans la configuration des contenus du site, que l’on ajoute un site, on fait apparaitre les options de modérations des liens issus de la syndication. On ne devrait pas, car si on a le malheur de cliquer sur valider pour ces options de modération, la (...)