
Recherche avancée
Autres articles (10)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Changer son thème graphique
22 février 2011, parLe thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
Modifier le thème graphique utilisé
Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
Il suffit ensuite de se rendre dans l’espace de configuration du (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (2256)
-
Generating movie from python without saving individual frames to files
8 avril 2015, par PaulI would like to create an h264 or divx movie from frames that I generate in a python script in matplotlib. There are about 100k frames in this movie.
In examples on the web [eg. 1], I have only seen the method of saving each frame as a png and then running mencoder or ffmpeg on these files. In my case, saving each frame is impractical. Is there a way to take a plot generated from matplotlib and pipe it directly to ffmpeg, generating no intermediate files ?
Programming with ffmpeg’s C-api is too difficult for me [eg. 2]. Also, I need an encoding that has good compression such as x264 as the movie file will otherwise be too large for a subsequent step. So it would be great to stick with mencoder/ffmpeg/x264.
Is there something that can be done with pipes [3] ?
[1] http://matplotlib.sourceforge.net/examples/animation/movie_demo.html
-
Permissions issue with Python and ffmpeg on a Mac
13 avril 2020, par EventHorizonI am fairly new to Python ( 4 weeks), and I have been struggling with this all day.



I am using MacOS 10.13, Python 3.7 via Anaconda Navigator 1.9.12 and Spyder 4.0.1.



Somehow (only a noob, remember) I had 2 Anaconda environments. I don't do production code, just research, so I figured I would make life simple and just use the base environment. I deleted the other environment.



I had previously got FFmpeg working and was able to do frame grabs, build mpeg animations, and convert them to gifs for blog posts and such. I had FFmpeg installed in the directories associated with the deleted environment, so it went away.



No worries, I got the git URL, used Terminal to install it in /opt/anaconda3/bin. It's all there and I can run FFmpeg from the Terminal.



My problem : When I attempt to run a module that previously worked fine, I get the following message :



[Errno 13] Permission denied : '/opt/anaconda3/bin/ffmpeg'



In my module I set the default location of FFmpeg : plt.rcParams['animation.ffmpeg_path'] = '/opt/anaconda3/bin/ffmpeg'



In my module I have the following lines :



writer = animation.FFMpegWriter(fps=frameRate, metadata=metadata)
writer.setup(fig, "animation.mp4", 100)




This calls matplotlib's 'animation.py', which runs the following :



def setup(self, fig, outfile, dpi=None):
 '''
 Perform setup for writing the movie file.

 Parameters
 ----------
 fig : `~matplotlib.figure.Figure`
 The figure object that contains the information for frames
 outfile : str
 The filename of the resulting movie file
 dpi : int, optional
 The DPI (or resolution) for the file. This controls the size
 in pixels of the resulting movie file. Default is fig.dpi.
 '''
 self.outfile = outfile
 self.fig = fig
 if dpi is None:
 dpi = self.fig.dpi
 self.dpi = dpi
 self._w, self._h = self._adjust_frame_size()

 # Run here so that grab_frame() can write the data to a pipe. This
 # eliminates the need for temp files.
 self._run()

def _run(self):
 # Uses subprocess to call the program for assembling frames into a
 # movie file. *args* returns the sequence of command line arguments
 # from a few configuration options.
 command = self._args()
 _log.info('MovieWriter.run: running command: %s', command)
 PIPE = subprocess.PIPE
 self._proc = subprocess.Popen(
 command, stdin=PIPE, stdout=PIPE, stderr=PIPE,
 creationflags=subprocess_creation_flags)




Everything works fine up to the last line (i.e. 'command' looks like a well-formatted FFmpeg command line, PIPE returns -1) but subprocess.Popen() bombs out with the error message above.



I have tried changing file permissions - taking a sledgehammer approach and setting everything in /opt/anaconda3/bin/ffmpeg to 777, read, write, and execute. But that doesn't seem to make any difference. I really am clueless when it comes to Apple's OS, file permissions, etc. Any suggestions ?


-
Generating movie from python without saving individual frames to files
31 juillet 2022, par PaulI would like to create an h264 or divx movie from frames that I generate in a python script in matplotlib. There are about 100k frames in this movie.



In examples on the web [eg. 1], I have only seen the method of saving each frame as a png and then running mencoder or ffmpeg on these files. In my case, saving each frame is impractical. Is there a way to take a plot generated from matplotlib and pipe it directly to ffmpeg, generating no intermediate files ?



Programming with ffmpeg's C-api is too difficult for me [eg. 2]. Also, I need an encoding that has good compression such as x264 as the movie file will otherwise be too large for a subsequent step. So it would be great to stick with mencoder/ffmpeg/x264.



Is there something that can be done with pipes [3] ?



[1] http://matplotlib.sourceforge.net/examples/animation/movie_demo.html



[2] How does one encode a series of images into H264 using the x264 C API ?



[3] http://www.ffmpeg.org/ffmpeg-doc.html#SEC41