
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 (21)
-
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...) -
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...) -
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site
Sur d’autres sites (4021)
-
Matplotlib - Why is my saved animation video blank ?
4 juillet 2022, par Pat XThis should be pretty simple but I just don't know.



A newbie to Python and FFmpeg. Just trying to save a test video from ArtistAnimation but got blank video.



Before I tried to produce the video, I can see the animation by plt.show() (without "matplotlib.use("Agg")" ). I have already installed FFmpeg in Anaconda as well.



To ensure my FFmpeg is functioning, I used the code from matplotlib example and produced a video that looks perfect. (I guess this means my FFmpeg will work fine from now on ?)



Then, I only changed the figure to my version. Having compared the figure part, I didn't see anything wrong obviously. But in the saved video of my version, it's blank.



import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.animation as ani
import numpy as np
import pandas as pd


fig = plt.figure()
ims = []
for i in range(10):
 ax1 = plt.subplot2grid((2, 2), (0, 0), colspan=2, rowspan=2)
 data = np.random.normal(0, 1, i+1)
 pd.DataFrame(data).plot(kind='bar', ax=ax1)
 ims.append([ax1])



# Set up formatting for the movie files
Writer = ani.writers['ffmpeg']
writer = Writer(fps=15, metadata=dict(artist='Me'), bitrate=1800)

anim = ani.ArtistAnimation(fig, ims, interval=500, repeat_delay=3000, blit=True)
anim.save('textmovie.mp4', writer=writer)
plt.show()



-
avfilter/scale : add animation support
15 décembre 2019, par Gyan Doshi -
create video from images with animation
3 janvier 2020, par zuiluoI have ten images to create a video with animation , like that
https://youtu.be/iu9uazolcC8it use freeImage and FFmpeg.
MovieWriter writer(fileName, IMG_WIDTH, IMG_HEIGHT);
vector ls = {
"D:/createVideo/src/c/1.jpg",
"D:/createVideo/src/c/2.jpg",
"D:/createVideo/src/c/3.jpg",
"D:/createVideo/src/c/4.jpg",
"D:/createVideo/src/c/5.jpg",
"D:/createVideo/src/c/6.jpg",
"D:/createVideo/src/c/7.jpg",
"D:/createVideo/src/c/8.jpg",
"D:/createVideo/src/c/9.jpg",
"D:/createVideo/src/c/10.jpg",
};
FREE_IMAGE_FORMAT pic_type = FIF_JPEG;
FIBITMAP *fiCopy = NULL;
FIBITMAP *corpImg = NULL;
uint8_t *ut = NULL;
for (int i=0;i<10;i++)
{
char *src_pic_path = ls[i];
FIBITMAP *fi = FreeImage_Load(pic_type, src_pic_path);
if(fi==NULL){
continue;
}
int w = IMG_WIDTH;
int h = IMG_HEIGHT;
unsigned int index = 0;
while (w > IMG_MIN_W_SCALE || h > IMG_MIN_H_SCALE)
{
fiCopy = FreeImage_RescaleRect(fi, IMG_WIDTH, IMG_HEIGHT,0, 0, w * 2, h * 2);
if(fiCopy == NULL){
break;
}
corpImg = FreeImage_Rescale(fiCopy, IMG_WIDTH, IMG_HEIGHT);
if(corpImg == NULL){
break;
}
ut = FreeImage_GetBits(corpImg);
if(ut == NULL){
break;
}
w -= ONE_W_PIECE;
h -= ONE_H_PIECE;
writer.addFrame(ut);
FreeImage_Unload(corpImg);
FreeImage_Unload(fiCopy);
index++;
}
}but it so slowly, how to optimization that code ? or how to faster to create that video ?
would you know about an option to do that ?