video analysis with python

Discussion in 'Python' started by Ashot, Jan 16, 2005.

  1. Ashot

    Ashot Guest

    Hi,

    I need to write a video analysis tool which extracts statistics from
    microsocope video. Essentially what I need is to translate the video data
    into numerical matrices. I have been using Python for the past 1.5 years
    anytime I could for absolutely everything, because it has every library
    imaginable... Alas, I can not find a library for decoding video/using
    codecs. The only solution I have been able to come up with is to create
    an image sequence and load those in with PIL, however this is not really
    feasible as the images are too large (nor is it proffessional).

    Is there a library or project that I have missed, or is there a way to
    incorporate something like vfw.lib directly? If there isn't I think this
    would be a pretty large whole in Python's arsenal. Thanks in advance for
    any help.

    --
    Ashot Petrosian
    University of Texas at Austin, Computer Sciences
    Ashot, Jan 16, 2005
    #1
    1. Advertising

  2. Ashot

    Miki Tebeka Guest

    Hello Ashot,

    > I need to write a video analysis tool which extracts statistics from
    > microsocope video. Essentially what I need is to translate the video data
    > into numerical matrices. I have been using Python for the past 1.5 years
    > anytime I could for absolutely everything, because it has every library
    > imaginable... Alas, I can not find a library for decoding video/using
    > codecs. The only solution I have been able to come up with is to create
    > an image sequence and load those in with PIL, however this is not really
    > feasible as the images are too large (nor is it proffessional).
    >
    > Is there a library or project that I have missed, or is there a way
    > to incorporate something like vfw.lib directly? If there isn't I think
    > this would be a pretty large whole in Python's arsenal. Thanks in advance
    > for any help.


    1. There is PyMedia (http://pymedia.org/)
    2. Maybe you can use the code from VLC (http://www.videolan.org/vlc/)
    (using SWIG/PyBoost/Pyrex ...)

    HTH.
    --
    ------------------------------------------------------------------------
    Miki Tebeka <>
    http://tebeka.bizhat.com
    The only difference between children and adults is the price of the toys
    Miki Tebeka, Jan 16, 2005
    #2
    1. Advertising

  3. Ashot

    Ashot Guest

    This helps alot! pyMedia looks perfect. I can't believe I couldn't find
    it after a full day of searching.. losing my touch

    On Sun, 16 Jan 2005 13:44:27 +0200, Miki Tebeka <>
    wrote:

    > Hello Ashot,
    >
    >> I need to write a video analysis tool which extracts statistics from
    >> microsocope video. Essentially what I need is to translate the video
    >> data
    >> into numerical matrices. I have been using Python for the past 1.5 years
    >> anytime I could for absolutely everything, because it has every library
    >> imaginable... Alas, I can not find a library for decoding video/using
    >> codecs. The only solution I have been able to come up with is to create
    >> an image sequence and load those in with PIL, however this is not really
    >> feasible as the images are too large (nor is it proffessional).
    >>
    >> Is there a library or project that I have missed, or is there a way
    >> to incorporate something like vfw.lib directly? If there isn't I
    >> think
    >> this would be a pretty large whole in Python's arsenal. Thanks in
    >> advance
    >> for any help.

    >
    > 1. There is PyMedia (http://pymedia.org/)
    > 2. Maybe you can use the code from VLC (http://www.videolan.org/vlc/)
    > (using SWIG/PyBoost/Pyrex ...)
    >
    > HTH.
    > --
    > ------------------------------------------------------------------------
    > Miki Tebeka <>
    > http://tebeka.bizhat.com
    > The only difference between children and adults is the price of the toys




    --
    --
    Ashot Petrosian
    University of Texas at Austin, Computer Sciences
    Ashot, Jan 16, 2005
    #3
  4. Hi

    Am 16.01.2005 12:44:27 schrieb Miki Tebeka:

    > 1. There is PyMedia (http://pymedia.org/)


    Is this library able to extract single images from a video? AFAICS it
    can only convert videos from one format to another. But I didn't try it,
    I've looked only in the docu.

    Maybe pyVideo (http://www.geocities.com/rtrocca/python/) would be a
    solution. But for me the AVIFile-Module doesn't work stable, it
    regularly crashes the python-interpreter.

    And there is a library for accessing DirectShow called PyDShowCam.

    cu boesi
    --
    |¯|/¯/¯¯¯\|¯| |¯|¯| |¯|/¯/¯¯¯\|¯¯¯¯\|¯¯¯¯| #1671 : icq-intern
    http://| / / /¯\ | | | | | | / / /¯\ | (¯) | |¯¯#73628288 : icq-extern
    smb://| \ \ \_/ | `¯´ | |__| \ \ \_/ | ¯ /| ¯| boesi111 : aim
    ftp://|_|\_\___/|_|¯|_|____|_|\_\___/|_|¯¯ |_|¯ i171 : reallife
    Alexander 'boesi' =?ISO-8859-1?Q?B=F6secke?=, Jan 17, 2005
    #4
  5. Ashot

    Ashot Guest

    On Mon, 17 Jan 2005 08:08:46 +0100, Alexander 'boesi' Bösecke
    <> wrote:

    > Hi
    >
    > Am 16.01.2005 12:44:27 schrieb Miki Tebeka:
    >
    >> 1. There is PyMedia (http://pymedia.org/)

    >
    > Is this library able to extract single images from a video? AFAICS it
    > can only convert videos from one format to another. But I didn't try it,
    > I've looked only in the docu.
    >
    > Maybe pyVideo (http://www.geocities.com/rtrocca/python/) would be a
    > solution. But for me the AVIFile-Module doesn't work stable, it
    > regularly crashes the python-interpreter.
    >
    > And there is a library for accessing DirectShow called PyDShowCam.
    >
    > cu boesi


    I haven't tried it yet, but yes its pretty full featured library, there is
    a tutorial here on extracting images:
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/FrameAccess.html

    --
    Ashot Petrosian
    University of Texas at Austin, Computer Sciences
    Ashot, Jan 17, 2005
    #5
  6. On Mon, 17 Jan 2005 08:08:46 +0100, "Alexander 'boesi' Bösecke"
    <> wrote:
    >> 1. There is PyMedia (http://pymedia.org/)

    >
    >Is this library able to extract single images from a video? AFAICS it
    >can only convert videos from one format to another. But I didn't try it,
    >I've looked only in the docu.


    Yes, you can extract single images from a video. The package uses the
    avformat and avcodec libraries from ffmpeg and it provides rather low
    level access to video/audio files. You can access the individual
    streams in a file, obtain the stream data and decode the data therein.
    What you do with the data is up to your application. Converting the
    file into another format is just one such application.

    - Matthias -
    Matthias Baas, Jan 20, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    461
    Travis Newbury
    Feb 8, 2006
  2. John Benson

    ELF object file analysis tool in Python?

    John Benson, Mar 3, 2004, in forum: Python
    Replies:
    2
    Views:
    528
    Miki Tebeka
    Mar 3, 2004
  3. wallge
    Replies:
    8
    Views:
    687
    wallge
    Jan 12, 2007
  4. David Buckley

    req converting video to flash video examples

    David Buckley, Apr 22, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    339
    Peter Bromberg [C# MVP]
    Apr 22, 2008
  5. ssubbarayan
    Replies:
    5
    Views:
    2,322
    Dave Hansen
    Nov 3, 2009
Loading...

Share This Page