webmproject / WebPShop

Photoshop plug-in for opening and saving WebP images
https://developers.google.com/speed/webp/docs/webpshop
Apache License 2.0
1.48k stars 125 forks source link

Adobe After Effects / Adobe Media Encoder support? #53

Open mathiasbynens opened 2 years ago

mathiasbynens commented 2 years ago

This is a newbie question, so please feel free to close this.

What would it take to add (animated) WebP support to Adobe After Effects or Adobe Media Encoder? Is that something this plugin could be extended to do, or would that be an entirely separate project?

y-guyon commented 2 years ago

There seem to be a C++ SDK for Adobe After Effects here similar to the Photoshop one, so there should be not so much work into adapting the current WebPShop plugin from Photoshop to After Effects.

I do not plan on tackling this but feel free to give it a try. Be aware that Adobe started implementing WebP support: the latest Photoshop version has partial native WebP support. I do not have information about other products and I doubt there is any public roadmap.

Santy4tas commented 1 year ago

Just to annotate. For me, the WebP support from Adobe doesn't work to create Whatsapp Sticker Pack. In my case when I export the WebP file using the Adobe option, the sticker pack fail to load in Whatsapp, it says "One of the stickers in this sticker pack has an invalid asset". On the other hand, if I use the WebShop option while exporting the .webp file from Photoshop, my sticker pack load PERFECTLY in Whatsapp.

It would be great if you create the plugin to export animations from After Effects in order to created animated .webp files and use them to create sticker packs for Whatsapp. Even if Adobe adds the WebP support for After Effects, I think it will not work properly.

y-guyon commented 1 year ago

@Santy4tas Thank you for this information. Could you share here a valid and an invalid .webp files generated by WebPShop and natively by Photoshop? It would be interesting to find what is the difference that is considered incorrect by WhatsApp.

Santy4tas commented 1 year ago

@Santy4tas Thank you for this information. Could you share here a valid and an invalid .webp files generated by WebPShop and natively by Photoshop? It would be interesting to find what is the difference that is considered incorrect by WhatsApp.

@y-guyon Of course. I've created this simple 3 Sticker pack for Whatsapp in .wastickers format which is the format I use to open the file with Sticker Maker Studio App and load the stickers to Whatsapp then. This app is available both iOS and Android. In iOS by Tamara Vardanyan creator and in Android by Viko & Co.

To take into consideration, I made sure all the stickers comply with the parameters of file size (less than 100KB). You can change the .wastickers format to .zip and check the content and the file size for each WebP file. Both packs have WebP files of course, but just one was created with WebPShop, the other one was created using the native WebP format recently implemented by Adobe in Photoshop.

You can try to import each pack to your Whatsapp and check if it appears the same error that I see.

You can download the ZIP file that contain the two packs right here: Christmas Sticker Pack.zip

Santy4tas commented 1 year ago

@Santy4tas Thank you for this information. Could you share here a valid and an invalid .webp files generated by WebPShop and natively by Photoshop? It would be interesting to find what is the difference that is considered incorrect by WhatsApp.

I forgot to mention that I made sure the "Include Metadata" option was UNCHECK for both, WebpShop and WebP Adobe native.

jzern commented 1 year ago

Thanks for the files. Photoshop adds a non-standard chunk to the file, so I wonder if this is the issue. Whatsapp technically should ignore it, but could you try the stickers in the attached archive to see if they work?

Without WebPShop - Strip Unknown Chunk.zip

Santy4tas commented 1 year ago

Thanks for the files. Photoshop adds a non-standard chunk to the file, so I wonder if this is the issue. Whatsapp technically should ignore it, but could you try the stickers in the attached archive to see if they work?

Without WebPShop - Strip Unknown Chunk.zip

Lotto!, It seems that you have discovered the problem. The sticker pack worked perfectly for me. We can confirm that the native WebP format of Photoshop has a problem with the chunk. Maybe Adobe will fix it in further updates.

Even though, I still preferring WebPShop because I can see in the preview windows before the exportation, the file size and the visual preview of the sticker which is very helpful specially when you're creating animated stickers.

Thank you my friend!

jzern commented 1 year ago

I'm glad it worked for you. Credit goes to @twpinkerton who made the suggestion. Hopefully we can connect with WhatsApp engineers to figure out the reason for the failure.

jzern commented 1 year ago

For the record I used webpmux to copy the files. It's more of a bug rather than a feature, but currently it will strip unknown chunks when doing a copy:

for f in [123].webp; do webpmux -frame $f +1 -o copy/$f; done