animation

859 views
Skip to first unread message

Spineanu Radu

unread,
Apr 15, 2012, 1:53:14 PM4/15/12
to WebP Discussion
Hi!

From what I read webp supports animation. Given a set of X jpg images
how can I convert them to an animated webp?

-R.

fex

unread,
Apr 15, 2012, 5:53:35 PM4/15/12
to WebP Discussion
The immediate answer would be to embed a webm video, which webp is
based of. However there may be some interest in a light-weight no-
audio animated variant of webp to replace animated gif. There are huge
compression benefits in doing this, however convincing enough people
to make the switch could be hard.

Urvang Joshi

unread,
Apr 16, 2012, 1:12:18 AM4/16/12
to webp-d...@webmproject.org
Hi,
Yes, WebP has a support for animation. You can create animated WebP images using the WebPMux library/binary as follows:
(Make sure you have the 'cwebp' and 'webpmux' binaries).

(1) Convert all the JPEG images to WebP using the 'cwebp' binary. e.g.

for file in *.jpg; do cwebp ${file} -o ${file%.jpg}.webp; done

(2) Now, create an animated WebP image, from multiple WebP images created in step 1, using 'webpmux' binary.
For example, suppose you want to create an animation from 1.webp, 2.webp, 3.webp & 4.webp where
- Duration (in milliseconds) between frames is 100, 200, 300 & 400 respectively.
- Animation loops 1000 times
- Each frame has image offset (0,0) [that is, the top left pixel of each frame is located at (0,0)].
You can use the following command to achieve this:

webpmux -frame 1.webp +0+0+100 -frame 2.webp +0+0+200 -frame 3.webp +0+0+300 -frame 4.webp +0+0+400 -loop 1000 -o animation.webp

Hope this helps.

-Urvang


-R.

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webp-discuss/?hl=en.


Spineanu Radu

unread,
Apr 17, 2012, 7:16:45 PM4/17/12
to WebP Discussion
It does help, and if I get it working hopefully I'll make something
cool.

Question: where can I get WebPMux? I see premade packages only for
cwebp dwebp. Do I need to get the current trunk and compile it?

-R.

On Apr 16, 8:12 am, Urvang Joshi <urv...@google.com> wrote:
> Hi,
> Yes, WebP has a support for animation. You can create animated WebP images
> using the WebPMux library/binary as follows:
> (Make sure you have the 'cwebp' and 'webpmux' binaries).
>
> (1) Convert all the JPEG images to WebP using the 'cwebp' binary. e.g.
>
> *for file in *.jpg; do cwebp ${file} -o ${file%.jpg}.webp; done*
>
> (2) Now, create an animated WebP image, from multiple WebP images created
> in step 1, using 'webpmux' binary.
> For example, suppose you want to create an animation from 1.webp, 2.webp,
> 3.webp & 4.webp where
> - Duration (in milliseconds) between frames is 100, 200, 300 & 400
> respectively.
> - Animation loops 1000 times
> - Each frame has image offset (0,0) [that is, the top left pixel of each
> frame is located at (0,0)].
> You can use the following command to achieve this:
>
> *webpmux -frame 1.webp +0+0+100 -frame 2.webp +0+0+200 -frame 3.webp
> +0+0+300 -frame 4.webp +0+0+400 -loop 1000 -o animation.webp*
>
> Hope this helps.
>
> -Urvang
>
> On Sun, Apr 15, 2012 at 11:23 PM, Spineanu Radu <radu.spine...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Hi!
>
> > From what I read webp supports animation. Given a set of X jpg images
> > how can I convert them to an animated webp?
>
> > -R.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "WebP Discussion" group.
> > To post to this group, send email to webp-disc...@webmproject.org.
> > To unsubscribe from this group, send email to
> > webp-discuss+unsubscr...@webmproject.org.

Urvang Joshi

unread,
Apr 18, 2012, 12:41:12 AM4/18/12
to webp-d...@webmproject.org
On Wed, Apr 18, 2012 at 4:46 AM, Spineanu Radu <radu.s...@gmail.com> wrote:
It does help, and if I get it working hopefully I'll make something
cool.

Question: where can I get WebPMux? I see premade packages only for
cwebp dwebp. Do I need to get the current trunk and compile it?

Yes, you can compile it from source. Download the latest source using: git clone http://git.chromium.org/webm/libwebp.git
Have a look at the README for installation instructions.

P.S. You can also have look at README.mux for more info on 'webpmux' binary and API.
 
To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-discuss...@webmproject.org.

Spineanu Radu

unread,
Apr 19, 2012, 6:43:23 PM4/19/12
to WebP Discussion

> Yes, you can compile it from source. Download the latest source using: git
> clonehttp://git.chromium.org/webm/libwebp.git
> Have a look at the *README* for installation instructions.
>
> P.S. You can also have look at *README.mux *for more info on 'webpmux'
> binary and API.

