By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,898 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,898 IT Pros & Developers. It's quick & easy.

video analysis with python

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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 <mi*********@zoran.com>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys
Jul 18 '05 #2

P: n/a
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 <mi*********@zoran.com>
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 <mi*********@zoran.com>
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
Jul 18 '05 #3

P: n/a
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
Jul 18 '05 #4

P: n/a
On Mon, 17 Jan 2005 08:08:46 +0100, Alexander 'boesi' Bösecke
<bo********@gmx.net> 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-me...ameAccess.html

--
Ashot Petrosian
University of Texas at Austin, Computer Sciences
Jul 18 '05 #5

P: n/a
On Mon, 17 Jan 2005 08:08:46 +0100, "Alexander 'boesi' Bösecke"
<bo********@gmx.net> 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 -

Jul 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.