Get frame from WebM

599 views
Skip to first unread message

pun...@gmail.com

unread,
Jun 27, 2014, 1:16:21 PM6/27/14
to golan...@googlegroups.com
I'd like to create thumbnails from webm files. I see there is vp8 support in go.image, and I looked at how the WebP portion implements it. I kinda 'get' how it's supposed to work, but I'm not really a Go pro. Can the vp8 package grab specific frames from a WebM file, or is it just designed to decode WebP? Theres basically 0 information on the internet about this, any help would be appreciated. 

Nigel Tao

unread,
Jun 29, 2014, 8:49:21 PM6/29/14
to pun...@gmail.com, golang-nuts
On Sat, Jun 28, 2014 at 3:16 AM, <pun...@gmail.com> wrote:
> I'd like to create thumbnails from webm files. I see there is vp8 support in
> go.image, and I looked at how the WebP portion implements it. I kinda 'get'
> how it's supposed to work, but I'm not really a Go pro. Can the vp8 package
> grab specific frames from a WebM file, or is it just designed to decode
> WebP? Theres basically 0 information on the internet about this, any help
> would be appreciated.

WebM is a container format, which can contain multiple streams of
media: think video and audio. Video is typically encoded as key frames
(full images) and inter frames (delta images), and VP8 is a format for
these frames. Most WebM containers contain VP8 video, but other video
formats are possible (e.g. VP9).

The go.image/vp8 code contains a decoder for the VP8 image format, but
has only been tested on WebP files (still images) and not WebM files
(movies). I believe that the go.image/vp8 code contains 99% of the
code that you'd need to decode WebM VP8, but I haven't tried to do
this myself. In addition to that remaining 1%, somebody would have to
write the code the demux the WebM container format (IIUC, it is based
on the Matroska container format).

In summary, I wrote the go.image/vp8 package, but I don't know of any
complete Go code right now that can thumbnail a WebM file. Given that
the specifications are open, writing that code should be
straightforward for somebody who knew what they were doing, but I
haven't had the time to do that yet.

pun...@gmail.com

unread,
Jun 29, 2014, 10:25:15 PM6/29/14
to golan...@googlegroups.com, pun...@gmail.com
Thanks for the information Nigel, and thanks for the hard work ;D

I realize it's different from decoding an image. However it has become vogue in some internet circles to use WebM as a replacement for animated gifs (probably not the best choice)
Reply all
Reply to author
Forward
0 new messages