Menu

Video IO on Ubuntu 9.04 with Matlab r2009a

Help
2009-04-30
2013-02-21
1 2 > >> (Page 1 of 2)
  • Schrodingerscat

    Schrodingerscat - 2009-04-30

    Hi Yall,
    Ive been using the videoIO toolbox for a while with Ubuntu 8.10 and was delighted with it.
    However, when I installed the new Ubuntu 9.04 for my AMD64bit machine, I couldnt get it working again.

    I have performed the following steps:

    1. When i just copied over the old videoIO toolbox from the old installation, I got the following error when I tried to run it: 

    ??? Error using ==> videoReader_ffmpegPopen2
    EOF found while trying to read the communication tag.  The server process probably died.  String so far: ""
    Function: int VideoIO::readMessageHeader(FILE*)
        File    : pipecomm.h
        Line    : 306

    Error in ==> videoReader.videoReader at 151
      vr.handle = feval(vr.plugin, 'open',vr.handle, ...

    Error in ==> mainVideo at 124
    videoIn = videoReader(inputName);

    2. I then  checked to make sure that I had the following installed from the repositories:

    ffmpeg, libavformat-dev,
    libavcodec-dev, libavutil-dev, and libswscale-dev packages

    3. I downloaded the newest version (nov 08) of videoIO, extracted it, and ran the following:
    buildVideoIO

    and got:

    >> buildVideoIO
    make MEXEXT=mexa64
    readlink: missing operand
    Try `readlink --help' for more information.
    make: execvp: ./ffmpeg-config-internal.pl: Permission denied
    make: execvp: ./mexext2arch.pl: Permission denied
    make: execvp: ./arch2gccarch.pl: Permission denied
    make: execvp: ./ffmpeg-config-internal.pl: Permission denied
    make: execvp: ./ffmpeg-config-internal.pl: Permission denied
    make: execvp: ./ffmpeg-config-internal.pl: Permission denied
    make: execvp: ./arch2gccarch.pl: Permission denied
    make: execvp: ./unique.pl: Permission denied
    make: execvp: ./unique.pl: Permission denied
    make: execvp: ./unique.pl: Permission denied
    /bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH= CXXFLAGS\#' -o echo.mexa64.o' echo.cpp
    make: /bin/mex: Command not found
    make: *** [echo.mexa64.o] Error 127
    ??? Error using ==> buildVideoIO at 83
    build failed.  Make sure you read and follow all instructions found in INSTALL.*.txt before attempting to build
    portions of the videoIO library.

    So I changed the permissions of the files using:
    # cd $VIDEOIO 
    # chmod u+x *.pl 

    and ran buildVideoIO again. This time I got the following error:

    >> buildVideoIO
    make MEXEXT=mexa64
    readlink: missing operand
    Try `readlink --help' for more information.
    make: execvp: ./ffmpeg-config-internal.pl: Permission denied
    make: execvp: ./mexext2arch.pl: Permission denied
    make: execvp: ./arch2gccarch.pl: Permission denied
    make: execvp: ./ffmpeg-config-internal.pl: Permission denied
    make: execvp: ./ffmpeg-config-internal.pl: Permission denied
    make: execvp: ./ffmpeg-config-internal.pl: Permission denied
    make: execvp: ./arch2gccarch.pl: Permission denied
    make: execvp: ./unique.pl: Permission denied
    make: execvp: ./unique.pl: Permission denied
    make: execvp: ./unique.pl: Permission denied
    /bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH= CXXFLAGS\#' -o echo.mexa64.o' echo.cpp
    make: /bin/mex: Command not found
    make: *** [echo.mexa64.o] Error 127
    ??? Error using ==> buildVideoIO at 83
    build failed.  Make sure you read and follow all instructions found in INSTALL.*.txt before attempting to build
    portions of the videoIO library.

    So I changed the permissions of all the files in the videoIO toolbox to 777, and I get this:

    >> buildVideoIO
    make MEXEXT=mexa64
    readlink: missing operand
    Try `readlink --help' for more information.
    Could not find ffmpeg's z library
    /bin/sh: cannot open arch: No such file
    /bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o mexClientPopen2.mexa64.o' mexClientPopen2.cpp
    make: /bin/mex: Command not found
    make: *** [mexClientPopen2.mexa64.o] Error 127
    ??? Error using ==> buildVideoIO at 83
    build failed.  Make sure you read and follow all instructions found in INSTALL.*.txt before attempting to build
    portions of the videoIO library.

    So im stumped. Does anybody know what I can try next?

     
    • Gerald Dalley

      Gerald Dalley - 2009-04-30

      It looks like matlab isn't in your path.  Try running

      readlink -f `which matlab`

      from the command line and reporting the results here.  If that fails, try running just "which matlab". 

      You can either add Matlab to your PATH environment variable or you can set the MATLAB_PATH environment variable before starting matlab.

       
    • Schrodingerscat

      Schrodingerscat - 2009-04-30

      Thanks for the prompt reply

      If i run
      readlink -f 'which matlab'

      in the Terminal i get:
      /home/misty/which matlab

      If i run
      which matlab

      i get nothing returned.

      Ive also tried re-installing Matlab hoping that it might repair the paths, and ive made sure that ive added the videoIO directory under "file-> set path -> add folder" but the same error returns:

      >> buildVideoIO
      make MEXEXT=mexa64
      readlink: missing operand
      Try `readlink --help' for more information.
      Could not find ffmpeg's z library
      /bin/sh: cannot open arch: No such file
      /bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o mexClientPopen2.mexa64.o' mexClientPopen2.cpp
      make: /bin/mex: Command not found
      make: *** [mexClientPopen2.mexa64.o] Error 127
      ??? Error using ==> buildVideoIO at 83
      build failed.  Make sure you read and follow all instructions found in INSTALL.*.txt before attempting to build
      portions of the videoIO library.

      Im sorry, im a n00b when it comes to this, but what do you mena by "You can either add Matlab to your PATH environment variable or you can set the MATLAB_PATH environment variable before starting matlab."?

      Thanks again!

       
    • Schrodingerscat

      Schrodingerscat - 2009-04-30

      Wahey! i was googling what you said, and i tried the following

      in Terminal i typed:
      PATH=$PATH:/home/misty/Programs/Matlab/bin

      then typing
      which matlab

      returned
      /home/misty/Programs/Matlab/bin/matlab

      Starting Matlab from the same terminal.....
      $matlab

      and runnning buildvideoIO...

      >> buildVideoIO
      make MEXEXT=mexa64
      Could not find ffmpeg's z library
      /bin/sh: cannot open arch: No such file
      /home/misty/Programs/Matlab/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o mexClientPopen2.mexa64.o' mexClientPopen2.cpp
      /home/misty/Programs/Matlab/bin/mex: 1577: g++: not found

      Warning: You are using gcc version "".  The earliest gcc version supported
               with mex is "4.1".  The latest version tested for use with mex is "4.2".
               To download a different version of gcc, visit http://gcc.gnu.org

      eval: 1: g++: not found

          mex: compile of ' "mexClientPopen2.cpp"' failed.

      make: *** [mexClientPopen2.mexa64.o] Error 1
      ??? Error using ==> buildVideoIO at 83
      build failed.  Make sure you read and follow all instructions found in INSTALL.*.txt before attempting to build
      portions of the videoIO library.

      So it worked, and im a good bit further. Il mess around now with the gcc files and report back if I get it working.

       
    • Schrodingerscat

      Schrodingerscat - 2009-04-30

      Right, I ran the commands

      # cd $MATLAB 
      # cd sys/os/glnx86 
      # mkdir old 
      # mv libstdc++.* libg2c.* libgcc_s* old 

      And restarted matlab, but got the same error:

      >> buildVideoIO
      make MEXEXT=mexa64 
      Could not find ffmpeg's z library
      /bin/sh: cannot open arch: No such file
      /home/misty/Programs/Matlab/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o mexClientPopen2.mexa64.o' mexClientPopen2.cpp
      /home/misty/Programs/Matlab/bin/mex: 1577: g++: not found

      Warning: You are using gcc version "". The earliest gcc version supported
      with mex is "4.1". The latest version tested for use with mex is "4.2".
      To download a different version of gcc, visit http://gcc.gnu.org 

      eval: 1: g++: not found

      mex: compile of ' "mexClientPopen2.cpp"' failed.

      make: *** [mexClientPopen2.mexa64.o] Error 1
      ??? Error using ==> buildVideoIO at 83
      build failed. Make sure you read and follow all instructions found in INSTALL.*.txt before attempting to build
      portions of the videoIO library.

      So I went to synaptic and checked if g++ was installed. it wasnt, so I installed it. Now I get a bit further with:

      >> buildVideoIO
      make MEXEXT=mexa64
      Could not find ffmpeg's z library
      /bin/sh: cannot open arch: No such file
      /home/misty/Programs/Matlab/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o mexClientPopen2.mexa64.o' mexClientPopen2.cpp

      Warning: You are using gcc version "4.3.3-5ubuntu4)".  The earliest gcc version supported
               with mex is "4.1".  The latest version tested for use with mex is "4.2".
               To download a different version of gcc, visit http://gcc.gnu.org

      In file included from mexClientPopen2.cpp:46:
      matarray.h:246: error: expected initializer before ‘<’ token
      matarray.h:253: error: expected initializer before ‘<’ token
      mexClientPopen2.cpp:321: error: expected `}' at end of input
      matarray.h:191: warning: inline function ‘void VideoIO::MatArray::freeData()’ used but never defined
      matarray.h:185: warning: inline function ‘size_t VideoIO::MatArray::numElm() const’ used but never defined

          mex: compile of ' "mexClientPopen2.cpp"' failed.

      make: *** [mexClientPopen2.mexa64.o] Error 1
      ??? Error using ==> buildVideoIO at 83
      build failed.  Make sure you read and follow all instructions found in INSTALL.*.txt before attempting to build
      portions of the videoIO library.

      Il keep ye updated.

       
    • Schrodingerscat

      Schrodingerscat - 2009-04-30

      Hmm, now im stuck again. Any ideas?

       
      • Gerald Dalley

        Gerald Dalley - 2009-04-30

        Make sure you have the g++ compiler installed:

        sudo apt-get install g++

         
    • peitschie

      peitschie - 2009-04-30

      Hi mistyfolan,

      Check out the guide I wrote for installing under Ubuntu: http://apps.sourceforge.net/trac/videoio/wiki/CompileOnUbuntu

      It should still be relevant for 9.04... I just haven't tried it yet.  One key issue you have is that you are using the wrong compiler version, hence complaints about:

      "Warning: You are using gcc version "". The earliest gcc version supported 
      with mex is "4.1". The latest version tested for use with mex is "4.2". 
      To download a different version of gcc, visit http://gcc.gnu.org  "

      The installation instructions on the trac show you an easy way to get around that.

       
    • Schrodingerscat

      Schrodingerscat - 2009-05-01

      Heya, thanks for the replies peitschie and Gerald, I didnt know about the wiki, and it very usefull. However, been a n00b, im still getting issues:
      ************************************************************
      misty@misty:~$     ffmpeg -v
      FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
        configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --enable-shared --disable-static
        libavutil     49.15. 0 / 49.15. 0
        libavcodec    52.20. 0 / 52.20. 0
        libavformat   52.31. 0 / 52.31. 0
        libavdevice   52. 1. 0 / 52. 1. 0
        libavfilter    0. 4. 0 /  0. 4. 0
        libswscale     0. 7. 1 /  0. 7. 1
        libpostproc   51. 2. 0 / 51. 2. 0
        built on Apr 10 2009 23:20:33, gcc: 4.3.3
      ffmpeg: missing argument for option '-v'
      *************************************************************

      *************************************************************
      misty@misty:~$ mex -v
      -> mexopts.sh sourced from directory (DIR = $MATLAB/bin)
         FILE = /home/misty/Programs/Matlab/bin/mexopts.sh
      ----------------------------------------------------------------
      ->    MATLAB                = /home/misty/Programs/Matlab
      ->    CC                    = gcc
      ->    CC flags:
               CFLAGS             = -ansi -D_GNU_SOURCE  -fexceptions -fPIC -fno-omit-frame-pointer -pthread
               CDEBUGFLAGS        = -g
               COPTIMFLAGS        = -O -DNDEBUG
               CLIBS              = -Wl,-rpath-link,/home/misty/Programs/Matlab/bin/glnxa64 -L/home/misty/Programs/Matlab/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++
               arguments          =  -DMX_COMPAT_32
      ->    CXX                   = g++
      ->    CXX flags:
               CXXFLAGS           = -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread
               CXXDEBUGFLAGS      = -g
               CXXOPTIMFLAGS      = -O -DNDEBUG
               CXXLIBS            = -Wl,-rpath-link,/home/misty/Programs/Matlab/bin/glnxa64 -L/home/misty/Programs/Matlab/bin/glnxa64 -lmx -lmex -lmat -lm
               arguments          =  -DMX_COMPAT_32
      ->    FC                    = g95
      ->    FC flags:
               FFLAGS             = -fexceptions -fPIC -fno-omit-frame-pointer
               FDEBUGFLAGS        = -g
               FOPTIMFLAGS        = -O
               FLIBS              = -Wl,-rpath-link,/home/misty/Programs/Matlab/bin/glnxa64 -L/home/misty/Programs/Matlab/bin/glnxa64 -lmx -lmex -lmat -lm
               arguments          =  -DMX_COMPAT_32
      ->    LD                    = gcc
      ->    Link flags:
               LDFLAGS            = -pthread -shared -Wl,--version-script,/home/misty/Programs/Matlab/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined
               LDDEBUGFLAGS       = -g
               LDOPTIMFLAGS       = -O
               LDEXTENSION        = .mexa64
               arguments          =
      ->    LDCXX                 =
      ->    Link flags:
               LDCXXFLAGS         =
               LDCXXDEBUGFLAGS    =
               LDCXXOPTIMFLAGS    =
               LDCXXEXTENSION     =
               arguments          =
      ----------------------------------------------------------------

          mex:  no file name given.

          Usage:
            MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
                [objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]

          or (to build an Ada S-function):
            MEX [-v] [-g] -ada <sfcn>.ads

          Use the -help option for more information, or consult the MATLAB External Interfaces Guide.

      misty@misty:~$
      ************************************************************

      ***********************************************************
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$ mkdir cc_bin
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$ cd cc_bin
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source/cc_bin$ ln -s /usr/bin/cpp-4.1 cpp
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source/cc_bin$ ln -s /usr/bin/gcc-4.1 gcc
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source/cc_bin$ ln -s /usr/bin/g++-4.1 g++
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source/cc_bin$ cd ..
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$ export PATH=cc_bin:$PATH
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$ gcc -v
      Using built-in specs.
      Target: x86_64-linux-gnu
      Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-checking=release x86_64-linux-gnu
      Thread model: posix
      gcc version 4.1.3 20080623 (prerelease) (Ubuntu 4.1.2-24ubuntu1)
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$
      ******************************************************************

      *****************************************************************
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$ make
      make: execvp: ./ffmpeg-config-internal.pl: Permission denied
      make: execvp: ./mexext2arch.pl: Permission denied
      make: execvp: ./arch2gccarch.pl: Permission denied
      make: execvp: ./ffmpeg-config-internal.pl: Permission denied
      make: execvp: ./ffmpeg-config-internal.pl: Permission denied
      make: execvp: ./ffmpeg-config-internal.pl: Permission denied
      make: execvp: ./arch2gccarch.pl: Permission denied
      make: execvp: ./unique.pl: Permission denied
      make: execvp: ./unique.pl: Permission denied
      make: execvp: ./unique.pl: Permission denied
      /home/misty/Programs/Matlab/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH= CXXFLAGS\#' -o echo.mexa64.o' echo.cpp
      /home/misty/Programs/Matlab/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH= CXXFLAGS\#' -o mexClientDirect.mexa64.o'  mexClientDirect.cpp
      /home/misty/Programs/Matlab/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH= CXXFLAGS\#' -o debug.mexa64.o' debug.cpp
      /home/misty/Programs/Matlab/bin/mex -cxx CC=g++ CXX=g++ LD=g++ ARCH= CXXFLAGS\#'' echo.mexa64.o mexClientDirect.mexa64.o debug.mexa64.o -output echoDirect.mexa64
      /usr/bin/ld: echo.mexa64.o: relocation R_X86_64_32S against `vtable for VideoIO::VrRecoverableException' can not be used when making a shared object; recompile with -fPIC
      echo.mexa64.o: could not read symbols: Bad value
      collect2: ld returned 1 exit status

          mex: link of ' "echoDirect.mexa64"' failed.

      make: *** [echoDirect.mexa64] Error 1
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$ cd ..
      misty@misty:~/Programs/Matlab/toolbox$ cd videoIO-r720-source/
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$ chmod u+x *.pl
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$ make
      Could not find ffmpeg's z library
      /bin/sh: cannot open arch: No such file
      /home/misty/Programs/Matlab/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o mexClientPopen2.mexa64.o' mexClientPopen2.cpp
      /home/misty/Programs/Matlab/bin/mex -c CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m64 -o popen2.mexa64.o' popen2.cpp
      /home/misty/Programs/Matlab/bin/mex -cxx CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -fPIC -m64' mexClientPopen2.mexa64.o debug.mexa64.o popen2.mexa64.o -output echoPopen2.mexa64
      /usr/bin/ld: debug.mexa64.o: relocation R_X86_64_32S against `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' can not be used when making a shared object; recompile with -fPIC
      debug.mexa64.o: could not read symbols: Bad value
      collect2: ld returned 1 exit status

          mex: link of ' "echoPopen2.mexa64"' failed.

      make: *** [echoPopen2.mexa64] Error 1
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$
      *************************************************************************************

      ****************************************************************************************
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$ cd ..
      misty@misty:~/Programs/Matlab/toolbox$ cd ..
      misty@misty:~/Programs/Matlab$ cd os
      bash: cd: os: No such file or directory
      misty@misty:~/Programs/Matlab$ cd sys
      misty@misty:~/Programs/Matlab/sys$ cd os
      misty@misty:~/Programs/Matlab/sys/os$ ls
      glnxa64
      misty@misty:~/Programs/Matlab/sys/os$ cd glnxa64/
      misty@misty:~/Programs/Matlab/sys/os/glnxa64$ ls
      libgcc_s.so.1         libifcore.so.5  libintlc.so.5       libXm.so.3
      libgfortran.so.2      libifport.so    libirc.so           libXm.so.3.0.1
      libgfortran.so.2.0.0  libifport.so.5  libstdc++.so.6      libXm.so.3.0.2
      libiberty.so          libimf.so       libstdc++.so.6.0.9  README.libiberty
      libifcore.so          libintlc.so     libsvml.so          README.libstdc++
      misty@misty:~/Programs/Matlab/sys/os/glnxa64$ mkdir old 
      misty@misty:~/Programs/Matlab/sys/os/glnxa64$ mv libstdc++.* libg2c.* libgcc_s* old 
      mv: cannot stat `libg2c.*': No such file or directory
      misty@misty:~/Programs/Matlab/sys/os/glnxa64$

      **************************************************************************
      I went to compile it again using make, but got the same error.

      ************************************************************************
      misty@misty:~/Programs/Matlab/toolbox/videoIO-r720-source$ make
      Could not find ffmpeg's z library
      /bin/sh: cannot open arch: No such file
      /home/misty/Programs/Matlab/bin/mex -cxx CC=g++ CXX=g++ LD=g++ ARCH=glnxa64 CXXFLAGS\#'-O2 -g -fPIC -m64' mexClientPopen2.mexa64.o debug.mexa64.o popen2.mexa64.o -output echoPopen2.mexa64
      /usr/bin/ld: debug.mexa64.o: relocation R_X86_64_32S against `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' can not be used when making a shared object; recompile with -fPIC
      debug.mexa64.o: could not read symbols: Bad value
      collect2: ld returned 1 exit status

          mex: link of ' "echoPopen2.mexa64"' failed.

      make: *** [echoPopen2.mexa64] Error 1

      *************************************************************************

      So thats the stage that Im at now. Apologies for the long-winded post, i just wanted to post all the outpt in case I was missing something. I know that the ffmpef version im using is 0.5, and this can cause some issues. Would I need to try and compile the ffmpeg-0.4.9-pre1 version? Or is the issue with mex somehow?

      Thanks for your patience,

       
      • Stepfen

        Stepfen - 2009-05-01

        Hello all,
        I'm a n00b too, but just in case you find any of the following interesting: I can confirm that I was getting similar errors when I tried to compile videoIO in ubuntu 9.04. In particular I remember very well the"Could not find ffmpeg's z library" and "/bin/sh: cannot open arch: No such file". But, I can't recall the rest of the errors :S

        Downloading ffmpeg from the svn solved these issues.
        To do this you have to:
        - Make sure you have svn installed. If you don't, you can get it with something like:
        $sudo apt-get install svn

        - Download the latest svn version of ffmpeg using:
        $ svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
        $ cd ffmpeg

        - Then, you have to tell ffmpeg which options/codecs to enable.
        It's up to you to enable the codecs you need. Try
        $ ./configure --help
        to get a list of what's available. Then use something like:

        $ ./configure --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-nonfree

        -Then you can install ffmpeg with:
        $ make
        $ sudo make install

        Right now in my case, this approach doesn't work either, but I need to find some time to double check things, before I report it here.

        It might worth giving it a try yourself.

        Regards and good luck

         
    • Stepfen

      Stepfen - 2009-05-01

      I just remembered something else that might help you.

      dalleyg has done some changes to address some issues related to ffmpeg 0.5 a month ago or so. These changes are only available from the latest svn version of videoIO (725). To get it, you need to do something like:

      svn checkout https://videoio.svn.sourceforge.net/svnroot/videoio videoio

      Good luck

       
    • peitschie

      peitschie - 2009-05-02

      Hi mistyfolan,

      emmdarakis is very correct.  Part of the problem is that you are attempting to compile using FFmpeg 0.5, and videoIO rev720 only compiles with up to FFmpeg 0.49 I believe.   So you'll need to get the svn checkout of the latest revision as emmdarakis has pointed out.  Make sure you also have the development packages installed using a command like: sudo apt-get install ffmpeg libavcodec-dev libavformat-dev libswscale-dev libavutil-dev (you may have already done this).

      I'll test this out on my 9.04 Ubuntu build tonight sometime and update the wiki guide with any improvements/changes required.

      That reminds me, emmdarakis, are you upgrading, or have you upgraded to 9.04 yet?  It's officially released now... :-D

      So yer.  I'll try this on my 9.04 build tonight and get back to you with any changes required, and a step by step guide.

       
    • peitschie

      peitschie - 2009-05-04

      Hi everyone,

      I've updated the wiki to include install instructions for Ubuntu 9.04 .  See https://apps.sourceforge.net/trac/videoio/wiki/CompileOnUbuntu

      Specifically, there are some extra libraries that need to be installed under 9.04 for the compilation to work.  emmdarakis and mistyfolan, this will hopefully clear up all your problems.  Please note, this is using all in-built Ubuntu packages, so unless you have a specific need to compile your own ffmpeg or other libraries, I'd recommend sticking with what Ubuntu ships with.

      dalleyg, when can we expect an officially released version of videoIO that supports ffmpeg 0.5?  Currently I have the wiki page instructing users to download from the subversion repo, which is probably not ideal :-)

       
      • Gerald Dalley

        Gerald Dalley - 2009-05-04

        Making a new release sounds like a wise idea.  It'll be a few weeks before I have a chance to do so (my impending thesis defense takes priority here).

         
    • peitschie

      peitschie - 2009-05-04

      Also, dalleyg, I've noticed that the install instructions may help with some of the install problems listed in the mathworks exchange comments.  It might be useful to link to the page a little more obviously from there.  I would do it myself, but I dont really use MATLAB enough at the moment to justify the pain in signing up :-)

       
      • Gerald Dalley

        Gerald Dalley - 2009-05-04

        Good suggestion.  Post-defense, I'll plan on posting a new version at MatlabCentral when I create the ffmpeg 0.5-compatible release here.

         
    • peitschie

      peitschie - 2009-05-04

      Indeed... post-defence is very understandable :-).  Thanks again for all the work you put into this...  It certainly has made my life a lot easier than it otherwise would have been!

       
      • Gerald Dalley

        Gerald Dalley - 2009-05-04

        It's my pleasure.  I figured that if I need to write it for my own work, I may as well go to the small extra work to share it (or maybe not so small, in retrospect). 

        BTW, I just got an email from MathWorks and they're changing their licensing policy.  Starting in a few weeks, all new uploads will be required to use the BSD license.   While most of videoIO is released under the MIT license (which is basically the same as the BSD one), at least parts of ffmpeg are full-GPL, which AFAIK imposes GPL restrictions on videoIO.  So, I've updated the MatlabCentral page to point people here.  The upside is there's now less need to keep the two sites in sync.

         
        • peitschie

          peitschie - 2009-05-04

          Uggh.  I hate it when hosting sites start dictating licensing terms.  This sounds like a political or commercialization move to me (under BSD they can then repackage the better plugins and sell them...).

          But yes, your reading is right.  The GPL'ed code in some of the plugins will make videoIO GPL.  You could possibly work around this by not using the plugins... but seeing how you distribute the code I suspect that isn't a large concern :-).

           
    • Stepfen

      Stepfen - 2009-05-05

      Hello there,

      First a small detail. The link to peitschie's very nice wiki is:

      http://apps.sourceforge.net/trac/videoio/wiki/CompileOnUbuntu

      (https:// as you had it won't work at least for people who don't want to log-in in sourceforge)

      Secondly, peitschie asked what distro I'm using now. I upgraded to Jaunty a week ago or so. Since then, I lost videoIO :(
      But, thanks to you guys, it's getting there again :)

      Now I followed peitschie's updated instructions and when I try to compile videoIO, after several other lines I get:

      g++ -O2 -g -I. -fPIC -D__STDC_CONSTANT_MACROS -m32 mexServerStdio.glnx86.o videoReaderWrapper.glnx86.o FfmpegIVideo.glnx86.o FfmpegCommon.glnx86.o registry.glnx86.o debug.glnx86.o -L/usr/local/lib32 -L/usr/lib32 -L/usr/local/lib -L/usr/lib -lavformat -lavcodec -lavutil -lswscale -lz -ldl -lm -lgsm -lpthread -lspeex -ltheora -lvorbisenc -lvorbis -lc -Wl,-rpath=/usr/local/lib32:/usr/lib32:/usr/local/lib:/usr/lib  -o videoReader_ffmpegPopen2Server
      /usr/local/lib/liboil-0.3.so.0: undefined reference to `clock_gettime'
      collect2: ld returned 1 exit status

      Let me know if you need the previous output lines too. I checked to make sure that liboil0.3 and liboil0.3-dev are installed.

      Any suggestions this time?

      Thanks a lot

       
      • peitschie

        peitschie - 2009-05-05

        Hi emmdarakis,

        Are you using the built-in ffmpeg or your own compiled version still?

        Can you post the output of ffmpeg -v?

        Glad things are progressing again :-)

         
    • Stepfen

      Stepfen - 2009-05-05

      There it is:

      $ ffmpeg -v
      FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
        configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-neon --disable-altivec --disable-vis --enable-shared --disable-static
        libavutil     49.15. 0 / 49.15. 0
        libavcodec    52.20. 0 / 52.20. 0
        libavformat   52.31. 0 / 52.31. 0
        libavdevice   52. 1. 0 / 52. 1. 0
        libavfilter    0. 4. 0 /  0. 4. 0
        libswscale     0. 7. 1 /  0. 7. 1
        libpostproc   51. 2. 0 / 51. 2. 0
        built on Apr 10 2009 23:18:41, gcc: 4.3.3
      ffmpeg: missing argument for option '-v'

      Thanks

       
      • peitschie

        peitschie - 2009-05-05

        It looks like another program has installed liboil.  The normal location is in /usr/lib/liboil-0.3.so.0... you'll notice that yours is in /usr/local/lib, which is where programs that you compile will often install.

        Have you compiled gstreamer or similar?  What is the output of: apt-cache policy liboil0.3  ?

         
    • Stepfen

      Stepfen - 2009-05-06

      Hi there,

      Indeed that was the problem. Removing liboil from /usr/local/lib solved it. Now videoIO compiles without errors.

      It is still unusable (I get "EOF found while trying to read the communication tag" in more or less everything I try to do) but I'm working on it.

      Thanks and regards

       
      • peitschie

        peitschie - 2009-05-06

        Just out of interest, did you do a 'make clean' on the videoIO directory before you continued compiling?  Otherwise you might have part of the code linked against the wrong liboil version still...

         
1 2 > >> (Page 1 of 2)

Log in to post a comment.