3 ms·
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. S
by oxymoron 9y ago
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 https://en.wikipedia.org/wiki/Motion_JPEG
- icebraining 9y agoThe 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.
- tylerhou 9y agoGIFs can be non looping, but I'm not sure whether that flag is set at the beginning or end of the format.
- LoSboccacc 9y agoyeah was wondering at what point chrome would give up, but the gif is only around 250kb per minute (0.004Mb/s)
- dom0 9y ago> The GIF method is probably constantly leaking memory. If the browser only keeps compressed frames, 16 GB will last for more than a year.
- jbochi 9y agoMJPEG 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 https://github.com/jbochi/live_thumb
- Tepix 9y agoGIF features lossless LZW compression.