Closed mattdesl closed 4 years ago
I've had success simply adding the gif demuxer/decoder/encoder flags in the Makefile, if you're able to build this yourself. Just add gif
to COMMON_DEMUXERS
, COMMON_DECODERS
, and to make things easy on yourself, just add it to WEBM_MUXERS
and WEBM_ENCODERS
as they'll be included in both builds.
If you wanted a gif only build, you could go down that road probably with only the Makefile, removing what you don't want, just be careful not to remove any dependencies ffmpeg needs in general (there aren't many, you could probably just start removing stuff until it breaks :P).
I know this isn't a "here's your javascript file" answer, but it's very doable, the Makefile is quite clean and simple. Only hard part is getting emscripten to work properly, as I think some recent versions have an issue that the current source isn't handling. (It's an issue on this repository, though I can't find it).
Anyway, all those flags will be available if you add gif
to the ffmpeg build.
what is the decoder you use? I tried seeing what giphy did, but couldn't figure it out.
@Kagami rebuild this package with gif option?
Yes.
thank you! what option is that? can you show an example command? Do i just use -f gif
? Is it built in? Do I need a special decoder?
I'd love to be able to encode high quality GIF on the client-side with WASM ffmpeg. Right now the pure-JS GIF encoding solutions are pretty slow and don't produce the same high quality as ffmpeg.
I wonder if you'd consider adding a GIF only build?
Here's a couple articles on what flags are used in high quality ffmpeg GIFs: