Can webp animations be streamed?

549 views
Skip to first unread message

Dima

unread,
Mar 4, 2025, 8:47:58 AM3/4/25
to WebP Discussion
Hi all, right now I'm developing a project using webp animations on embedded chip, so I have pretty strict memory limitations. As decoding library I'm using libwebp, and I've come across the problem that as far as I could see, there's no way to init WebPAnimDecoder and start playing the animation without having full webp file in the buffer.

Are there any workarounds that can be used?
Thanks in advance!

James Zern

unread,
Mar 12, 2025, 6:39:14 PM3/12/25
to webp-d...@webmproject.org
Hi,

On Tue, Mar 4, 2025 at 5:48 AM Dima <gore...@gmail.com> wrote:
Hi all, right now I'm developing a project using webp animations on embedded chip, so I have pretty strict memory limitations. As decoding library I'm using libwebp, and I've come across the problem that as far as I could see, there's no way to init WebPAnimDecoder and start playing the animation without having full webp file in the buffer.

Are there any workarounds that can be used?

To do this you will need to use the libwebpdemux interface along with the decoder (incremental or otherwise). The demuxer has a  WebPDemuxPartial() function [1] that can be used for this purpose. Note your application will also need to handle the composition (blending / disposal) of the image to the full canvas. Chrome uses this method [2].
The only limitation to the WebPDemuxPartial() function is that it will reparse the buffer provided. There is no way to continue demuxing at this point. It would be possible to do this, and has come up in the context of Chrome in the past, but it hasn't been a priority.
 
Thanks in advance! 

James Zern

unread,
Mar 13, 2025, 2:23:50 PM3/13/25
to webp-d...@webmproject.org
On Wed, Mar 12, 2025 at 3:38 PM James Zern <jz...@google.com> wrote:
Hi,

On Tue, Mar 4, 2025 at 5:48 AM Dima <gore...@gmail.com> wrote:
Hi all, right now I'm developing a project using webp animations on embedded chip, so I have pretty strict memory limitations. As decoding library I'm using libwebp, and I've come across the problem that as far as I could see, there's no way to init WebPAnimDecoder and start playing the animation without having full webp file in the buffer.

Are there any workarounds that can be used?

To do this you will need to use the libwebpdemux interface along with the decoder (incremental or otherwise). The demuxer has a  WebPDemuxPartial() function [1] that can be used for this purpose. Note your application will also need to handle the composition (blending / disposal) of the image to the full canvas. Chrome uses this method [2].
The only limitation to the WebPDemuxPartial() function is that it will reparse the buffer provided. There is no way to continue demuxing at this point. It would be possible to do this, and has come up in the context of Chrome in the past, but it hasn't been a priority.

The discussion related to Chrome I was thinking about happened in a bug [3].

Xu Yong

unread,
Dec 29, 2025, 9:13:21 PM (12 days ago) 12/29/25
to WebP Discussion, James Zern
  Hi,
I am currently working on a project that involves WebP animation playback on an embedded platform with extremely constrained memory resources. Have you already addressed or solved the challenge of streamlined (low-memory) decoding?
Any suggestions or experiences you could share would be greatly appreciated.  

Stephen Varthas

unread,
Dec 29, 2025, 9:16:31 PM (12 days ago) 12/29/25
to webp-d...@webmproject.org, James Zern
why im i getting these email stop testing .io tech on people thats a major voilation to peoples privacy your experimenting on humans u animals

--
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 view this discussion visit https://groups.google.com/a/webmproject.org/d/msgid/webp-discuss/05eb75ae-865e-4fc9-9c82-d1e6d2f14532n%40webmproject.org.

Stephen Varthas

unread,
Dec 29, 2025, 9:17:50 PM (12 days ago) 12/29/25
to webp-d...@webmproject.org, James Zern
who are you replying to Tim Zetah hes enslaving people i promise he will be exposed Tim stop recruting people to kill me Steve V 

On Mon, Dec 29, 2025 at 9:13 PM Xu Yong <zqx...@gmail.com> wrote:
--
Reply all
Reply to author
Forward
0 new messages