News for hackers. Stuff that matters.
Re:Time.gif by oxymoron on Saturday August 12, 2017 @03:48AM (#14996905)
I did the same thing about fifteen years ago by generating a mJPEG stream from a PHP-script. As far as I can remember, it seemed more reliable than using GIF. See https://en.wikipedia.org/wiki/Motion_JPEG
Re:Time.gif by jbochi on Saturday August 12, 2017 @09:01AM (#14997728)
MJPEG is indeed much better for this. It uses less bandwidth (GIFs have no compression) and less browser memory (old frames can be discarded). When I was at globo.com, we developed this to serve animated thumbnails for live video streams: https://github.com/jbochi/live_thumb
Re:Time.gif by Tepix on Saturday August 12, 2017 @10:40AM (#14998029)
GIF features lossless LZW compression.
Re:Time.gif by icebraining on Saturday August 12, 2017 @04:04AM (#14996957)
The main advantage is that, because a video format rather than an image that can loop, the player can discard past frames. The GIF method is probably constantly leaking memory.
Re:Time.gif by dom0 on Saturday August 12, 2017 @05:16PM (#15000017)
> The GIF method is probably constantly leaking memory.

If the browser only keeps compressed frames, 16 GB will last for more than a year.

Re:Time.gif by tylerhou on Saturday August 12, 2017 @04:11AM (#14996977)
GIFs can be non looping, but I'm not sure whether that flag is set at the beginning or end of the format.
Re:Time.gif by LoSboccacc on Saturday August 12, 2017 @04:35AM (#14997055)
yeah was wondering at what point chrome would give up, but the gif is only around 250kb per minute (0.004Mb/s)