Recherche avancée

Médias (0)

Mot : - Tags -/flash

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (27)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Changer son thème graphique

    22 février 2011, par

    Le 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 (...)

Sur d’autres sites (5012)

  • Python ImageIO : Too many open files

    24 août 2017, par orbv12

    I am using imageio in python in order to open all video files in a directory and convert them to numpy arrays.

    Here is the script I am using :

     1 from __future__ import print_function
     2 from avi_to_numpy import *
     3 from os import listdir
     4 import numpy as np
     5 import imageio
     6      
     7 class_path = '../Diving/'
     8 max_frames = 16
     9 stride = 8
    10 videos = [vid for vid in listdir(class_path)]
    11 train = []
    12
    13 for vid in videos:
    14     print(str.format('Loading {}...', vid), end="")
    15     filename = class_path + vid
    16     reader = imageio.get_reader(filename, 'ffmpeg')
    17     frames = []
    18    
    19     for i, im in enumerate(reader):
    20         if len(frames) == max_frames:
    21             break
    22        
    23         if i % stride == 0:
    24             frames.append(im)
    25    
    26     reader.close()
    27     train.append(np.array(frames))
    28     print('done')        
    29
    30
    31 print(len(train))

    Eventually this script crashes with the following error output :

    Traceback (most recent call last):
     File "load_class_test.py", line 16, in <module>
       reader = imageio.get_reader(filename, 'ffmpeg')
     File "/usr/local/lib/python2.7/site-packages/imageio/core/functions.py", line 111, in get_reader
       return format.get_reader(request)
     File "/usr/local/lib/python2.7/site-packages/imageio/core/format.py", line 158, in get_reader
       return self.Reader(self, request)
     File "/usr/local/lib/python2.7/site-packages/imageio/core/format.py", line 207, in __init__
       self._open(**self.request.kwargs.copy())
     File "/usr/local/lib/python2.7/site-packages/imageio/plugins/ffmpeg.py", line 260, in _open
       self._initialize()
     File "/usr/local/lib/python2.7/site-packages/imageio/plugins/ffmpeg.py", line 326, in _initialize
       stdout=sp.PIPE, stderr=sp.PIPE)
     File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
       errread, errwrite)
     File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1223, in _execute_child
       errpipe_read, errpipe_write = self.pipe_cloexec()
     File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1175, in pipe_cloexec
       r, w = os.pipe()
    OSError: [Errno 24] Too many open files
    </module>

    I am closing the Reader object from imageio. It seems as if the files opened by ffmpeg are not being closed properly.

    Is there an obvious step I am missing here ? Am I closing the files properly ?

    EDIT : Found temporary solution. Opened a new issue on github.

    I was able to resolve the issue by uncommenting the following lines of code from ’imageio/plugins/ffmpeg.py’ :

    381         def _close_streams(self):
    382             for std in (self._proc.stdin,
    383                         self._proc.stdout,
    384                         self._proc.stderr):
    385                 try:
    386                     std.close()
    387                 except Exception:  # pragma: no cover
    388                     pass

    I then added a call to the above function in _close(self) :

    271         def _close(self):
    272             self._terminate(0.05)  # Short timeout
    273             self._close_streams()
    274             self._proc = None

    I am not sure what the side effects of doing this are, but it provides a solution for me.

    Here is the link to the issue : https://github.com/imageio/imageio/issues/145

  • OpenCV-C++ VideoCapture fails to open video files

    9 août 2017, par Akihiko

    Recently I upgraded my OS from Ubuntu Precise Saucy (13.10) to Trusty (14.04). After this upgrade, cv::VideoCapture became not working properly. The program aborts when reading a video file. For example,

    int main(int argc, char**argv)
    {
     cv::VideoCapture vin("sample/vout2l.avi");
    ...

    Executing this program, it aborts with a message :

    *** Error in `./cv2-videoread.out': malloc(): memory corruption: 0x0000000000e3eff0 ***
    Abort (core dumped)

    The backtrace looks like :

    [New LWP 15586]
    [New LWP 15587]
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    Core was generated by `./cv2-videoread.out'.
    Program terminated with signal SIGABRT, Aborted.
    #0  0x00007ff953e61c37 in raise () from /lib/x86_64-linux-gnu/libc.so.6
    (gdb) bt
    #0  0x00007ff953e61c37 in raise () from /lib/x86_64-linux-gnu/libc.so.6
    #1  0x00007ff953e65028 in abort () from /lib/x86_64-linux-gnu/libc.so.6
    #2  0x00007ff953e9e2a4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
    #3  0x00007ff953eabe26 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
    #4  0x00007ff953eac1ab in ?? () from /lib/x86_64-linux-gnu/libc.so.6
    #5  0x00007ff953eadba4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
    #6  0x00007ff953eaf7d2 in posix_memalign () from /lib/x86_64-linux-gnu/libc.so.6
    #7  0x00007ff94fa640fe in av_malloc () from /usr/lib/x86_64-linux-gnu/libavutil.so.52
    #8  0x00007ff94fa641b1 in av_strdup () from /usr/lib/x86_64-linux-gnu/libavutil.so.52
    #9  0x00007ff94fa5e5db in av_dict_set ()
     from /usr/lib/x86_64-linux-gnu/libavutil.so.52
    #10 0x00007ff954738574 in CvCapture_FFMPEG::open(char const*) ()
     from /usr/lib/libopencv_highgui.so.2.4
    #11 0x00007ff954738719 in cvCreateFileCapture_FFMPEG ()
     from /usr/lib/libopencv_highgui.so.2.4
    #12 0x00007ff95473aac9 in cvCreateFileCapture_FFMPEG_proxy(char const*) ()
     from /usr/lib/libopencv_highgui.so.2.4
    ---Type <return> to continue, or q <return> to quit---
    #13 0x00007ff954722d89 in cvCreateFileCapture ()
     from /usr/lib/libopencv_highgui.so.2.4
    #14 0x00007ff954723045 in cv::VideoCapture::open(std::string const&amp;) ()
     from /usr/lib/libopencv_highgui.so.2.4
    #15 0x00007ff95472315c in cv::VideoCapture::VideoCapture(std::string const&amp;) ()
     from /usr/lib/libopencv_highgui.so.2.4
    #16 0x0000000000401281 in main (argc=1, argv=0x7fff1f938388) at cv2-videoread.cpp:30
    (gdb)
    </return></return>

    NOTE : cv::VideoCapture vin(... is 30th line.

    Before upgrading the OS, this code was working with the same input file.

    From the backtrace, it seems that the trouble happens at CvCapture_FFMPEG and libavutil. I upgraded the packages ffmpeg libavutil-dev libavutil51 libavutil52 but they were already up-to-date.
    Also, OpenCV packages are up-to-date (I checked libopencv-core-dev libopencv-core2.4 libopencv-dev libopencv-highgui-dev libopencv-highgui2.4).

    I also tested OpenCV built from source, but got the same results.

    Do you have ideas to figure this out ?

  • rmdec : add missing brackets to compound statement

    25 juillet 2017, par Sean McGovern
    rmdec : add missing brackets to compound statement
    

    Accidentally left out of 95ce02b35d3d1bb16111031df1d82a6e4d894d36.

    • [DBH] libavformat/rmdec.c