ekisu / mpv-webm

Simple WebM maker for mpv, with no external dependencies.
MIT License
576 stars 33 forks source link

Webp #124

Open ghost opened 3 years ago

ghost commented 3 years ago

I'd like to request that this script Webp Generator (or a similar functionality) be added as an output option.

Many websites have now ditched gif for webp, so it would be a useful option to have.

Vzaa commented 3 years ago

I can maybe take a look at it if I have free time next week

Vzaa commented 3 years ago

Getting this to work might be easy actually. I prepared a version in a few minutes that hardcodes the quality setting to 80 and uses the default options. I tried creating a WebP file and it played OK on Firefox for me at least. It doesn't loop the video.

https://github.com/Vzaa/mpv-webm/commit/f1a75c297c3db129d2c322589b8f99a05f0301c8

There's a build if you'd like to try it: https://github.com/Vzaa/mpv-webm/releases/download/latest/webm.lua

ghost commented 3 years ago

@Vzaa Thank you Can confirm it works well Does webp need its own quality settings or is it using the same file size target as webm?

ghost commented 2 years ago

@Vzaa It seems the webp produced does not loop, can you check and see why that is? it only plays once when played in a web browser

Vzaa commented 2 years ago

Sorry I forgot about this. I will take a look at it and maybe also try to answer your other questions when I have the time; and hopefully prepare a "PR ready" change for this if it comes out well together.

Vzaa commented 2 years ago

@horusra You can try the new build that now has the "--ofopts-add=loop=0" option. It should loop now:

https://github.com/Vzaa/mpv-webm/releases/download/latest/webm.lua

ghost commented 2 years ago

@Vzaa Can confirm it loops now. Thank you!