Opened 9 years ago

Last modified 4 months ago

#4907 open enhancement

Support decoding animated WebP images

Reported by: Urvang Joshi Owned by: Artem
Priority: wish Component: avcodec
Version: git-master Keywords: webp
Cc: shaunspiller@gmail.com, pcgeek86@gmail.com, k.bumsik@gmail.com, me@jozen.blue, irdroid3@gmail.com, xanashi@gmail.com, Zipdox, nbryskin, junk, Thomas, Kelly Clowers Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
Currently, FFmpeg can encode animated WebPs, but cannot decode them, which is inconvenient for users.

Decoding animated WebPs right now generates "image data not found error" due to "unsupported chunk": https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/webp.c#L1504

How to reproduce:
(example input image: https://www.gstatic.com/webp/animated/1.webp)

% ffmpeg -i 1.webp 1.gif
ffmpeg version N-75787-g1d4af04 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: --enable-libwebp
  libavutil      55.  2.100 / 55.  2.100
  libavcodec     57.  4.100 / 57.  4.100
  libavformat    57.  3.100 / 57.  3.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 10.100 /  6. 10.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
[webp @ 0x3782940] image data not found
[webp_pipe @ 0x3781360] decoding for stream 0 failed

< Rest of the output truncated >

Attachments (5)

1.webp (371.9 KB ) - added by Urvang Joshi 9 years ago.
An animated WebP image
animated.webp (36.5 KB ) - added by Josef Zlomek 4 years ago.
Another animated WebP image (RGB)
GP_G8eEAkCHHOP3W.webp (66.6 KB ) - added by Josef Zlomek 4 years ago.
Another animated WebP image (YUV)
test_webp_js.webp (1.3 MB ) - added by Josef Zlomek 4 years ago.
Non-animated WebP image
test.webp (149.7 KB ) - added by Josef Zlomek 4 years ago.
Animated WebP image (YUV) with transparent black surroundings of the object

Download all attachments as: .zip

Change History (35)

by Urvang Joshi, 9 years ago

Attachment: 1.webp added

An animated WebP image

comment:1 by Carl Eugen Hoyos, 9 years ago

Keywords: webp added
Priority: normalwish
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

comment:2 by nobody, 5 years ago

Cc: shaunspiller@gmail.com added

comment:3 by pcgeek86, 5 years ago

Cc: pcgeek86@gmail.com added

comment:4 by Josef Zlomek, 4 years ago

Cc: josef@zlomek.net added

comment:5 by Josef Zlomek, 4 years ago

Is anybody working on this? I am thinking that I would eventually implement this but do not want to duplicate work.

by Josef Zlomek, 4 years ago

Attachment: animated.webp added

Another animated WebP image (RGB)

by Josef Zlomek, 4 years ago

Attachment: GP_G8eEAkCHHOP3W.webp added

Another animated WebP image (YUV)

by Josef Zlomek, 4 years ago

Attachment: test_webp_js.webp added

Non-animated WebP image

comment:6 by Josef Zlomek, 4 years ago

I am finishing the implementation.

by Josef Zlomek, 4 years ago

Attachment: test.webp added

Animated WebP image (YUV) with transparent black surroundings of the object

comment:7 by Josef Zlomek, 4 years ago

Cc: josef@zlomek.net removed

comment:8 by Bumsik Kim, 4 years ago

Cc: k.bumsik@gmail.com added

in reply to:  6 comment:9 by Zennn, 4 years ago

Replying to jzlomek:

I am finishing the implementation.

Has this been implemented yet?

comment:10 by Zennn, 4 years ago

Cc: me@jozen.blue added

comment:11 by Ian Dawson, 4 years ago

Cc: irdroid3@gmail.com added

comment:12 by Grey, 4 years ago

Cc: xanashi@gmail.com added

comment:14 by Rm Beer, 3 years ago

Another file with the same problem:
https://0x0.st/-FzA.webp - (Link only available in less of 1 year)

comment:15 by Wladimir Leite, 3 years ago

Any update on this?

comment:16 by Zipdox, 3 years ago

Cc: Zipdox added
Priority: wishimportant

I propose setting the priority to important. Not being able to decode animated WebP is a huge problem for projects that use FFmpeg for thumbnail generation and image/video scaling.

comment:17 by Carl Eugen Hoyos, 2 years ago

Priority: importantwish

in reply to:  17 ; comment:18 by Qian Chang, 2 years ago

Replying to Carl Eugen Hoyos:
I also suggest changing this priority to important. Our service also has lots of webp animated images and ffmpeg failed to handle them. Kill please help to get this prioritized. Need this badly.

in reply to:  17 comment:19 by Qian Chang, 2 years ago

Replying to Carl Eugen Hoyos:
I also suggest changing this priority to important. Our service also has lots of webp animated images and ffmpeg failed to handle them. Kill please help to get this prioritized. Need this badly.

in reply to:  18 comment:20 by Balling, 2 years ago

Replying to Qian Chang:

Replying to Carl Eugen Hoyos:
I also suggest changing this priority to important. Our service also has lots of webp animated images and ffmpeg failed to handle them. Kill please help to get this prioritized. Need this badly.

We do not look into priority. And not bugs can only be tagged as wish.

comment:21 by nbryskin, 2 years ago

Cc: nbryskin added

comment:22 by Artem, 2 years ago

Owner: set to Artem

I also suggest making this a priority.
I want to decode webp to mp4 also web to images

comment:23 by junk, 2 years ago

Cc: junk added

comment:24 by pema99, 15 months ago

Still need this :(

comment:25 by Thomas, 15 months ago

Cc: Thomas added

comment:26 by Kelly Clowers, 13 months ago

Cc: Kelly Clowers added

comment:27 by linleo345, 10 months ago

anyone currently working on this? I just started writing some code for this

comment:28 by Jozef Chutka, 8 months ago

I seem to have created duplicated ticket on https://trac.ffmpeg.org/ticket/10934 . Linking it here for more details and in case its closed.

comment:29 by Thilo Borgmann, 8 months ago

@linleo345: There is work being done on it, see the ffmpeg-devel

in reply to:  29 comment:30 by se7enxf, 4 months ago

Is anyone still working on this?

Note: See TracTickets for help on using tickets.