lionleaf / dwitter

Social network for short js demos
https://www.dwitter.net
Apache License 2.0
763 stars 69 forks source link

Gif creation performance improvements possible? #333

Open lionleaf opened 6 years ago

lionleaf commented 6 years ago

The processing of gifs takes a while. I'm curious to know exactly where that time goes and if there are ways we could speed it up a bit.

iver56 commented 6 years ago

Looks like the GIF is rendered in Full HD. That's pretty large for a GIF. My gut feeling is that the processing would be a lot faster if the captured frames are resized to something smaller early in the processing pipeline.

BalintCsala commented 6 years ago

@iver56 Some dweets use 1 pixel wide lines, when you resize those, they become a mess

iver56 commented 6 years ago

I guess that depends on the image scaling algorithm. Do you have examples of such problematic dweets?

sigvef commented 6 years ago

Using MediaRecorder to make .webm movies instead of gifs is probably quite a bit faster (and produces smaller files with better quality :D )

BalintCsala commented 6 years ago

It has a bad support across browsers, mainly for Edge and Safari

BalintCsala commented 6 years ago

It would work with the GIF recorder as a fallback

joeytwiddle commented 5 years ago

http://capjs.3d2k.com/ has a pretty good implementation