
Recherche avancée
Médias (17)
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (17)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (3706)
-
Access files at the same time from different folders and save in third folder
5 avril 2019, par Manza AriI want to access files from two different folders process them and save the resultant file in third folder. I am making a video file from images belong to two different folders.
-
FFMPEG : Save extracted frames to temporarily in ssd then flush to hdd
2 février 2019, par Rishi KatariaI am trying to extract the frames from a video file. My HDD is slow and is acting as a bottleneck, so I wanted to save the frames to my SSD, and as it gets full, send those frames to my hard drive. so periodically flushing the frames to the hard drive. I was hoping there would be some solution for that.
This is what I am using now :
ffmpeg -y -hwaccel cuda -i vid.mkv %%d_frame.png
Cheers !
-
attempting to save FuncAnimation changes the animation
25 mars 2024, par pibionI am attempting to create and save an animation of a time-varying vector field using matplotlib's FuncAnimation. When I run the animation without attempting to save it, it updates smoothly as expected. However, when I try to save the animation, the vectors increase in length and the animation only appears to update a few times. I've been able to record the screen to get a video file, but I'd like to understand how to save the animation to a video in python.


Here is the code to create the vector field animation. I ran this in a local jupyter notebook using python 3.9.12 on Windows.


%matplotlib notebook
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation

x_min, x_max = -20, 20
y_min, y_max = 0, 25
wire_x = -4
wire_y = 17

# Define the vector field function (example: rotating vector field)
def vector_field(x, y, t):
 x = x - wire_x
 y = y - wire_y
 r = np.sin(t) / (x**2 + y**2)
 u = -r * y
 v = r * x
 return (u, v)

# Define grid
x = np.linspace(x_min, x_max, 20)
y = np.linspace(y_min, y_max, 20)
X, Y = np.meshgrid(x, y)

# Create animation
fig, ax = plt.subplots(1,1)
ax.set_aspect('equal')
ax.set_xlim(x_min, x_max)
ax.set_ylim(y_min, y_max)
ax.set_xlabel('X (m)')
ax.set_ylabel('Y (m)')

u, v = vector_field(X, Y, 1)

quiver = ax.quiver(X, Y, u, v)

time_arr = np.linspace(0,20,200)

plt.show()

def update_quiver(num):
 t = num * 0.1 # Time step
 u, v = vector_field(X, Y, t)
 quiver.set_UVC(u, v)

ani = animation.FuncAnimation(fig, update_quiver, frames=200, interval=50, repeat=False)



This produces an animation whose vectors smoothly vary in length on my computer.


However, when I try to save the animation by adding the lines


writervideo = animation.FFMpegWriter(fps=60) 
ani.save('field_leftWire.mp4', writer=writervideo) 



then the animation changes - the vectors are much longer and it appears to only update a few times throughout the animation.


I'll also note that I had to install ffmpeg and restart my computer as outlined in Installation of FFMPEG for Python in WIndows to get the last two lines to run without error.