Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIF Encoding? #66

Open
mattdesl opened this issue Oct 9, 2018 · 2 comments
Open

GIF Encoding? #66

mattdesl opened this issue Oct 9, 2018 · 2 comments

Comments

@mattdesl
Copy link

@mattdesl mattdesl commented Oct 9, 2018

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:

@Solarswordsman

This comment has been minimized.

Copy link

@Solarswordsman Solarswordsman commented Jan 4, 2019

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.

@goatandsheep

This comment has been minimized.

Copy link

@goatandsheep goatandsheep commented Dec 30, 2019

what is the decoder you use? I tried seeing what giphy did, but couldn't figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.