This is better: <a href="https:&#x2F;&#x2F;github.com&#x2F;videlalvaro&#x2F;gifsockets" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;videlalvaro&#x2F;gifsockets</a> - it&#x27;s event based so doesn&#x27;t tie up lots of memory while running and doesn&#x27;t stop after 30 frames.