
Recherche avancée
Autres articles (38)
-
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 -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (9405)
-
Use animation.save with ffmpeg writer within a Python package
16 janvier 2021, par Logan YangI'm writing a Python package that produces some animated plots. I can successfully use
matplotlib.animation.save
to save gifs as such :

anim.save(f"./{file}", writer="imagemagick", fps=15)



But if I try to save it to
mp4
like this, it doesn't work because I guess it can't find ffmpeg on my system (MacOS)

anim.save(f"./{file}",writer=FFMpegWriter(fps=15))



Error :


MovieWriter stderr:
dyld: Library not loaded: /usr/local/opt/x265/lib/libx265.165.dylib
 Referenced from: /usr/local/bin/ffmpeg
 Reason: image not found
...



My intention is to make it platform agnostic, since it's a Python package I'm writing, I would like it to be portable so that the user can use it out-of-the-box with
pip install
. Since gif is already working withimagemagick
, I'm not sure how to make it work for ffmpeg writer.

I tried pip install ffmpeg in my project but that didn't work. Any suggestion is appreciated !


-
save matplotlib animation error
27 juillet 2017, par MattI created a program (see below) that takes position, force, and time from a pandas dataframe. The goal is to plot position vs force and animate it based on the time data associated with it.
The animation is working well so far but I cannot save the animation, either as a gif or mp4. I have read countless solutions online for this sort of problem but none seem to work.
I am using OS X El Capitan version 10.11.6 and python3.6. I used
brew install ffmpeg
andbrew install mencoder
. For both I get the errorFile "animation.py", line 73, in <module>
ani.save('test.mp4', writer=writer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/animation.py", line 1009, in save
for a in all_anim]):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/animation.py", line 1009, in <listcomp>
for a in all_anim]):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/animation.py", line 1482, in new_saved_frame_seq
return itertools.islice(self.new_frame_seq(), self.save_count)
ValueError: Stop argument for islice() must be None or an integer: 0 <= x <= sys.maxsize.
</listcomp></module>I used
pip
to install the rest of my packages so maybe that is the root of the problem ?import matplotlib.pyplot as plt
import matplotlib.animation as animation
import pandas
import sys
TABLE = pandas.read_csv("Data.csv")
fig = plt.figure()
ax1 = fig.add_subplot(1,1,1)
xs=[]
ys=[]
def animate(interval):
time = interval
#convert to TIME series to int for handling purposes
TABLE.TIME = TABLE.TIME.astype(int)
if time in TABLE.TIME.unique():
POSIT_series = TABLE[TABLE.TIME == time].POSIT
POSIT_list = POSIT_series.tolist()
x = POSIT_list[0]
FORCE_series = TABLE[TABLE.TIME == time].FORCE
FORCE_list = FORCE_series.tolist()
y = FORCE_list[0]
xs.append(x)
ys.append(y)
ax1.clear()
ax1.plot(xs,ys)
elif time > TABLE.TIME.max():
sys.exit("Animation Done")
return
FRAMES= TABLE.TIME.astype(int).max()
plt.rcParams['animation.ffmpeg_path']='/usr/local/bin/ffmpeg'
writer = animation.FFMpegWriter()
ani = animation.FuncAnimation(fig, animate, interval=1, frames=FRAMES, repeat=False)
plt.show()
#same error for writer = 'mencoder' and writer ='ffpmeg
ani.save('test.mp4', writer=writer) -
Is it possible to save an audio stream with pure JavaScript in the browser ?
8 juin 2016, par KonstantinI would like to make a webpage where visitors can save audio streams by clicking on links (not live streams, but links from a radio archive which uses streams), I want to do this without a server backend with pure JavaScript in the browser.
I read somewhere about the JavaScript port of FFMpeg, which can encode and save video / audio in the browser utilizing so called blobs. However download library is huge, as far as I remember 17 MB. In fact I would need only stream copying the audio streams, not a real encoding process.
I usually use similar commands to save a programme :ffmpeg -i http://stream.example.com/stream_20160518_0630.mp3 -c copy -t 3600 programme.mp3
I wonder, is it possible to compile a subset of FFMpeg into JavaScript which provides only the really needed stream copying ?