
Recherche avancée
Autres articles (91)
-
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 (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Les sons
15 mai 2013, par
Sur d’autres sites (6060)
-
How to animate video png overlay size with ffmpeg ?
17 septembre 2021, par Nazarii KahaniakI have a png overlay over a video and I am trying to add zoom animation after 10 seconds of the video, so that image takes the whole video size. I have tried to use zoompan for that but I it resized image instantly without any animation. How to smoothly change overlay size with ffmpeg ?


inputs :


'-i', cameraVideoPath,
'-i', overlayPath,



command :


nullsrc=size=$cameraVideoSize [base]; 
[0:v] setpts=PTS-STARTPTS, scale=$cameraVideoSize [p1];
[1:v] scale=640:300,setsar=1/1,zoompan=z='if(gte(in,250),min(pzoom+0.005,10),1)':d=1:s=1920x900,trim=duration=1[overlay];
[base][p1] overlay=shortest=1 [v1];
[v1][overlay]overlay=0:(H-h)



-
How to animate video overlay pbg size with ffmpeg ?
17 septembre 2021, par Nazarii KahaniakI have a png overlay over a video and I am trying to add zoom animation after 10 seconds of the video, so that image takes the whole video size. I have tried to use zoompan for that but I it resized image instantly without any animation. How to smoothly change overlay size with ffmpeg ?


inputs :


'-i', cameraVideoPath,
'-i', overlayPath,



command :


nullsrc=size=$cameraVideoSize [base]; 
[0:v] setpts=PTS-STARTPTS, scale=$cameraVideoSize [p1];
[1:v] scale=640:300,setsar=1/1,zoompan=z='if(gte(in,250),min(pzoom+0.005,10),1)':d=1:s=1920x900,trim=duration=1[overlay];
[base][p1] overlay=shortest=1 [v1];
[v1][overlay]overlay=0:(H-h)



-
How to make FuncAnimation animations faster ?
12 juin 2021, par ZenitsuThe code I have written is for a Lorrenz Attractor in Python. It shows how a number of random points evolves according to lorrenz equtions and falls into the lorrenz attractor. I did get satisfactory results when I ran the code, but ran into problems while saving the animation as a gif or mp4 file. Python and my text editor started crashing when I tried saving them. I want to know if the code could be simplified or maybe made more effective in some way. Thankyou for helping !!


# Importing all the necessary modules

import matplotlib.pyplot as pl
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.animation import FuncAnimation
import matplotlib.animation as animation
import matplotlib.cm as cm
import numpy as np

#Writer = animation.writers['ffmpeg']
#writer = Writer(fps=15, metadata=dict(artist='Me'), bitrate=1800)

fig = pl.figure(figsize=(35,35))
ax = pl.axes(projection="3d") 
fig.set_facecolor('black')
ax.set_facecolor('black') 
ax.w_xaxis.pane.fill = False
ax.w_yaxis.pane.fill = False
ax.w_zaxis.pane.fill = False
ax.get_proj = lambda: np.dot(Axes3D.get_proj(ax), np.diag([2, 2, 2, 1.3]))
ax.grid(False)
ax.set_axis_off()

# B has the values of sigma, rho and beta used in the lorrenz equations
B =[10,28,8/3]
# t is the dt time element
t = 0.001
# The number of points 
num_points = 20

# These three list will store all the x, y and z position of all the points
X_data = []
Y_data = []
Z_data = []

for i in range(0,num_points,1):
 x_data = []
 y_data = []
 z_data = []
 x , y , z = np.random.uniform(-25,25),np.random.uniform(-25,30),np.random.uniform(0,60)
 for i in np.arange(0,10,t):

 dx = B[0]*(y-x)*t
 dy = (x*(B[1] - z)-y)*t
 dz = (x*y-B[2]*z)*t

 x+=dx
 y+=dy
 z+=dz

 x_data.append(x)
 y_data.append(y)
 z_data.append(z)
 X_data.append(x_data)
 Y_data.append(y_data)
 Z_data.append(z_data)

color = cm.rainbow(np.linspace(0,1,num_points))

def animate(i):
 pl.cla()

 for j in range(0,num_points,1):
 ax.set_axis_off()
 ax.plot3D(X_data[j][2*i:10*i],Y_data[j][2*i:10*i],Z_data[j][2*i:10*i],linewidth=0.5,color=color[j])
 ax.plot3D(X_data[j][10*i],Y_data[j][10*i],Z_data[j][10*i],marker=".",color=color[j],markersize=3)
 ax.set_xlim([-30,30])
 ax.set_ylim([-30,30])
 ax.set_zlim([0,60])

 ax.view_init(0,i/2) 

ani = FuncAnimation(fig,animate,repeat=False,interval=100,frames=600)

# Commented out the bottom part so that i can see it before saving

#ani.save('Lorrenz_Attractor.mp4', writer=writer)

#writer = animation.PillowWriter(fps=10) 
#ani.save("Lorrenz_Attractor.gif", writer=writer)

pl.show()