Got it. I have it working, and I built a webp animation. Now, how can
I see it? I tried all builds of chrome (canary too) and it doesn't
seem to animate, it just shows a static image.

-R.

Pascal Massimino

unread,
Apr 26, 2012, 11:52:40 AM4/26/12
to webp-d...@webmproject.org
Hi Radu,

The library for demuxing animated files (libwebpmux) still need some polishing.
I have this patch sitting around https://gerrit.chromium.org/gerrit/21200
It makes examples/vwebp support animation.
But libwebpmux still has few problems handling transparently the animated (VP8X-based)
and non-animated "raw" bitstreams. I'll finish patch #21200 when libwebpmux
gets better at that.

skal

 

-R.

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.

Pascal Massimino

unread,
May 9, 2012, 5:31:14 AM5/9/12
to webp-d...@webmproject.org
Hi,

On Thu, Apr 26, 2012 at 8:52 AM, Pascal Massimino <pascal.m...@gmail.com> wrote:
Hi Radu,

On Thu, Apr 19, 2012 at 3:43 PM, Spineanu Radu <radu.s...@gmail.com> wrote:

> Yes, you can compile it from source. Download the latest source using: git
> clonehttp://git.chromium.org/webm/libwebp.git
> Have a look at the *README* for installation instructions.
>
> P.S. You can also have look at *README.mux *for more info on 'webpmux'
> binary and API.

Got it. I have it working, and I built a webp animation. Now, how can
I see it? I tried all builds of chrome (canary too) and it doesn't
seem to animate, it just shows a static image.

The library for demuxing animated files (libwebpmux) still need some polishing.
I have this patch sitting around https://gerrit.chromium.org/gerrit/21200
It makes examples/vwebp support animation.
But libwebpmux still has few problems handling transparently the animated (VP8X-based)
and non-animated "raw" bitstreams. I'll finish patch #21200 when libwebpmux
gets better at that.


actually, i submitted https://gerrit.chromium.org/gerrit/#change,22219 instead, that works as is
and doesn't require a libwebpmux update (yet!).

You can compile from HEAD using (dixit the patch description):


how to build and use manually (integration in makefile.unix coming soon)

Unix:
cd libwebp
make -f makefile.unix
cd examples
cc -o vwebp vwebp.c -framework GLUT -framework OpenGL -I../src/ ../src/libwebp.a ../src/mux/libwebpmux.a

Mac + xcode:
cd libwebp
make -f makefile.unix
cd examples
cc -o vwebp vwebp.c -lglut -lGL -lpthread -lm -I../src/ ../src/libwebp.a ../src/mux/libwebpmux.a

ZioDave

unread,
May 10, 2012, 4:37:02 AM5/10/12
to WebP Discussion
I think Unix and Mac are inverted?

With this, under Mac OS X:
cc -o vwebp vwebp.c -framework GLUT -framework OpenGL -I../src/
../src/libwebp.a ../src/mux/libwebpmux.a

it worked just fine.

BR
David

On May 9, 12:31 pm, Pascal Massimino <pascal.massim...@gmail.com>
wrote:
> Hi,
>
> On Thu, Apr 26, 2012 at 8:52 AM, Pascal Massimino <
>
>
>
>
>
>
>
>
>
> pascal.massim...@gmail.com> wrote:
> > Hi Radu,
>
> > On Thu, Apr 19, 2012 at 3:43 PM, Spineanu Radu <radu.spine...@gmail.com>wrote:
>
> >> > Yes, you can compile it from source. Download the latest source using:
> >> git
> >> > clonehttp://git.chromium.org/webm/libwebp.git
> >> > Have a look at the *README* for installation instructions.
>
> >> > P.S. You can also have look at *README.mux *for more info on 'webpmux'
> >> > binary and API.
>
> >> Got it. I have it working, and I built a webp animation. Now, how can
> >> I see it? I tried all builds of chrome (canary too) and it doesn't
> >> seem to animate, it just shows a static image.
>
> > The library for demuxing animated files (libwebpmux) still need some
> > polishing.
> > I have this patch sitting aroundhttps://gerrit.chromium.org/gerrit/21200
> > It makes examples/vwebp support animation.
> > But libwebpmux still has few problems handling transparently the animated
> > (VP8X-based)
> > and non-animated "raw" bitstreams. I'll finish patch #21200 when libwebpmux
> > gets better at that.
>
> actually, i submittedhttps://gerrit.chromium.org/gerrit/#change,22219instead, that works as
> is
> and doesn't require a libwebpmux update (yet!).
>
> You can compile from HEAD using (dixit the patch description):
>
> how to build and use manually (integration in makefile.unix coming soon)
>
> Unix:
> cd libwebp
> make -f makefile.unix
> cd examples
> cc -o vwebp vwebp.c -framework GLUT -framework OpenGL -I../src/
> ../src/libwebp.a ../src/mux/libwebpmux.a
>
> Mac + xcode:
> cd libwebp
> make -f makefile.unix
> cd examples
> cc -o vwebp vwebp.c -lglut -lGL -lpthread -lm -I../src/ ../src/libwebp.a
> ../src/mux/libwebpmux.a
>
>
>
>
>
>
>
> > skal
>
> >> -R.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "WebP Discussion" group.
> >> To post to this group, send email to webp-disc...@webmproject.org.
> >> To unsubscribe from this group, send email to
> >> webp-discuss+unsubscr...@webmproject.org.

ZioDave

unread,
May 10, 2012, 4:32:37 AM5/10/12
to WebP Discussion
Hi there,

Is there a tip on how to build this on Mac OS X?

When launching:
cc -o vwebp vwebp.c -lglut -lGL -lpthread -lm -I../src/ ../src/
libwebp.a

I get this error:
ld: library not found for -lglut

Should I port glut?

Thanks,
David

On May 9, 5:31 am, Pascal Massimino <pascal.massim...@gmail.com>
wrote:
> Hi,
>
> On Thu, Apr 26, 2012 at 8:52 AM, Pascal Massimino <
>
>
>
>
>
>
>
>
>
> pascal.massim...@gmail.com> wrote:
> > Hi Radu,
>
> > On Thu, Apr 19, 2012 at 3:43 PM, Spineanu Radu <radu.spine...@gmail.com>wrote:
>
> >> > Yes, you can compile it from source. Download the latest source using:
> >> git
> >> > clonehttp://git.chromium.org/webm/libwebp.git
> >> > Have a look at the *README* for installation instructions.
>
> >> > P.S. You can also have look at *README.mux *for more info on 'webpmux'
> >> > binary and API.
>
> >> Got it. I have it working, and I built a webp animation. Now, how can
> >> I see it? I tried all builds of chrome (canary too) and it doesn't
> >> seem to animate, it just shows a static image.
>
> > The library for demuxing animated files (libwebpmux) still need some
> > polishing.
> > I have this patch sitting aroundhttps://gerrit.chromium.org/gerrit/21200
> > It makes examples/vwebp support animation.
> > But libwebpmux still has few problems handling transparently the animated
> > (VP8X-based)
> > and non-animated "raw" bitstreams. I'll finish patch #21200 when libwebpmux
> > gets better at that.
>
> actually, i submittedhttps://gerrit.chromium.org/gerrit/#change,22219instead, that works as
> is
> and doesn't require a libwebpmux update (yet!).
>
> You can compile from HEAD using (dixit the patch description):
>
> how to build and use manually (integration in makefile.unix coming soon)
>
> Unix:
> cd libwebp
> make -f makefile.unix
> cd examples
> cc -o vwebp vwebp.c -framework GLUT -framework OpenGL -I../src/
> ../src/libwebp.a ../src/mux/libwebpmux.a
>
> Mac + xcode:
> cd libwebp
> make -f makefile.unix
> cd examples
> cc -o vwebp vwebp.c -lglut -lGL -lpthread -lm -I../src/ ../src/libwebp.a
> ../src/mux/libwebpmux.a
>
>
>
>
>
>
>
> > skal
>
> >> -R.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "WebP Discussion" group.
> >> To post to this group, send email to webp-disc...@webmproject.org.
> >> To unsubscribe from this group, send email to
> >> webp-discuss+unsubscr...@webmproject.org.

David Riccitelli

unread,
May 10, 2012, 4:58:15 AM5/10/12
to WebP Discussion
Hi

I built the animation using the last version from http://git.chromium.org/webm/libwebp.git
which includes the patch already (right?).

But in Chrome (Canary) it does not animate.

BR,
David

