Extract frame from wmv

Tim Golden mail at timgolden.me.uk
Wed Nov 5 07:57:52 EST 2008


Martin wrote:
> I've looked at Pymedia but I have to admit I couldn't work it out.
> 
> Commandline might be good, but I'm really hoping someone can point me in 
> the right direction, as this is not my area of expertise.


Nor mine :) Just so people can help you out, can you
be more precise in your requirement? Do you want just
the first frame (eg to act as an img placeholder for
an embedded video). Or do you want to extract one or
more arbitrary frames, eg for screen cap purposes?

This page:

  http://stream0.org/2008/02/howto-extract-images-from-a-vi.html

looks helpful from the ffmpeg pov, but I assume you're
as capable of using Google as I am. I had a very quick
go with the copy of pymedia I have installed here, but
it couldn't read a (fairly recent) .wmv file so that
might be a problem in any case.

UPDATE: Just tried:

  ffmpeg -i bacardi.wmv -r 1 -f image2 images%05d.png

from that page and it produced useful stuff. Worth a try?

TJG



More information about the Python-list mailing list