
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (52)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (7244)
-
ValueError : I/O operation on closed file when making animation
3 juillet 2018, par user3851187I am using matplotlib and ffmpeg to do some animations. I usually code on a remote server because the code runs faster ; we are having some issues making animations on the remote server. Here is an example of code that works perfectly on my local mac but does not work remotely.
import matplotlib as mpl
mpl.use('agg')
import matplotlib as mpl
from matplotlib import animation
import pylab
def init():
pylab.plot(pylab.arange(10), [0]*10)
def redraw(frame):
pylab.plot(pylab.arange(10), pylab.arange(10) * frame)
fig = pylab.figure()
ani = animation.FuncAnimation(fig, redraw, frames=10, interval=1000, init_func=init)
ani.save('animation.mp4')I get the animation I want on my local machine (macOS Sierra). When I run it on the remote host (Debian GNU/Linux 8 (jessie)), I get the following error message after 5 frames
Traceback (most recent call last):
File "animation.py", line 14, in <module>
ani.save('animation.mp4')
File "/usr/local/lib/python2.7/dist-packages/matplotlib/animation.py", line 1200, in save
writer.grab_frame(**savefig_kwargs)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/animation.py", line 241, in saving
self.finish()
File "/usr/local/lib/python2.7/dist-packages/matplotlib/animation.py", line 367, in finish
self.cleanup()
File "/usr/local/lib/python2.7/dist-packages/matplotlib/animation.py", line 405, in cleanup
out, err = self._proc.communicate()
File "/usr/local/lib/python2.7/dist-packages/subprocess32.py", line 724, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/usr/local/lib/python2.7/dist-packages/subprocess32.py", line 1535, in _communicate
orig_timeout)
File "/usr/local/lib/python2.7/dist-packages/subprocess32.py", line 1591, in _communicate_with_poll
register_and_append(self.stdout, select_POLLIN_POLLPRI)
File "/usr/local/lib/python2.7/dist-packages/subprocess32.py", line 1570, in register_and_append
poller.register(file_obj.fileno(), eventmask)
ValueError: I/O operation on closed file
</module>My local machine uses matplotlib version 2.0.0 ; the remote machine uses matplotlib version 2.2.2
On my local machine I have ffmpeg version 3.2.4
$ ffmpeg -version
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.4 --enable-shared -
-enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100On the remote host i have ffmpeg version 4.0.1
ffmpeg -version
ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10+deb8u1)
configuration: --prefix=/usr/local
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100If I recall correctly I installed ffmpeg locally through homebrew ; I have the anaconda distribution of python. On the remote machine we have the default version of python that comes with Jessie ; I’m not sure how the sysadmin installed ffmpeg.
I am by no means an expert on ffmpeg, but I have generally never had issues with making animations in matplotlib on my local machine and I would really like to be able to make videos more quickly on the remote machine. Any help would be appreciated !
Edit
On the remote machine, the animation works if I use avconv as the writer instead of ffmpeg. I installed avconv locally...which led me to get the same ffmpeg issues locally (probably due to updating shared dependencies). However, I uninstalled ffmpeg and reinstalled it with x264 codec enables Animations in ipython (jupyter) notebook - ValueError : I/O operation on closed file -
Getting error while converting on FFMPEG ? what's the meaning & how it should be fixed ?
12 août 2017, par asifI am using this code to apply watermark on linux server ;
-i input.mp4 logo.png -filter_complex 'overlay=main_w-overlay_w-10:main_h-overlay_h-10' output.mp4
so ended-up with this error ;
Please use -b:a or -b:v, -b is ambiguous
Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_overlay_0Full error ;
ffmpeg version N-71954-gbc6f84f Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
configuration: --prefix=/usr --enable-version3 --enable-gpl --enable-shared --
enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libvpx --
enable-libx264 --enable-libxvid --enable-libopencore-amrwb --enable-libopencore-
amrnb --enable-postproc --enable-nonfree --enable-pthreads --enable-x11grab --
enable-libfaac --enable-libopenjpeg --enable-zlib --disable-doc
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 37.101 / 56. 37.101
libavformat 56. 31.102 / 56. 31.102
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'uploaded/1502539665_21.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.31.102
enter code here
Duration: 00:02:27.32, start: 0.023220, bitrate: 635 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x320
[SAR 1:1 DAR 3:2], 476 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
enter code here
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 151 kb/s (default)
Metadata:
handler_name : SoundHandler
enter code here
Please use -b:a or -b:v, -b is ambiguous
Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_overlay_0 -
advanced ffmpeg compression control
18 juillet 2017, par Daniel MahlerI am using very aggressive video compression, eg
-crf 51
. I am using this for ’artistic’ effect, so what I am doing may not make sense from a normal video compression point of view.So far I have only been using very basic compression control using only the
-crf
or-b:v
flags. The results look like ffmpeg divides images into square patches and the makes smooth approximations within the patches. This gives 2 control dimensions to the process : the patch size and the aggressiveness of the smoothing within the patches.It have found that ffmpeg uses both parameters to some extent, but there appears to be an absolute maximum patch size in pixels beyond which it will not go regardless of the frame size.
After that it will only increase compression by reducing the detail within the patches.This is suboptimal for high resolution video, where this becomes equivalent to reducing the resolution. The problem is particularly noticeable on fractal like images which have large featureless region as well as regions of high detail.
How can I tell ffmpeg to increase the maximum patch size and retain more detail within the patches ?