Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (11)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (3408)

  • Rails ActionController::Live - Sends everything at once instead of async

    28 janvier 2016, par Michael B

    I have an issue with rails ActionController::Live

    In the end I want to show the progress of FFMPEG to the user, but for now I want to get this minimal example running :

    Rails media_controller.rb :

    class MediaController < ApplicationController
     include ActionController::Live

     def stream
       puts "stream function loaded"

         response.headers['Content-Type'] = 'text/event-stream'
         i = 0
         begin
           response.stream.write "data: 1\n\n"
           sleep 0.5
           i += 1
           puts "response... data: " + i.to_s
         end while i < 10
       response.stream.close
     end
    end

    Javascript :

    source = new EventSource("/test/0");
    source.addEventListener("message", function(response) {
     // Do something with response.data
     console.log('I have received a response from the server: ' + response);
    }, false);

    When I navigate to the site, there are no JavaScript Errors showing. As soon as I navigate to the site, the "stream"-Action of the MediaController gets successfully called. I can verify this, by looking at the Server-Console. It gives me the following output. After every response line, there is a 500ms delay, like expected :

    stream function loaded
    response... data: 1
    response... data: 2
    response... data: 3
    response... data: 4
    response... data: 5
    response... data: 6
    response... data: 7
    response... data: 8
    response... data: 9
    response... data: 10
    Completed 200 OK in 5005ms (ActiveRecord: 0.8ms)

    On the JavaScript Side, it gives me the following Output :

    (10x) I have received a response from the server: [object MessageEvent]

    But the problem is here, that it sends all these 10 Messages from the server after 5 seconds at the same time ! The expected behavior however is, that it should send me 1 message every 0.5 seconds !

    So what am I doing wrong here ? Where is the error ?

    Screenshot Rails Console / JavaScript Console

  • Ode to the Gravis Ultrasound

    1er août 2011, par Multimedia Mike — General

    WARNING : This post is a bunch of nostalgia. Feel free to follow along if you recall the DOS days of the early-mid 1990s.

    I finally let go of my Gravis Ultrasound MAX sound card a little while ago. It felt like the end of an era for me, even though I had scarcely used the card in recent memory.



    The Beginning
    What is the Gravis Ultrasound ? Only the finest PC sound card from the classic DOS days. Back in the day (very early 1990s), most consumer PC sound cards were Yamaha OPL FM synthesizers paired with a basic digital to analog converter (DAC). Gravis, a company known for game controllers, dared to break with the dominant paradigm of Sound Blaster clones and create a sound card that had 32 digital channels.

    I heard about the GUS sometime in 1992 through one of the dominant online services at the time, Prodigy. Through the message boards, I learned of a promotion with Electronic Arts in which customers could pre-order a GUS at a certain discount along with 2 EA games from a selected catalog (with progressive discounts when ordering more games from the list). I know I got the DOS version of PowerMonger ; I think the other was Night Shift, though that doesn’t seem to be an EA title.

    Anyway, 1992 saw many maddening delays of the GUS hardware. Finally, reports of GUS shipments began to trickle into the Prodigy message forums. Then one day in November, 1992, mine arrived. Into the 286 machine it went and a valiant attempt at software installation was made. A friend and I fought with the software late into the evening, trying to make this thing work reasonably. I remember grabbing a pair of old headphones sitting near the computer that were used for an ancient (even for the time) portable radio. That was the only means of sound reproduction we had available at that moment. And it still sounded incredible.

    After graduating to progressively superior headphones, I would later return to that original pair only to feel my ears were being physically assaulted. Strange, they sounded fine that first night I was trying to make the GUS work. I guess this was my first understanding that the degree to which one is a snobby audiophile is all a matter of hard-earned experience.

    Technology
    The GUS was powered by something called a GF1 which was supposed to use a technology called wavetable synthesis. In the early days, I thought (and I wasn’t alone in this) that this meant that the GF1 chip had a bunch of digitized instrument samples stored in the ASIC. That wasn’t it.

    However, it did feature 32 digital channels at a time when most PC audio cards had 2 (plus that Yamaha FM synthesizer). There was some hemming and hawing about how the original GUS couldn’t drive all 32 channels at a full 44.1 kHz ("CD quality") playback rate. It’s true— if 14 channels were enabled, all could be played at 44.1 kHz. Enabling more channels started progressive degradation and with all 32 channels, each was only playing at around 19 kHz. Still, from my emerging game programmer perspective, that allowed for 8-channel tracker music and 6 channels of sound effects, all at the vaunted CD level of quality.

    Games and Compatibility
    The primary reason to have a discrete sound card was for entertainment applications — ahem, games. GUS support was pretty sketchy out of the gate (ostensibly a major reason for the card’s delay). While many sound cards offered Sound Blaster emulation by basically having the same hardware as Sound Blaster cards, the GUS took a software route towards emulating the SB. To do this required a program called the Sound Blaster Operating System, or SBOS.

    Oh, how awesome it was to hear the program exclaim "SBOS installed !" And how harshly it grated on your nerves after the 200th time hearing it due to so many reboots and fiddling with options to make your games work. Also, I’ve always wondered if there’s something special about sampling an ’s’ sound — does it strain the sampling frequency range ? Perhaps the phrase was sampled at too low a bitrate because the ’s’ sounds didn’t come through very clearly, which is something you notice after hundreds of iterations when there are 3 ’s’ sounds in the phrase.

    Fortunately, SBOS became less relevant with the advent of Mega-Em, a separate emulator which intercepted calls to Roland MIDI systems and routed them to the very capable GUS. Roland-supporting games sounded beautiful.

    Eventually, more and more DOS games were released with native Gravis support, sometimes with the help of The Miles Sound System (from our friends at Rad Game Tools — you know, the people behind Smacker and Bink). The library changelog is quite the trip down PC memory lane.

    An important area where the GUS shined brightly was that of demos and music trackers. The emerging PC demo scene embraced the powerful GUS (aided, no doubt, by Gravis’ sponsorship of the community) and the coolest computer art and music of the time natively supported the card.

    Programming
    At this point in my life, I was a budding programmer in high school and was fairly intent on programming video games. So far, I had figured out how to make a few blips using a borrowed Sound Blaster card. I went to great lengths to learn how to program the Gravis Ultrasound.

    Oh you kids today, with your easy access to information at the tips of your fingers thanks to Google and the broader internet. I had to track down whatever information I could find through a combination of Prodigy message boards and local dialup BBSes and FidoNet message bases. Gravis was initially tight-lipped about programming information for its powerful card, as was de rigueur of hardware companies (something that largely persists to this day). But Gravis eventually saw an opportunity to one-up encumbent Creative Labs and released a full SDK for the Ultrasound. I wanted the SDK badly.

    So it was early-mid 1993. Gravis released an SDK. I heard that it was available on their support BBS. Their BBS with a long distance phone number. If memory serves, the SDK was only in the neighborhood of 1.5 Mbytes. That takes a long time to transfer via a 2400 baud modem at a time when long distance phone charges were still a thing and not insubstantial.

    Luckily, they also put the SDK on something called an ’FTP site’. Fortunately, about this time, I had the opportunity to get some internet access via the local university.

    Indeed, my entire motivation for initially wanting to get on the internet was to obtain special programming information. Is that nerdy enough for you ?

    I see that the GUS SDK is still available via the Gravis FTP site. The file GUSDK222.ZIP is dated 1998 and is less than a megabyte.

    Next Generation : CD Support
    So I had my original GUS by the end of 1992. That was just the first iteration of the Gravis Ultrasound. The next generation was the GUS MAX. When I was ready to get into the CD-ROM era, this was what I wanted in my computer. This is because the GUS MAX had CD-ROM support. This is odd to think about now when all optical drives have SATA interfaces and (P)ATA interfaces before that— what did CD-ROM compatibility mean back then ? I wasn’t quite sure. But in early 1995, I headed over to Computer City (R.I.P.) and bought a new GUS MAX and Sony double-speed CD-ROM drive to install in the family’s PC.



    About the "CD-ROM compatibility" : It seems that there were numerous competing interfaces in the early days of CD-ROM technology. The GUS MAX simply integrated 3 different CD-ROM controllers onto the audio card. This was superfluous to me since the Sony drive came with an appropriate controller card anyway, though I didn’t figure out that the extra controller card was unnecessary until after I installed it. No matter ; computers of the day were rife with expansion ports.



    The 3 different CD-ROM controllers on the GUS MAX

    Explaining The Difference
    It was difficult to explain the difference in quality to those who didn’t really care. Sometime during 1995, I picked up a quasi-promotional CD-ROM called "The Gravis Ultrasound Experience" from Babbage’s computer store (remember when that was a thing ?). As most PC software had been distributed on floppy discs up until this point, this CD-ROM was an embarrassment of riches. Tons of game demos, scene demos, tracker music, and all the latest GUS drivers and support software.

    Further, the CD-ROM had a number of red book CD audio tracks that illustrated the difference between Sound Blaster cards and the GUS. I remember loaning this to a tech-savvy coworker who disbelieved how awesome the GUS was. The coworker took it home, listened to it, and wholly agreed that the GUS audio sounded better than the SB audio in the comparison — and was thoroughly confused because she was hearing this audio emanating from her Sound Blaster. It was the difference between real-time and pre-rendered audio, I suppose, but I failed to convey that message. I imagine the same issue comes up even today regarding real-time video rendering vs., e.g., a pre-rendered HD cinematic posted on YouTube.

    Regrettably, I can’t find that CD-ROM anymore which leads me to believe that the coworker never gave it back. Too bad, because it was quite the treasure trove.

    Aftermath
    According to folklore I’ve heard, Gravis couldn’t keep up as the world changed to Windows and failed to deliver decent drivers. Indeed, I remember trying to keep my GUS in service under Windows 95 well into 1998 but eventually relented and installed some kind of more appropriate sound card that was better supported under Windows.

    Of course, audio output capability has been standard issue for any PC for at least 10 years and many people aren’t even aware that discrete sound cards still exist. Real-time audio rendering has become less essential as full musical tracks can be composed and compressed into PCM format and delivered with the near limitless space afforded by optical storage.

    A few years ago, it was easy to pick up old GUS cards on eBay for cheap. As of this writing, there are only a few and they’re pricy (but perhaps not selling). Maybe I was just viewing during the trough of no value a few years ago.

    Nowadays, of course, anyone interested in studying the old GUS or getting a nostalgia fix need only boot up the always-excellent DOSBox emulator which provides remarkable GUS emulation support.

  • 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 ?