On May 9, 12:31 pm, Pascal Massimino <pascal.massim...@gmail.com>
wrote:
> Hi,
>
> On Thu, Apr 26, 2012 at 8:52 AM, Pascal Massimino <
>
>
>
>
>
>
>
>
>
> pascal.massim...@gmail.com> wrote:
> > Hi Radu,
>
> > On Thu, Apr 19, 2012 at 3:43 PM, Spineanu Radu <radu.spine...@gmail.com>wrote:
>
> >> > Yes, you can compile it from source. Download the latest source using:
> >> git
> >> > clonehttp://git.chromium.org/webm/libwebp.git
> >> > Have a look at the *README* for installation instructions.
>
> >> > P.S. You can also have look at *README.mux *for more info on 'webpmux'
> >> > binary and API.
>
> >> Got it. I have it working, and I built a webp animation. Now, how can
> >> I see it? I tried all builds of chrome (canary too) and it doesn't
> >> seem to animate, it just shows a static image.
>
> > The library for demuxing animated files (libwebpmux) still need some
> > polishing.
> > I have this patch sitting aroundhttps://gerrit.chromium.org/gerrit/21200
> > It makes examples/vwebp support animation.
> > But libwebpmux still has few problems handling transparently the animated
> > (VP8X-based)
> > and non-animated "raw" bitstreams. I'll finish patch #21200 when libwebpmux
> > gets better at that.
>
> actually, i submittedhttps://gerrit.chromium.org/gerrit/#change,22219instead, that works as
> is
> and doesn't require a libwebpmux update (yet!).
>
> You can compile from HEAD using (dixit the patch description):
>
> how to build and use manually (integration in makefile.unix coming soon)
>
> Unix:
> cd libwebp
> make -f makefile.unix
> cd examples
> cc -o vwebp vwebp.c -framework GLUT -framework OpenGL -I../src/
> ../src/libwebp.a ../src/mux/libwebpmux.a
>
> Mac + xcode:
> cd libwebp
> make -f makefile.unix
> cd examples
> cc -o vwebp vwebp.c -lglut -lGL -lpthread -lm -I../src/ ../src/libwebp.a
> ../src/mux/libwebpmux.a
>
>
>
>
>
>
>
> > skal
>
> >> -R.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "WebP Discussion" group.
> >> To post to this group, send email to webp-disc...@webmproject.org.
> >> To unsubscribe from this group, send email to
> >> webp-discuss+unsubscr...@webmproject.org.

Urvang Joshi

unread,
May 10, 2012, 5:37:20 AM5/10/12
to webp-d...@webmproject.org
Hi David,
Yup, looks like mac/linux were invertered. Correct way to build is:

Mac + xcode:
cd libwebp
make -f makefile.unix
cd examples

cc -o vwebp vwebp.c -framework GLUT -framework OpenGL -I../src/ ../src/libwebp.a ../src/mux/libwebpmux.a

Unix:


cd libwebp
make -f makefile.unix
cd examples

cc -o vwebp vwebp.c -lglut -lGL -lpthread -lm -I../src/ ../src/libwebp.a ../src/mux/libwebpmux.a

Regards,
Urvang

To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-discuss...@webmproject.org.

Urvang Joshi

unread,
May 10, 2012, 5:50:41 AM5/10/12
to webp-d...@webmproject.org
On Thu, May 10, 2012 at 2:28 PM, David Riccitelli <da...@insideout.io> wrote:
Hi

I built the animation using the last version from http://git.chromium.org/webm/libwebp.git
which includes the patch already (right?). 

But in Chrome (Canary) it does not animate.

Hi David,
Currently, Chrome uses an old version of libwebp, which doesn't contain advanced features like animation.
Plan is to release the next version of libwebp (v0.1.4) soon, which would support animation, tiling, XMP metadata, color profiles and alpha. After that release, Chrome would be able use the latest library to support animation.

In the meantime, you can preview all webp files (including animated images) using the binary "examples/vwebp". This binary can generated by the commands mentioned in the previous mail.

Try it out, and let me know what you think.
 
To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-discuss...@webmproject.org.

David Riccitelli

unread,
May 10, 2012, 6:03:10 AM5/10/12
to webp-d...@webmproject.org
Thanks,

I was able to preview the animation using vwebp.

David
--
David Riccitelli

********************************************************************************
InsideOut10 s.r.l.
P.IVA: IT-11381771002
---
Twitter: ziodave
---
********************************************************************************

James Zern

unread,
May 10, 2012, 1:52:55 PM5/10/12
to WebP Discussion


On May 10, 2:37 am, Urvang Joshi <urv...@google.com> wrote:
> Hi David,
> Yup, looks like mac/linux were invertered. Correct way to build is:
>
There's actually a target now in makefile.unix which simplifies this:
$ make -f makefile.unix examples/vwebp

This will build the libraries as well as vwebp.

> *Mac + xcode:
> *cd libwebp
> make -f makefile.unix
> cd examples
> cc -o vwebp vwebp.c -framework GLUT -framework OpenGL -I../src/
> ../src/libwebp.a ../src/mux/libwebpmux.a
>
> *Unix:*

fex

unread,
May 17, 2012, 11:00:40 PM5/17/12
to WebP Discussion
Thanks, I didn't know about WebPMux. Does this only compress inter-
frame differences for animations, or is each frame compressed
individually?

