
Recherche avancée
Médias (1)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (25)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...)
Sur d’autres sites (3730)
-
Superimpose audio track on plot animation
17 février 2023, par Antoine101I plot a matrix in a standard matplotlib figure with imshow. Each matrix is the result of a signal processing calculation on a time signal snapshot (0.2s). I plot each snapshot one after the other (the signal is several seconds long) in a loop and record the animation with FFMPegWriter, setting the FPS so that it matches real time. The output is an MP4 file.


Now, I'd like to add a soundtrack on top of it, of the time signal that was used to calculate the matrices.


How would you do that ? I scrolled a lot but didn't find any suitable solution.
Any idea of libraries or packages ?


Many thanks in advance.


-
Matplotlib use Ffmpeg to save plot to be mp4 not include full step
21 décembre 2020, par 昌翰余I use ffmpeg to store the dynamic graph drawn on matplotlib, but the output file is only 2 seconds
but It should have been 30 seconds.
I set a graph to run three curves, a total of 30 seconds of data,
the graph that ran on the py file is normal,
but the output is only the first two seconds of the output.
May I ask if I missed something


Below is my code


import matplotlib.pyplot as plt
from matplotlib import animation
from numpy import random 
import pandas as pd
from matplotlib.animation import FFMpegWriter

FFwriter=animation.FFMpegWriter(fps=30, extra_args=['-vcodec', 'libx264'])
data = pd.read_csv('apple1.csv', delimiter = ',', dtype = None)
data = data.values
AccX1=[]
AccY1=[]
AccZ1=[]
AccX2=[]
AccY2=[]
AccZ2=[]

time = []

for i in range(600):
 AccX1.append(data[i][8])
 AccY1.append(data[i][9])
 AccZ1.append(data[i][10])
 AccX2.append(data[i][24])
 AccY2.append(data[i][25])
 AccZ2.append(data[i][26])
 
 time.append(data[i][0])
 
fig = plt.figure()
ax1 = plt.axes(xlim=(0,3000), ylim=(6,-6))
line, = ax1.plot([], [], lw=2)
plt.xlabel('ACC')
plt.ylabel('Time')

plotlays, plotcols = [3], ["r","g","b"]
lines = []
for index in range(3):
 lobj = ax1.plot([],[],lw=2,color=plotcols[index])[0]
 lines.append(lobj)


def init():
 for line in lines:
 line.set_data([],[])
 return lines

x1,y1 = [],[]
x2,y2 = [],[]
x3,y3 = [],[]



i=0

def animate(frame):
 global i
 
 i+=1
 x = i
 y = AccX1[i]

 x1.append(x)
 y1.append(y)

 x = i
 y = AccY1[i]
 x2.append(x)
 y2.append(y)

 x = i
 y = AccZ1[i]
 x3.append(x)
 y3.append(y)
 

 xlist = [x1, x2,x3]
 ylist = [y1, y2,y3]


 for lnum,line in enumerate(lines):
 line.set_data(xlist[lnum], ylist[lnum]) 


 return lines


anim = animation.FuncAnimation(fig, animate,
 init_func=init, blit=True,interval=10)
anim.save('test.mp4',writer=FFwriter)
plt.show()



The dynamic picture ran out using plt.show is correct.
And I don't think I have set the length of storage. Did I add something ?


-
asf : export all the DRM stuff, some of it are human readable strings.
16 octobre 2011, par Michael Niedermayerasf : export all the DRM stuff, some of it are human readable strings.