video analysis with python

A

Ashot

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.
 
M

Miki Tebeka

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.
 
A

Ashot

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

Alexander 'boesi' =?ISO-8859-1?Q?B=F6secke?=

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
 
A

Ashot

Hi

Am 16.01.2005 12:44:27 schrieb Miki Tebeka:


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
 
M

Matthias Baas

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 -
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top