On Apr 16, 5:12 pm, Urvang Joshi <urv...@google.com> wrote:
> Hi,
> Yes, WebP has a support for animation. You can create animated WebP images
> using the WebPMux library/binary as follows:
> (Make sure you have the 'cwebp' and 'webpmux' binaries).
>
> (1) Convert all the JPEG images to WebP using the 'cwebp' binary. e.g.
>
> *for file in *.jpg; do cwebp ${file} -o ${file%.jpg}.webp; done*
>
> (2) Now, create an animated WebP image, from multiple WebP images created
> in step 1, using 'webpmux' binary.
> For example, suppose you want to create an animation from 1.webp, 2.webp,
> 3.webp & 4.webp where
> - Duration (in milliseconds) between frames is 100, 200, 300 & 400
> respectively.
> - Animation loops 1000 times
> - Each frame has image offset (0,0) [that is, the top left pixel of each
> frame is located at (0,0)].
> You can use the following command to achieve this:
>
> *webpmux -frame 1.webp +0+0+100 -frame 2.webp +0+0+200 -frame 3.webp
> +0+0+300 -frame 4.webp +0+0+400 -loop 1000 -o animation.webp*
>
> Hope this helps.
>
> -Urvang
>
> On Sun, Apr 15, 2012 at 11:23 PM, Spineanu Radu <radu.spine...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Hi!
>
> > From what I read webp supports animation. Given a set of X jpg images
> > how can I convert them to an animated webp?
>
> > -R.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "WebP Discussion" group.
> > To post to this group, send email to webp-disc...@webmproject.org.
> > To unsubscribe from this group, send email to
> > webp-discuss+unsubscr...@webmproject.org.

James Zern

unread,
May 18, 2012, 3:14:30 PM5/18/12
to webp-d...@webmproject.org
Hi,


On Thursday, May 17, 2012 8:00:40 PM UTC-7, fex wrote:
Thanks, I didn't know about WebPMux. Does this only compress inter-
frame differences for animations, or is each frame compressed
individually?

WebPMux operates on compressed webp files, it packs them into an animation file. So the answer to your question is that they're stand-alone images. If the frame count or size was very high you could always move to <video>.

James Zern

unread,
Nov 20, 2012, 1:26:24 AM11/20/12
to webp-d...@webmproject.org, m...@elv1s.ru


On Monday, November 19, 2012 6:58:17 AM UTC-8, m...@elv1s.ru wrote:
Doesn’t work for me.

➤ make -f makefile.unix
[...]
➤ cd examples
➤ 
cc -o vwebp vwebp.c -lglut -lGL -lpthread -lm -I../src/ ../src/libwebp.a ../src/mux/libwebpmux.a
clang: error: no such file or directory: '../src/mux/libwebpmux.a'

On Wednesday, May 9, 2012 1:31:14 PM UTC+4, skal wrote:

Mac + xcode:
cd libwebp
make -f makefile.unix
cd examples
cc -o vwebp vwebp.c -lglut -lGL -lpthread -lm -I../src/ ../src/libwebp.a ../src/mux/libwebpmux.a


This example is dated. If you want to build vwebp with makefile.unix:
$  make -f makefile.unix examples/vwebp

This will build the prerequisite libraries.

Pascal Massimino

unread,
Nov 20, 2012, 12:38:59 PM11/20/12
to webp-d...@webmproject.org, m...@elv1s.ru
Hi,

On Tue, Nov 20, 2012 at 1:34 PM, <m...@elv1s.ru> wrote:
I successfully built examples/vwebp. How do I create animated WebP images with it. ./vwebp -h doesn’t help me here.

great!

'vwebp' is only a viewer for animated WebP files.
To create animations, you can use webpmux to assemble already-compiled WebP files.
For instance, if you already compressed 'frame1.webp', 'frame2.webp', 'frame3.webp', you can use:

webpmux -frame frame1.webp +40 \
               -frame frame2.webp +40 \
               -frame frame3.webp +40 \
               -loop 10 -o anim.webp

And then view it with 'vwebp anim.webp'.
Here, "+40" is the duration in ms. 40ms corresponds to 25 frames/sec.

You can also directly convert a GIF to WebP using 'gif2webp anim.gif -o anim.webp'
but it's better to start from the original frames if possible, instead of the color-quantized GIF.


--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.

Nikita Vasilyev

unread,
Nov 20, 2012, 12:50:32 PM11/20/12
to webp-d...@webmproject.org, m...@elv1s.ru
Hi,
Thanks for the response!

Where do I get webpmux? I was originally asking how to build it.

Urvang Joshi

unread,
Nov 20, 2012, 1:02:30 PM11/20/12
to webp-d...@webmproject.org, m...@elv1s.ru
Hi,
You can build webpmux binary using:
make -f makefile.unix examples/webpmux

Similarly, gif2webp can be built using: 
make -f makefile.unix examples/gif2webp

-Urvang


Pascal Massimino

unread,
Nov 20, 2012, 1:02:56 PM11/20/12
to webp-d...@webmproject.org, m...@elv1s.ru
Hi,

