Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hello, How is Motion Detection software interpreted, and who is responsible for the interpretation operation? Is motion.conf linked to a specific libraries? I'd be grateful If I get some help. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    14

    Lightbulb [SOLVED] Is Motion detection sw linked to libraries?


    Hello,
    How is Motion Detection software interpreted, and who is responsible for the interpretation operation?
    Is motion.conf linked to a specific libraries?

    I'd be grateful If I get some help.
    Thanks in advanced.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,397
    Huh? There is a Windows "Motion Detection" application, and there is motion detection software (more than one) for Linux. Please be more specific about the package you are referring to.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jan 2011
    Posts
    14

    Exclamation

    Sorry for my bad.
    OS: Linux
    The sw I am asking about is "motion" not motion detection.
    I install it using:
    Code:
    apt-get install motion
    I get conf. file + 4 thread.conf in etc/motion/, and It create a directory /tmp/motion, where the fetched pic.s are taken.
    I can change in the configuration file(motion.conf), But I don't know where is the source? and is there any libraries motion linked enable it to understand the conf. file?!

  4. #4
    Just Joined!
    Join Date
    Jan 2011
    Posts
    14

    Arrow

    I rescently found the source in the following link:
    ww.lavrsen.dk/foswiki/bin/view/Motion/DownloadFiles

    I un-tar it and got several headers file + .c files.
    I still don't know, How the OS interact with the command of the configuration file of motion.
    Is there a source file has been already installed, when I installed motion with the previous command!!
    I feel I miss-understand something!

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,397
    Ok. It is an open source project. From the man page:
    Code:
           More information
                  Motion homepage: http://motion.sourceforge.net/
    
                  Motion Guide (user and installation guide):
                  http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionGuide
                  http://www.lavrsen.dk/foswiki/bin/view/Motion/VideoFourLinuxLoopbackDevice
    
    AUTHORS
           Jeroen Vreeken (pe1rxq@amsat.org), Folkert van Heusden, Kenneth Lavrsen (kenneth@lavrsen.dk).
    In any case, it uses the video4linux drivers, monitors the image, and if it changes, captures it.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,397
    So anyway, what is your problem? If it doesn't work for you, make sure you have the video4linux drivers and libraries installed. Also, you might want to install ffmpeg as well.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Just Joined!
    Join Date
    Jan 2011
    Posts
    14
    It works out of box.
    I need to understand the mechanize of it's operation.
    I need to know exactly, what's happen in the interpretation operation of the configuration file. How the lines in configuration file be translated to make a actions.
    I want to know .. whats happen when I command
    Code:
    motion
    How is the configuration file as alone enough to manage everything. whether a source directory is installed somewhere, while I install
    Code:
    apt-get install motion
    and is linked with motion.conf
    If so, where is it!

  8. #8
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    You're install a binary package. It's already been compiled and linked to whatever libraries it needs.

    You can use the ldd command to see what libraries it's linked to.

    In most distros, dependencies are handled by the package manager, so when you use apt-get, anything required that is not already installed will get pulled in as well.

    Here's the shared libraries required by motion in the Arch linux package.

    Code:
    [reed@Arch-Desktop ~]$ ldd /usr/bin/motion
            linux-vdso.so.1 =>  (0x00007fff861ff000)
            libpthread.so.0 => /lib/libpthread.so.0 (0x00007fa93fa48000)
            libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007fa93f7fc000)
            libavformat.so.52 => /usr/lib/libavformat.so.52 (0x00007fa93f515000)
            libavcodec.so.52 => /usr/lib/libavcodec.so.52 (0x00007fa93e892000)
            libavutil.so.50 => /usr/lib/libavutil.so.50 (0x00007fa93e675000)
            libc.so.6 => /lib/libc.so.6 (0x00007fa93e317000)
            /lib/ld-linux-x86-64.so.2 (0x00007fa93fc65000)
            libm.so.6 => /lib/libm.so.6 (0x00007fa93e095000)
            libbz2.so.1.0 => /lib/libbz2.so.1.0 (0x00007fa93de85000)
            libz.so.1 => /usr/lib/libz.so.1 (0x00007fa93dc6d000)
            libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x00007fa93d953000)
            libx264.so.114 => /usr/lib/libx264.so.114 (0x00007fa93d6a9000)
            libvpx.so.0 => /usr/lib/libvpx.so.0 (0x00007fa93d408000)
            libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0x00007fa93cf3a000)
            libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x00007fa93cd0f000)
            libtheoraenc.so.1 => /usr/lib/libtheoraenc.so.1 (0x00007fa93cad0000)
            libtheoradec.so.1 => /usr/lib/libtheoradec.so.1 (0x00007fa93c8b7000)
            libschroedinger-1.0.so.0 => /usr/lib/libschroedinger-1.0.so.0 (0x00007fa93c5f4000)
            libopenjpeg.so.2 => /usr/lib/libopenjpeg.so.2 (0x00007fa93c3d4000)
            libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x00007fa93c1be000)
            libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x00007fa93bf8f000)
            libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x00007fa93bd15000)
            libva.so.1 => /usr/lib/libva.so.1 (0x00007fa93baeb000)
            libogg.so.0 => /usr/lib/libogg.so.0 (0x00007fa93b8e5000)
            liborc-0.4.so.0 => /usr/lib/liborc-0.4.so.0 (0x00007fa93b66e000)
            libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fa93b364000)
            libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fa93b14e000)
            libdl.so.2 => /lib/libdl.so.2 (0x00007fa93af4a000)
            librt.so.1 => /lib/librt.so.1 (0x00007fa93ad42000)

  9. #9
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,397
    When you install the package, it installs the executable (binary) program /usr/bin/motion, puts the default configuration file in /etc/motion/motion.conf, and anything else (such as shared libraries), in the appropriate places. When you run the 'motion' command, it reads the motion.conf file to decide how to behave and where the video device is to use.

    From what I can tell, the config file tells it whether to run as a service (daemon on), which video device to use (/dev/video0 by default), and a bunch of other stuff, such as the color palettes to use, image size (in width x height in pixels), frame rate, and a bunch of other options such as brightness, contrast, etc. You can also tell it to use ffmpeg (a video transcoder) to process the data such as to an mpeg4 or flv (flash video) stream.

    It looks like a nice tool. Thanks for bringing it to my attention. I'm going to play with it a bit to see how well it works. I used something like this some years ago to capture the reactions of a cow-worker when we pranked his office after he got married, and then we sent him overseas for a couple of weeks after his honeymoon. We streamed the video to the entire company - 3000 people on 4 continents...

    So, except for the device driver, all code should be handled by the tool. The source code should tell you how it works. As for the motion detection, that isn't hard. Using the framerate setting in the config file (defaults to 2fps), the tool will capture one frame each 1/2 second, compare it to the last one, and if there are changes in the frames (other than brightness I would assume), it turns on the recording function, which will capture the data until motion stops for some period of time. What more do you need to know?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  10. #10
    Just Joined!
    Join Date
    Jan 2011
    Posts
    14

    Thumbs up

    Exactly, that's, what I needed to knew.
    Great Great Great.
    Rubberman, really many thanks for your response and for being
    patient with me.
    reed9, many thanks for you.

    I will go in deep trying understand everything. And If I get an inquire I will come back here.

    Thanks a lot.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •