[MPlayer-users] Extracting frames to raw bitmap for processing

Gordan Bobic gordan at bobich.net
Sun Dec 9 14:35:25 CET 2001


Hi.

Before I go any further, the reason why I'm asking this question here is 
because mplayer is the only open source movie player that I am aware of that 
can read just about ALL formats commonly used today.

Here's what I want to do:

1) Get a number of frames in a movie file
2) Extract arbitrary frame X, preferably as a raw bitmap, and preferably 
pre-scaled to a specified resolution, but anything ought to do as I can 
always convert it later. However, speed is likely to be important, so 
extracting the image, compressing it, then exporting it to a file, then 
decompressing it, scaling it, and dumping it to a file again is likely to 
cause a rather serious performance hit compared to just extracting the frame, 
scaling it, and dumping the raw uncompressed frame to a file, or even feeding 
the data in a pipe to some program (see below).

The uses I have in mind for this are:

1) Automatic thumbnail generation
2) Feeding the extracted thumbnails to an AI system to perform some sort of 
classification and separation of the movies into different categories (it's a 
little research project I'm playing with)

So, the questions are really:
1) Does mplayer have features that are half way toward this, and how 
difficult would it be to implement them? I did RTFM, and found that it 
supports exporting to PNG (which is pretty close), but how do I get the total 
number of frames in the movie, and what about scaling? (And having raw 
uncompressed files would be really useful.) I didn't RTF Code yet.
2) How difficult a "wish list feature" is this?

Kind regards.

Gordan




More information about the MPlayer-users mailing list