It's not part of the source tree in the repository (but not yet in any of the official archive till 0.2.1. Hopefully in the next one!).
It's built by default, so you should have it available as 'examples/webpmux' if you use the HEAD tree.

 


--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msg/webp-discuss/-/64wAb9crZiEJ.

To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-discuss...@webmproject.org.

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.

Nikita Vasilyev

unread,
Nov 20, 2012, 1:08:55 PM11/20/12
to webp-d...@webmproject.org, m...@elv1s.ru


On Tuesday, November 20, 2012 10:02:52 PM UTC+4, Urvang Joshi wrote:
Hi,
You can build webpmux binary using:
make -f makefile.unix examples/webpmux

Thanks!
 

Similarly, gif2webp can be built using: 
make -f makefile.unix examples/gif2webp

This one doesn’t work:

➤ make -f makefile.unix examples/gif2webp
gcc -O3 -DNDEBUG -DWEBP_HAVE_PNG -DWEBP_HAVE_JPEG -DWEBP_HAVE_TIFF -fno-common -I/opt/local/include -DWEBP_USE_THREAD -Wextra -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Isrc/ -Wall -c examples/gif2webp.c -o examples/gif2webp.o
examples/gif2webp.c:31:21: error: gif_lib.h: No such file or directory
examples/gif2webp.c:46: error: expected ‘)’ before ‘*’ token
examples/gif2webp.c:59: warning: type defaults to ‘int’ in declaration of ‘GifFileType’
examples/gif2webp.c:59: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
examples/gif2webp.c:75: error: expected ‘)’ before ‘*’ token
examples/gif2webp.c:125: warning: type defaults to ‘int’ in declaration of ‘ColorMapObject’
examples/gif2webp.c:125: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
examples/gif2webp.c: In function ‘main’:
examples/gif2webp.c:178: error: ‘GifFileType’ undeclared (first use in this function)
examples/gif2webp.c:178: error: (Each undeclared identifier is reported only once
examples/gif2webp.c:178: error: for each function it appears in.)
examples/gif2webp.c:178: error: ‘gif’ undeclared (first use in this function)
examples/gif2webp.c:179: warning: ISO C90 forbids mixed declarations and code
examples/gif2webp.c:256: warning: implicit declaration of function ‘DGifOpen’
examples/gif2webp.c:256: error: ‘MyReader’ undeclared (first use in this function)
examples/gif2webp.c:268: warning: implicit declaration of function ‘GetColorFromIndex’
examples/gif2webp.c:284: error: ‘GifRecordType’ undeclared (first use in this function)
examples/gif2webp.c:284: error: expected ‘;’ before ‘type’
examples/gif2webp.c:285: warning: implicit declaration of function ‘DGifGetRecordType’
examples/gif2webp.c:285: error: ‘type’ undeclared (first use in this function)
examples/gif2webp.c:285: error: ‘GIF_ERROR’ undeclared (first use in this function)
examples/gif2webp.c:288: error: ‘IMAGE_DESC_RECORD_TYPE’ undeclared (first use in this function)
examples/gif2webp.c:293: warning: implicit declaration of function ‘DGifGetImageDesc’
examples/gif2webp.c:294: warning: implicit declaration of function ‘ReadSubImage’
examples/gif2webp.c:336: error: ‘EXTENSION_RECORD_TYPE’ undeclared (first use in this function)
examples/gif2webp.c:338: error: ‘GifByteType’ undeclared (first use in this function)
examples/gif2webp.c:338: error: ‘data’ undeclared (first use in this function)
examples/gif2webp.c:339: warning: implicit declaration of function ‘DGifGetExtension’
examples/gif2webp.c:343: error: ‘COMMENT_EXT_FUNC_CODE’ undeclared (first use in this function)
examples/gif2webp.c:346: error: ‘GRAPHICS_EXT_FUNC_CODE’ undeclared (first use in this function)
examples/gif2webp.c:365: error: ‘PLAINTEXT_EXT_FUNC_CODE’ undeclared (first use in this function)
examples/gif2webp.c:368: error: ‘APPLICATION_EXT_FUNC_CODE’ undeclared (first use in this function)
examples/gif2webp.c:372: warning: implicit declaration of function ‘DGifGetExtensionNext’
examples/gif2webp.c:407: error: ‘TERMINATE_RECORD_TYPE’ undeclared (first use in this function)
examples/gif2webp.c:453: warning: implicit declaration of function ‘PrintGifError’
examples/gif2webp.c:456: warning: implicit declaration of function ‘DGifCloseFile’
make: *** [examples/gif2webp.o] Error 1

 
Do I have to install some dependency first?

Urvang Joshi

