
Recherche avancée
Autres articles (81)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (9523)
-
Continously read file in Ruby and save into pipe
7 juillet 2016, par stiller_leserI am trying to continously read a file and save the output into a
IO.pipe
. The motivation being that ffmpeg which has been spawned before and given the r-end of the pipe as STDIN will then convert the video.
This is what I have so far :r,w = IO.pipe
ffmpeg_args = ' -i pipe:0 "test.mp4"'
pid = Process.spawn('ffmpeg'+ffmpeg_args, {STDIN => r, STDERR => STDOUT})
Process.detach pid
File.open(@options['filename'], 'rb') do |file|
while line = file.gets
w.write line.read
end
endI had success with declaring the input file directly as STDIN for the process, but this lead to an early termination of ffmpeg since it had reached the end of the file. With the code above ffmpeg complains about invalid data.
Is there any way this could be achieved ?
-
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 ?
-
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)