Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (48)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette 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.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (4582)

  • Opencv crosscompile with ffmpeg and other 3rdparty for arm board

    16 juin 2017, par Little Tooth

    After buliding Qt5.5.1 for my arm board sucessfully, I am taking up to crosscompile opencv. Here are the steps :

    First, I crosscompile 3rdparty :

    a.libz

    lmk@lmk-virtual-machine:/home/newdisk$ sudo tar -zvxf zlib-1.2.8.tar.gz
    lmk@lmk-virtual-machine:/home/newdisk$ cd zlib-1.2.8
    lmk@lmk-virtual-machine:/home/newdisk/zlib-1.2.8$ sudo ./configure --prefix=/home/newdisk/optnew/opencv-rely -shared
    lmk@lmk-virtual-machine:/home/newdisk/zlib-1.2.8$ sudo vi Makefile

    and etit Makefile in some details :

    #Makefile
    CC=/home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc
    LDSHARED= /home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
    AR=/home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-ar
    RANLIB=arm-linux-ranlib

    the last step is run make and make install :

    lmk@lmk-virtual-machine:/home/newdisk/zlib-1.2.8$ sudo make
    lmk@lmk-virtual-machine:/home/newdisk/zlib-1.2.8$ sudo make install

    b.libjpeg

    lmk@lmk-virtual-machine:/home/newdisk$ sudo tar -zvxf jpegsrc.v9.tar.gz
    lmk@lmk-virtual-machine:/home/newdisk$ cd jpeg-9
    lmk@lmk-virtual-machine:/home/newdisk/jpeg-9$ sudo CC=/home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc ./configure --host=arm-linux --prefix=/home/newdisk/optnew/opencv-rely --enable-shared --enable-static
    lmk@lmk-virtual-machine:/home/newdisk/jpeg-9$ sudo make
    lmk@lmk-virtual-machine:/home/newdisk/jpeg-9$ sudo make install

    c.libpng

    lmk@lmk-virtual-machine:/home/newdisk$ sudo xz -d libpng-1.6.29.tar.xz
    lmk@lmk-virtual-machine:/home/newdisk$ sudo tar -xvf libpng-1.6.29.tar
    lmk@lmk-virtual-machine:/home/newdisk$ cd libpng-1.6.29
    lmk@lmk-virtual-machine:/home/newdisk/libpng-1.6.29$ sudo CC=/home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc ./configure --host=arm-linux --prefix=/home/newdisk/optnew/opencv-rely --enable-shared --enable-static
    lmk@lmk-virtual-machine:/home/newdisk/libpng-1.6.29$ sudo make
    lmk@lmk-virtual-machine:/home/newdisk/libpng-1.6.29$ sudo make install

    d.yasm

    lmk@lmk-virtual-machine:/home/newdisk$ sudo tar -zvxf yasm-1.3.0.tar.gz
    lmk@lmk-virtual-machine:/home/newdisk$ cd yasm-1.3.0
    lmk@lmk-virtual-machine:/home/newdisk/yasm-1.3.0$ sudo CC=/home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc ./configure --prefix=/home/newdisk/optnew/opencv-rely --host=arm-linux
    lmk@lmk-virtual-machine:/home/newdisk/yasm-1.3.0$ sudo make
    lmk@lmk-virtual-machine:/home/newdisk/yasm-1.3.0$ sudo make install

    e.libx264

    lmk@lmk-virtual-machine:/home/newdisk$ sudo tar -jxvf last_x264.tar.bz2
    lmk@lmk-virtual-machine:/home/newdisk$ cd x264-snapshot-20170612-2245
    lmk@lmk-virtual-machine:/home/newdisk/x264-snapshot-20170612-2245$ sudo CC=/home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc ./configure --enable-shared --host=arm-linux --disable-asm --prefix=/home/newdisk/optnew/opencv-rely
    lmk@lmk-virtual-machine:/home/newdisk/x264-snapshot-20170612-2245$ sudo make
    lmk@lmk-virtual-machine:/home/newdisk/x264-snapshot-20170612-2245$ sudo make install

    f.libxvid

    lmk@lmk-virtual-machine:/home/newdisk$ cd xvidcore-1.3.3
    lmk@lmk-virtual-machine:/home/newdisk/xvidcore-1.3.3$ cd build/generic
    lmk@lmk-virtual-machine:/home/newdisk/xvidcore-1.3.3/build/generic$ sudo CC=/home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc ./configure --prefix=/home/newdisk/optnew/opencv-rely --host=arm-linux  --disable-assembly
    lmk@lmk-virtual-machine:/home/newdisk/xvidcore-1.3.3/build/generic$ sudo make
    lmk@lmk-virtual-machine:/home/newdisk/xvidcore-1.3.3/build/generic$ sudo make install

    g.ffmpeg

    lmk@lmk-virtual-machine:/home/newdisk$ sudo tar -jvxf ffmpeg-3.3.2.tar.bz2
    lmk@lmk-virtual-machine:/home/newdisk$ cd ffmpeg-3.3.2
    lmk@lmk-virtual-machine:/home/newdisk/ffmpeg-3.3.2$
    sudo ./configure --prefix=/home/newdisk/optnew/opencv-rely --enable-shared --disable-static --enable-gpl --enable-cross-compile  --arch=arm --disable-stripping --target-os=linux --enable-libx264 --enable-libxvid --cc=/home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc --enable-swscale --extra-ldflags=-L/home/newdisk/optnew/opencv-rely/lib --extra-cflags=-I/home/newdisk/optnew/opencv-rely/include
    lmk@lmk-virtual-machine:/home/newdisk/ffmpeg-3.3.2$ sudo make
    lmk@lmk-virtual-machine:/home/newdisk/ffmpeg-3.3.2$ sudo make install

    There is no problem in 3rdparty crosscompile.
    Next, opencv crosscompile :

    lmk@lmk-virtual-machine:/home/newdisk$ sudo unzip opencv-3.1.0.zip
    lmk@lmk-virtual-machine:/home/newdisk$ cd opencv-3.1.0
    lmk@lmk-virtual-machine:/home/newdisk/opencv-3.1.0$ sudo mkdir BuildOpencv
    lmk@lmk-virtual-machine:/home/newdisk/opencv-3.1.0$ cd BuildOpencv
    lmk@lmk-virtual-machine:/home/newdisk/opencv-3.1.0/BuildOpencv$ sudo vim toolchain.cmake
    #toolchain.cmake
    ###########user defined#############
    set( CMAKE_SYSTEM_NAME Linux )
    set( CMAKE_SYSTEM_PROCESSOR arm )
    set( CMAKE_C_COMPILER /home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc )
    set( CMAKE_CXX_COMPILER /home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-g++ )
    ###########user defined#############
    set( CMAKE_FIND_ROOT_PATH /home/newdisk/optnew/opencv-rely)
    set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
    set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
    set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
    ######################################

    Then I run cmake :

    lmk@lmk-virtual-machine:/home/newdisk/opencv-3.1.0/BuildOpencv$ sudo cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake ../

    Here is the result:

    -- Detected version of GNU GCC: 45 (405)
    -- Found ZLIB: /home/newdisk/optnew/opencv-rely/lib/libz.so (found suitable version "1.2.8", minimum required is "1.2.3")
    -- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR)
    -- Could NOT find Jasper (missing:  JASPER_LIBRARIES) (found version "1.900.1")
    -- Found ZLIB: /home/newdisk/optnew/opencv-rely/lib/libz.so (found version "1.2.8")
    -- checking for module 'gtk+-3.0'
    --   package 'gtk+-3.0' not found
    -- checking for module 'gstreamer-base-1.0'
    --   package 'gstreamer-base-1.0' not found
    -- checking for module 'gstreamer-video-1.0'
    --   package 'gstreamer-video-1.0' not found
    -- checking for module 'gstreamer-app-1.0'
    --   package 'gstreamer-app-1.0' not found
    -- checking for module 'gstreamer-riff-1.0'
    --   package 'gstreamer-riff-1.0' not found
    -- checking for module 'gstreamer-pbutils-1.0'
    --   package 'gstreamer-pbutils-1.0' not found
    -- checking for module 'gstreamer-base-0.10'
    --   package 'gstreamer-base-0.10' not found
    -- checking for module 'gstreamer-video-0.10'
    --   package 'gstreamer-video-0.10' not found
    -- checking for module 'gstreamer-app-0.10'
    --   package 'gstreamer-app-0.10' not found
    -- checking for module 'gstreamer-riff-0.10'
    --   package 'gstreamer-riff-0.10' not found
    -- checking for module 'gstreamer-pbutils-0.10'
    --   package 'gstreamer-pbutils-0.10' not found
    -- Looking for linux/videodev.h
    -- Looking for linux/videodev.h - found
    -- Looking for linux/videodev2.h
    -- Looking for linux/videodev2.h - found
    -- Looking for sys/videoio.h
    -- Looking for sys/videoio.h - not found
    -- checking for module 'libavresample'
    --   package 'libavresample' not found
    -- Looking for libavformat/avformat.h
    -- Looking for libavformat/avformat.h - not found
    -- Looking for ffmpeg/avformat.h
    -- Looking for ffmpeg/avformat.h - not found
    -- checking for module 'libgphoto2'
    --   package 'libgphoto2' not found
    -- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
    -- To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
    -- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.6", minimum required is "2.7")
    -- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES) (found suitable version "2.7.6", minimum required is "2.7")
    -- Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)
    -- If you want to enable Python/Numpy support, set the following variables:
    --   PYTHON2_INCLUDE_PATH
    --   PYTHON2_LIBRARIES
    --   PYTHON2_NUMPY_INCLUDE_DIRS
    --   PYTHON3_INCLUDE_PATH
    --   PYTHON3_LIBRARIES
    --   PYTHON3_NUMPY_INCLUDE_DIRS
    -- Found PythonInterp: /usr/bin/python3.4 (found suitable version "3.4.3", minimum required is "3.4")
    -- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES) (Required is at least version "3.4")
    -- Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)
    -- If you want to enable Python/Numpy support, set the following variables:
    --   PYTHON2_INCLUDE_PATH
    --   PYTHON2_LIBRARIES
    --   PYTHON2_NUMPY_INCLUDE_DIRS
    --   PYTHON3_INCLUDE_PATH
    --   PYTHON3_LIBRARIES
    --   PYTHON3_NUMPY_INCLUDE_DIRS
    -- Could NOT find JNI (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
    -- Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
    --
    -- General configuration for OpenCV 3.1.0
    =====================================
    --   Version control:               unknown
    --
    --   Platform:
    --     Host:                        Linux 3.16.0-77-generic i686
    --     Target:                      Linux arm
    --     CMake:                       2.8.12.2
    --     CMake generator:             Unix Makefiles
    --     CMake build tool:            /usr/bin/make
    --     Configuration:               Release
    --
    --   C/C++:
    --     Built as dynamic libs?:      YES
    --     C++ Compiler:                /home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-g++  (ver 4.5.1)
    --     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
    --     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    --     C Compiler:                  /home/newdisk/optnew/opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc
    --     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
    --     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
    --     Linker flags (Release):      
    --     Linker flags (Debug):        
    --     Precompiled headers:         YES
    --     Extra dependencies:          /home/newdisk/optnew/opencv-rely/lib/libjpeg.so /home/newdisk/optnew/opencv-rely/lib/libpng.so /home/newdisk/optnew/opencv-rely/lib/libz.so gtk-x11-2.0 gdk-x11-2.0 atk-1.0 gio-2.0 pangoft2-1.0 pangocairo-1.0 gdk_pixbuf-2.0 cairo pango-1.0 fontconfig gobject-2.0 freetype gthread-2.0 glib-2.0 dc1394 v4l1 v4l2 avcodec avformat avutil swscale dl m pthread rt
    --     3rdparty dependencies:       libwebp libtiff libjasper IlmImf
    --
    --   OpenCV modules:
    --     To be built:                 core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d stitching videostab
    --     Disabled:                    world
    --     Disabled by dependency:      -
    --     Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz
    --
    --   GUI:
    --     QT:                          NO
    --     GTK+ 2.x:                    YES (ver 2.24.23)
    --     GThread :                    YES (ver 2.40.2)
    --     GtkGlExt:                    NO
    --     OpenGL support:              NO
    --     VTK support:                 NO
    --
    --   Media I/O:
    --     ZLib:                        /home/newdisk/optnew/opencv-rely/lib/libz.so (ver 1.2.8)
    --     JPEG:                        /home/newdisk/optnew/opencv-rely/lib/libjpeg.so (ver 90)
    --     WEBP:                        build (ver 0.3.1)
    --     PNG:                         /home/newdisk/optnew/opencv-rely/lib/libpng.so (ver 1.6.29)
    --     TIFF:                        build (ver 42 - 4.0.2)
    --     JPEG 2000:                   build (ver 1.900.1)
    --     OpenEXR:                     build (ver 1.7.1)
    --     GDAL:                        NO
    --
    --   Video I/O:
    --     DC1394 1.x:                  NO
    --     DC1394 2.x:                  YES (ver 2.2.1)
    --     FFMPEG:                      YES
    --       codec:                     YES (ver 54.35.1)
    --       format:                    YES (ver 54.20.4)
    --       util:                      YES (ver 52.3.0)
    --       swscale:                   YES (ver 2.1.1)
    --       resample:                  NO
    --       gentoo-style:              YES
    --     GStreamer:                   NO
    --     OpenNI:                      NO
    --     OpenNI PrimeSensor Modules:  NO
    --     OpenNI2:                     NO
    --     PvAPI:                       NO
    --     GigEVisionSDK:               NO
    --     UniCap:                      NO
    --     UniCap ucil:                 NO
    --     V4L/V4L2:                    Using libv4l1 (ver 0.8.8) / libv4l2 (ver 0.8.8)
    --     XIMEA:                       NO
    --     Xine:                        NO
    --     gPhoto2:                     NO
    --
    --   Parallel framework:            pthreads
    --
    --   Other third-party libraries:
    --     Use IPP:                     NO
    --     Use VA:                      NO
    --     Use Intel VA-API/OpenCL:     NO
    --     Use Eigen:                   NO
    --     Use Cuda:                    NO
    --     Use OpenCL:                  YES
    --     Use custom HAL:              NO
    --
    --   OpenCL:
    --     Version:                     dynamic
    --     Include path:                /home/newdisk/opencv-3.1.0/3rdparty/include/opencl/1.2
    --     Use AMDFFT:                  NO
    --      Use AMDBLAS:                 NO
    --
    --   Python 2:
    --     Interpreter:                 /usr/bin/python2.7 (ver 2.7.6)
    --
    --   Python 3:
    --     Interpreter:                 /usr/bin/python3.4 (ver 3.4.3)
    --
    --   Python (for build):            /usr/bin/python2.7
    --
    --   Java:
    --     ant:                         NO
    --     JNI:                         NO
    --     Java wrappers:               NO
    --     Java tests:                  NO
    --
    --   Matlab:                        Matlab not found or implicitly disabled
    --
    --   Documentation:
    --     Doxygen:                     NO
    --     PlantUML:                    NO
    --
    --   Tests and samples:
    --     Tests:                       YES
    --     Performance tests:           YES
    --     C/C++ Examples:              NO
    --
    --   Install path:                  /home/newdisk/opencv-3.1.0/BuildOpencv/install
    --
    --   cvconfig.h is in:              /home/newdisk/opencv-3.1.0/BuildOpencv
    -- -----------------------------------------------------------------
    --
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/newdisk/opencv-3.1.0/BuildOpencv
    </filepath>

    After configuring and generating, run cmake-gui :

    lmk@lmk-virtual-machine:/home/newdisk/opencv-3.1.0/BuildOpencv$ sudo cmake-gui

    Src:/home/newdisk/opencv-3.1.0
    Build:/home/newdisk/opencv-3.1.0/BuildOpencv

    CMAKE_INSTALL_PREFIX:/home/newdisk/optnew/opencv-arm

    Don't choose these items:
    WITH_CUDA
    WITH_GTK
    WITH_1394
    WITH_GSTREAMER
    WITH_LIBV4L
    WITH_TIFF
    BUILD_OPENEXR
    WITH_OPENEXR
    WITH_OPENCL

    Configure and generate.

    lmk@lmk-virtual-machine:/home/newdisk/opencv-3.1.0/BuildOpencv$ sudo vi CMakeCache.txt
    #CMakeCache.txt
    //Flags used by the linker.
    CMAKE_EXE_LINKER_FLAGS:STRING=-lpthread -lrt

    lmk@lmk-virtual-machine:/home/newdisk/opencv-3.1.0/BuildOpencv$ sudo make

    Fianlly,I got these errors :

    [ 27%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_mjpeg_decoder.cpp.o
    [ 27%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_v4l.cpp.o
    [ 27%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o
    In file included from /home/newdisk/opencv-3.1.0/modules/videoio/src/cap_ffmpeg_impl.hpp:65:0,
                from /home/newdisk/opencv-3.1.0/modules/videoio/src/cap_ffmpeg.cpp:45:
    /home/newdisk/opencv-3.1.0/modules/videoio/src/ffmpeg_codecs.hpp:77:36: fatal error: libavformat/avformat.h: No such file or directory
    compilation terminated.
    make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
    make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
    make: *** [all] Error 2

    While the file libavformat/avformat.h does exits in my directory
    /home/newdisk/optnew/opencv-rely/include

    Why can cmake find lib directory

    -- Found ZLIB: /home/newdisk/optnew/opencv-rely/lib/libz.so (found suitable version "1.2.8", minimum required is "1.2.3")

    but cannot find include directory ?

    /home/newdisk/optnew/opencv-rely/include

    Do you have any idea ?

  • Can't save matplotlib animation (ffmpeg)

    25 mai 2014, par renger

    I am trying to get a simple animation saved using ffmpeg. I followed a tutorial to install ffmpeg, and I can now access it from the command prompt.

    Now I run this piece of code :

    import numpy as np
    from matplotlib import pyplot as plt
    from matplotlib import animation

    fig = plt.figure()
    ax = plt.axes(xlim=(0, 2), ylim=(-2, 2))
    line, = ax.plot([], [], lw=2)

    def init():
       line.set_data([], [])
       return line,

    def animate(i):
       x = np.linspace(0, 2, 1000)
       y = np.sin(2 * np.pi * (x - 0.01 * i))
       line.set_data(x, y)
       return line,

    anim = animation.FuncAnimation(fig, animate, init_func=init,
                                  frames=200, interval=20, blit=True)

    mywriter = animation.FFMpegWriter()
    anim.save('mymovie.mp4',writer=mywriter)

    plt.show()

    I get this error :

    Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
      File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 523, in runfile
       execfile(filename, namespace)
     File "C:\Users\Renger\.xy\startups\b.py", line 23, in <module>
       anim.save('mymovie.mp4',writer=mywriter)
     File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 609, in save
       with writer.saving(self._fig, filename, dpi):
     File "C:\Python27\lib\contextlib.py", line 17, in __enter__
       return self.gen.next()
     File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 166, in saving
       self.setup(*args)
     File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 156, in setup
       self._run()
     File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 183, in _run
       stdin=subprocess.PIPE)
     File "C:\Python27\lib\subprocess.py", line 711, in __init__
       errread, errwrite)
     File "C:\Python27\lib\subprocess.py", line 948, in _execute_child
       startupinfo)
    WindowsError: [Error 2] Het systeem kan het opgegeven bestand niet vinden
    </module></module></stdin>

    The last dutch sentence does mean something like : The system can’t find the specified file.

    What do these errors mean, and how can I solve them ?

    Best,

  • AVI video streaming over internet with FFMPAG/AVCONV or NGINX RTMP servers

    20 mai 2014, par Emmanuel Brunet

    I’ve got a general question regarding video streaming, FFMPEG/AVCONV and RTMP.

    I’ve read a lot of posts since several days to find out how to stream video over internet. But no answer fit my needs. I found examples with.mp4 to web/flv conversion .. and so on but none that works withe AVI real time video streaming.

    I need a straightforward example to put this in place.

    How to set up AVI video streaming over internet with much browser compatibility as possible using ffmpeg/avconv on debian / ubuntu and if possible the NGINX RTMP server ?

    I’ve set up an NGINX-1.70 server on debian (but could use another one), added the RTMP module configured with only the basic examples and I’d like to use FFMPEG (avconf) to convert AVI videos on the fly and make them available for streaming over internet (in a format that can be displayed by a wide range of browsers).

    Up to now, I understand that I need to setup a streaming server (ffmpeg/avconv server ?) or NGINX (my favorite), to convert videos on the fly with a bunch of horrible ffmpeg options and connect the output stream to the streaming server. That’s all ... still a long way to go to work out what I’m expecting !

    How can I do that ?

    Thanks for your help