unread,
Nov 20, 2012, 1:13:53 PM11/20/12
to webp-d...@webmproject.org, me
Hi Nikita,
Yes, you need GIF library installed. You can install this as follows (the same is mentioned in gif2webp.c):

Linux: sudo apt-get install libgif-dev
Mac (using MacPorts): sudo port install giflib

-Urvang


Nikita Vasilyev

unread,
Nov 20, 2012, 1:20:57 PM11/20/12
to webp-d...@webmproject.org, me
"brew install giflib" worked. Thanks again!

oX Triangle

unread,
Apr 8, 2013, 5:24:41 PM4/8/13
to webp-d...@webmproject.org
hi exist anywhere a binary dos-tool for webpmux
i try to replace the cbr/cbz (comicbook) with animated webp
and i have no compile skills...

Urvang Joshi

unread,
Apr 8, 2013, 5:38:20 PM4/8/13
to webp-d...@webmproject.org
Hi,
The animation in WebP was released as part of v0.3.0 (see: https://groups.google.com/a/webmproject.org/forum/#!topic/webp-discuss/WF84vomYtos)

You can download the binaries here:
(Pick the one corresponding to your operating system).

You can use the 'gif2webp' tool from there to convert a GIF to WebP, and then use 'vwebp' tool to view it.



--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.

To post to this group, send email to webp-d...@webmproject.org.

oX Triangle

unread,
Apr 9, 2013, 7:22:04 AM4/9/13
to webp-d...@webmproject.org
sorry but gif2webp is unusable for this
gif is cropped the data to 8bit
cbr contain jpgs
i need a binary (dos/win) to mux multiple webp to one animated webp

another question is

is possible to mux images with different imagesizes?

Urvang Joshi

unread,
Apr 9, 2013, 5:51:28 PM4/9/13
to webp-d...@webmproject.org
On Tue, Apr 9, 2013 at 4:22 AM, oX Triangle <oxdos...@googlemail.com> wrote:
sorry but gif2webp is unusable for this
gif is cropped the data to 8bit
cbr contain jpgs
i need a binary (dos/win) to mux multiple webp to one animated webp


Oh I see. To mux multiple WebP images into an animated WebP image, you can use the 'webpmux' tool. This is also part of v0.3.0 release binaries (check here as noted earlier: https://code.google.com/p/webp/downloads/list). 
 
another question is

is possible to mux images with different imagesizes?

And yes, this supports each frame of the animation to be of a different size, as well as each frame having different offsets.
You can run "webpmux -h" for help on using the tool.

oX Triangle

unread,
Apr 10, 2013, 11:47:32 AM4/10/13
to webp-d...@webmproject.org
Oh I see. To mux multiple WebP images into an animated WebP image, you can use the 'webpmux' tool. This is also part of v0.3.0 release binaries (check here as noted earlier: https://code.google.com/p/webp/downloads/list).

tnx.. but the doc for this not really help to understand usage of commandline
ex. i write "webpmux -frame 01.webp -frame 02.webp ... -frame 05.webp -o test.webp"
get error.."Multiple input files specified"

???

oX Triangle

unread,
Apr 10, 2013, 12:22:16 PM4/10/13
to webp-d...@webmproject.org
vwebp.exe dont work..

my Win8/64 miss a file called: FREEGLUT.DLL

??

James Zern

unread,
Apr 10, 2013, 4:48:13 PM4/10/13
to webp-d...@webmproject.org
You'll need to install that separately [1] and add it to your PATH. 

Urvang Joshi

unread,
Apr 10, 2013, 9:10:36 PM4/10/13
to webp-d...@webmproject.org
Hi,


As noted by "webpmux -h", the syntax for this is as follows:

webpmux -frame FRAME_OPTIONS [-frame...] [-loop LOOP_COUNT] [-bgcolor BACKGROUND_COLOR] -o OUTPUT
 
Where each 'FRAME_OPTIONS' is of the form:
   file_i +di[+xi+yi[+mi]]
   where:    'file_i' is the i'th animation frame (WebP format),
             'di' is the pause duration before next frame.
             'xi','yi' specify the image offset for this frame.
             'mi' is the dispose method for this frame (0 or 1).

And the arguments shown in the square brackets are optional.

An example command-line would be:
webpmux -frame 01.webp +100 -frame 02.webp +200 -frame 03.webp +300+10+20 -o test.webp

This would create an animation with 3 frames:
- 1st frame has a duration of 100 ms and other options are default
- 2nd frame has a duration of 200 ms and other options are default.
- 3rd frame has a duration of 300 ms, X-offset of 10 pixels and Y-offset of 20 pixels.




???

oX Triangle

unread,
Apr 11, 2013, 5:59:40 AM4/11/13
to webp-d...@webmproject.org
okay done and works
but is terrible for more then 100 files
have test this with 53 webp-files now
has same size how stored 7zip.. very good

a) how i can mux files if the commandline dont support commands longer then 255 characters?
b) the actual WIC-Codec dont support show first image (explorer thumbnail)

Vlastimil Miléř

unread,
May 24, 2013, 3:18:55 AM5/24/13
to webp-d...@webmproject.org
A reference package with examples covering all the cases (all 64
combinations of lossy/lossless, image/animation, with/without EXIF,
with/without XMP, with/without color profile, fragmented/not
fragmented) will be very useful for everyone, who wants to integrate
the webp codec into their software. Right now, we are left with the
test image we generate ourselves and that is no real test. Anyway, 4
animations I have created are at http://www.rw-designer.com/webp-codec

V.

On Fri, May 24, 2013 at 12:49 AM, <lucia...@gmail.com> wrote:
> Hi!
>
> Could someone provide a image example link? =]
>
> I'm very interested on webp animations.
>
> tnx.

