Video thumbnail

I'm looking for a way to get a thumbnail out of a video.

I thought that should be possible with wx.MediaCtrl, but couldn't find a way to do that.

Am I missing something? Is there any other way?

Eli.

Eli Golovinsky wrote:

I'm looking for a way to get a thumbnail out of a video.

I thought that should be possible with wx.MediaCtrl, but couldn't find a way to do that.

Am I missing something? Is there any other way?

You'll probably have to find some code that can read the media stream format and pull out the data for the first frame, then convert it to a wx.Image...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

After searching for months for something to do this I eventually gave up
and wrote my own Pyrex wrapper around the ffmpeg library. It's very basic
and does only what I needed, but it may be useful to you. I've uploaded
the source to http://www.clark-evans.com/projects/pyffmpeg-0.2.0.tar.gz.
There's no docs yet, but:

import pyffmpeg

stream = pyffmpeg.VideoStream()
stream.open(filename)
PIL_image = stream.GetFrameNo(frame_no)

frame numbers may not be exact for all media types (I've tried with Divx
and MPEG2 with OK results)

Hope this helps!

james evans

<quote who="Robin Dunn">

···

Eli Golovinsky wrote:

I'm looking for a way to get a thumbnail out of a video.

I thought that should be possible with wx.MediaCtrl, but couldn't find a
way to do that.

Am I missing something? Is there any other way?

You'll probably have to find some code that can read the media stream
format and pull out the data for the first frame, then convert it to a
wx.Image...

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

That's what I'll be doing. Do you know of any plans to add such support for wx.MediaControl or the underlying backends?

Seems like something most people who want to show videos would need at some point.

Robin Dunn wrote:

···

Eli Golovinsky wrote:

I'm looking for a way to get a thumbnail out of a video.

I thought that should be possible with wx.MediaCtrl, but couldn't find a way to do that.

Am I missing something? Is there any other way?

You'll probably have to find some code that can read the media stream format and pull out the data for the first frame, then convert it to a wx.Image...

Have you ever tried compiling it under Windows, specifically with Visual Studio 2003?

I'm having some problems with it here that I will probably overcome, but if you do have any tips I'd appreciate it.

James Evans wrote:

···

After searching for months for something to do this I eventually gave up
and wrote my own Pyrex wrapper around the ffmpeg library. It's very basic
and does only what I needed, but it may be useful to you. I've uploaded
the source to http://www.clark-evans.com/projects/pyffmpeg-0.2.0.tar.gz.
There's no docs yet, but:

import pyffmpeg

stream = pyffmpeg.VideoStream()
stream.open(filename)
PIL_image = stream.GetFrameNo(frame_no)

frame numbers may not be exact for all media types (I've tried with Divx
and MPEG2 with OK results)

Hope this helps!

james evans

<quote who="Robin Dunn">
  

Eli Golovinsky wrote:
    

I'm looking for a way to get a thumbnail out of a video.

I thought that should be possible with wx.MediaCtrl, but couldn't find a
way to do that.

Am I missing something? Is there any other way?
      

You'll probably have to find some code that can read the media stream
format and pull out the data for the first frame, then convert it to a
wx.Image...

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

What issues are you having? An early version worked on win2k with the 2003
SDK (the free download), but linux is my primary platform.

Thanks,

james

<quote who="Eli Golovinsky">

···

Have you ever tried compiling it under Windows, specifically with Visual
Studio 2003?

I'm having some problems with it here that I will probably overcome, but
if you do have any tips I'd appreciate it.

James Evans wrote:

After searching for months for something to do this I eventually gave up
and wrote my own Pyrex wrapper around the ffmpeg library. It's very
basic
and does only what I needed, but it may be useful to you. I've uploaded
the source to http://www.clark-evans.com/projects/pyffmpeg-0.2.0.tar.gz.
There's no docs yet, but:

import pyffmpeg

stream = pyffmpeg.VideoStream()
stream.open(filename)
PIL_image = stream.GetFrameNo(frame_no)

frame numbers may not be exact for all media types (I've tried with Divx
and MPEG2 with OK results)

Hope this helps!

james evans

<quote who="Robin Dunn">

Eli Golovinsky wrote:

I'm looking for a way to get a thumbnail out of a video.

I thought that should be possible with wx.MediaCtrl, but couldn't find
a
way to do that.

Am I missing something? Is there any other way?

You'll probably have to find some code that can read the media stream
format and pull out the data for the first frame, then convert it to a
wx.Image...

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Eli Golovinsky wrote:

That's what I'll be doing. Do you know of any plans to add such support for wx.MediaControl or the underlying backends?

I haven't heard of any plans for doing that. Since MediaCtrl is pretty much a just a thin wrapper over the various backend libs, and doesn't do any reading or manipulation of the stream itself, I'm not sure if MediaCtrl would be able to get things like frame images without getting a lot more complex...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!