
Recherche avancée
Autres articles (50)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
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 (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (7569)
-
ValueError : I/O operation on closed file with ffmpeg
22 mars 2018, par AstroCodaI’m trying to get this (minimal working example) code to compile in a virtual environment on Anaconda which I’ve set up in a supercomputing cluster :
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.animation as manimation
FFMpegWriter = manimation.writers['ffmpeg']
metadata = dict(title='Movie Test', artist='Matplotlib',
comment='Movie support!')
writer = FFMpegWriter(fps=15, metadata=metadata)
fig = plt.figure()
l, = plt.plot([], [], 'k-o')
plt.xlim(-5, 5)
plt.ylim(-5, 5)
x0, y0 = 0, 0
with writer.saving(fig, "writer_test.mp4", 100):
for i in range(100):
x0 += 0.1 * np.random.randn()
y0 += 0.1 * np.random.randn()
l.set_data(x0, y0)
writer.grab_frame()The thing is, this code works absolutely fine on my local machine (MacOSX) - Anaconda distribution ; Python 2.7 ; same matplotlib and numpy version, and I have ffmpeg on Anaconda ; I have ffmpeg on the cluster as well, albeit at a different version to the one on Python (but no issue with this on my local machine). When I run the code on the cluster, I get :
Traceback (most recent call last):
File "movie_test.py", line 25, in <module>
writer.grab_frame()
File "~/anaconda2/envs/test_movie/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 241, in saving
self.finish()
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 367, in finish
self.cleanup()
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 405, in cleanup
out, err = self._proc.communicate()
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 927, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1713, in _communicate
orig_timeout)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1769, in _communicate_with_poll
register_and_append(self.stdout, select_POLLIN_POLLPRI)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1748, in register_and_append
poller.register(file_obj.fileno(), eventmask)
ValueError: I/O operation on closed file
</module>All the searches I’ve made correspond to relatively simple text write in/out operations, but not for videos. Thanks in advance for the help !
-
fftools/ffmpeg : add thread-aware transcode scheduling infrastructure
18 mai 2023, par Anton Khirnovfftools/ffmpeg : add thread-aware transcode scheduling infrastructure
See the comment block at the top of fftools/ffmpeg_sched.h for more
details on what this scheduler is for.This commit adds the scheduling code itself, along with minimal
integration with the rest of the program :
* allocating and freeing the scheduler
* passing it throughout the call stack in order to register the
individual components (demuxers/decoders/filtergraphs/encoders/muxers)
with the schedulerThe scheduler is not actually used as of this commit, so it should not
result in any change in behavior. That will change in future commits.- [DH] fftools/Makefile
- [DH] fftools/ffmpeg.c
- [DH] fftools/ffmpeg.h
- [DH] fftools/ffmpeg_dec.c
- [DH] fftools/ffmpeg_demux.c
- [DH] fftools/ffmpeg_enc.c
- [DH] fftools/ffmpeg_filter.c
- [DH] fftools/ffmpeg_mux.c
- [DH] fftools/ffmpeg_mux.h
- [DH] fftools/ffmpeg_mux_init.c
- [DH] fftools/ffmpeg_opt.c
- [DH] fftools/ffmpeg_sched.c
- [DH] fftools/ffmpeg_sched.h
-
OpenCV VideoWriter will not open
21 février 2015, par ChrisCI’m having trouble instantiating and opening an OpenCV
VideoWriter
for recording video on a Raspberry Pi (Raspbian Weezy).My project is written in C++, but I’ve written a minimal Python program that demonstrates the problem.
https://gist.github.com/chriscollins/11ff2f43852e1c93dae8
Both my C++ code and the Python code above run without problem on my Windows machine. Sometimes the writer does not open, but that’s to be expected - I don’t have all of the listed codecs installed (the list of codecs comes from the Open CV source), but a good number of them work correctly. However, on a Raspberry Pi, both the C++ code and the Python code fail with the
VideoWriter
never being opened. In the above Python code,writer.isOpened()
returns false for every single codec, when run on a Raspberry Pi.I’ve
chown
ed the destination directory to the user I’m running the Python script as, andchmod
ded it to777
so I don’t believe that it is a permissions problem. I think it may be connected with how I’ve installed OpenCV or some of its dependencies, but I’m not sure how to rectify it.The install process I’ve used is as follows :
-
Update firmware/packages via
rpi-update
,apt-get update
andapt-get upgrade
. -
Install the following dependencies via
apt-get
:libjpeg8
libjpeg8-dev
libjpeg8-dbg
libjpeg-progs
ffmpeg
libavcodec-dev
libavcodec53
libavformat53
libavformat-dev
libgstreamer0.10-0-dbg
libgstreamer0.10-0
libgstreamer0.10-dev
libxine1-ffmpeg
libxine-dev
libxine1-bin
libunicap2
libunicap2-dev
swig
libv4l-0
libv4l-dev
python-numpy
libpython2.6
python-dev
python2.6-dev
libgtk2.0-dev -
Download and unzip http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip to
/root/opencv-2.4.9
. -
cd /root/opencv-2.4.9
and runcmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_gpu=OFF -DBUILD_opencv_ocl=OFF
. Output of cmake is available at https://gist.github.com/chriscollins/d8060e03a6acd6d4336c -
make
andmake install
from the same directory.
Various other OpenCV functionality works correctly on the Raspberry Pi (in C++ or in Python) - e.g. viewing a webcam via
VideoCapture
, but I can’t get theVideoWriter
to work. I’m tempted to try installing FFMPEG from source instead of viaapt-get
, but asmake
takes 5+ hours to run on a Raspberry Pi, I was hoping I’d find the answer here, rather than proceeding with a trial and error approach !Any advice on how to solve (or debug) this is appreciated.
EDIT : Added output of cmake command (https://gist.github.com/chriscollins/d8060e03a6acd6d4336c)
-