Pascal Massimino

unread,
May 24, 2013, 11:46:45 AM5/24/13
to WebP Discussion
Hi,


On Fri, May 24, 2013 at 9:18 AM, Vlastimil Miléř <vlastim...@gmail.com> wrote:
A reference package with examples covering all the cases (all 64
combinations of lossy/lossless, image/animation, with/without EXIF,
with/without XMP, with/without color profile, fragmented/not
fragmented) will be very useful for everyone, who wants to integrate
the webp codec into their software. Right now, we are left with the
test image we generate ourselves and that is no real test. Anyway, 4
animations I have created are at http://www.rw-designer.com/webp-codec

That's a good suggestion, thanks for the reminder.

Actually, these _is_ a test-suite repository libwebp-test-data.
(browse: )

I recently added some lossy + lossless cases, but i agree it's quite incomplete for now.
I've just sent a patch with a lot of new test vector for lossless format:

that contain all lossless's spec feature combinations.
I'll add some more with metadata, animation, etc. soon.

ankara...@gmail.com

unread,
Aug 28, 2019, 10:33:40 AM8/28/19
to WebP Discussion
Hi, Is there a way to make an animated .webp from thousands of files? I made a python script that uses the command line tools but the command line gets very long (I am trying to make a 1800 frame animation) and I always get a long command line error.


On Monday, April 16, 2012 at 8:12:18 AM UTC+3, Urvang Joshi wrote:
Hi,
Yes, WebP has a support for animation. You can create animated WebP images using the WebPMux library/binary as follows:
(Make sure you have the 'cwebp' and 'webpmux' binaries).

(1) Convert all the JPEG images to WebP using the 'cwebp' binary. e.g.

for file in *.jpg; do cwebp ${file} -o ${file%.jpg}.webp; done

(2) Now, create an animated WebP image, from multiple WebP images created in step 1, using 'webpmux' binary.
For example, suppose you want to create an animation from 1.webp, 2.webp, 3.webp & 4.webp where
- Duration (in milliseconds) between frames is 100, 200, 300 & 400 respectively.
- Animation loops 1000 times
- Each frame has image offset (0,0) [that is, the top left pixel of each frame is located at (0,0)].
You can use the following command to achieve this:

webpmux -frame 1.webp +0+0+100 -frame 2.webp +0+0+200 -frame 3.webp +0+0+300 -frame 4.webp +0+0+400 -loop 1000 -o animation.webp

Hope this helps.

-Urvang

On Sun, Apr 15, 2012 at 11:23 PM, Spineanu Radu <radu.s...@gmail.com> wrote:
Hi!

From what I read webp supports animation. Given a set of X jpg images
how can I convert them to an animated webp?

-R.

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-d...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webp-discuss/?hl=en.


Pascal Massimino

unread,
Aug 28, 2019, 10:42:25 AM8/28/19
to WebP Discussion
Hi,

On Wed, Aug 28, 2019 at 4:33 PM <ankara...@gmail.com> wrote:
Hi, Is there a way to make an animated .webp from thousands of files? I made a python script that uses the command line tools but the command line gets very long (I am trying to make a 1800 frame animation) and I always get a long command line error.

This use case is exactly why most of the webp tools can take a single text file as sole argument!

For instance, you can put the arguments into a single text file and pass this file's name to webpmux.
Here's what 'webpmux -h' has to say:

[...]
Note: if a single file name is passed as the argument, the arguments will be
tokenized from this file. The file name must not start with the character '-'.


And same for 'img2webp' tool:

[...]
img2webp  compresses  a  sequence  of images using the animated WebP format.  Input images can either be PNG, JPEG, TIFF or WebP.  If a
single file name (not starting with the character '-') is supplied as the argument, the command line argument  are  actually  tokenized
from this file.  This allows for easy scripting or using large number of arguments.

hope it helps,
skal/

To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.
Reply all
Reply to author
Forward
0 new messages