Historically, you could embed an animated .gif into a web page going back before Y2K, and there are tools to make such a thing from recording terminal sessions. No Javascript, no third party websites.
Those are pretty heavy unless it's only a second or two (then why would you need a gif at all?) You'll be further cutting your target audience to the extremely privileged. I've had to suffer with dial-up (3-4 KB/s) until 2009, and with shitty ADSL (15-30 KB/s) until 2013. Many parts of the world are still like that.
I have a here 90 second .gif I made a year ago (demo of a particular Vim syntax highlighting scheme for a commit message format). It contains 930 frames, 10 fps. The resolution is 1200x768. The .gif is 600.0 kilobytes, so the coding density is about 660 bytes per frame.
Someone downloading at 3-4KB/s might find the download annoying; on the other hand, it could play back on a 66 MHz 486 DX they found in the dumpster. Good luck bringing up a modern browser with Javascript.
4KB/s second would be enough to get it to average around 6FPS in the first pass through the animation, if it were being rendered as it is being downloaded.
> it could play back on a 66 MHz 486 DX they found in the dumpster.
ooh actually, I got banned from the Ars-Technica forums way back in the day for posting a giant 800x600 animated GIF. It took browsers a few minutes to render! People thought I had crashed their browsers, but they just needed to be patient. ;)
I think I had a Duron 700mhz back then, so a 486 would've been turned into toast.
(Or, possibly, IE's GIF code was just really bad at that time! :) )
You're clearly more careful with resource consumption than many, then. Many times I've had enough time to start coffee while waiting for a .gif to get through its first pass so I can usefully watch it, using rural satellite from Hughes. We're still using your stuff out here.
Was it a TTY animation with most frames changing very few pixels (like one character cell), often with quiescent periods when nothing changes due to nobody typing?
Gifs can do silly things, like store a sequence of full frames.
Hughes is latency-bound, not bandwidth bound. For it to take that long, they’d have to try really hard. For instance, the map could issue an http[s] request per frame.
If I had users who needed to be that engaged with the content, they would be the sort of target audience I could easily have run scriptreplay in a terminal.
(I see this more as a demo thing to show people what is possible than, say, documentation to crib from, but I can see the value in being able to do that.)
FWIW, iOS 15 automatically OCR’s screenshots, so now copy paste works again (even from non-selectable text in apps).
However, most times I have problems with copy paste, it’s not due to gif’s. It’s due to some BS framework thing rendering text in some non-standard way.
9 times out 10 if you need something to be shown in video it's better to use an mp4 and screen recorder rather than stick it in a gif. It's usually smaller too.
Is there some tool like this that you could recommend? I tried searching for one at one time for my project, assuming someone must have written something like that for the script command, but didn't seem to be able to find a reasonable one (or any? I don't recall). I ended up writing an ad hoc single use tool for gif-izing an asciinema transcript... (https://github.com/akavel/asciinema2gif)
I have no aversion to JavaScript. It's easier just to fetch the session as text and render it in the browser with JavaScript.
If you're building gifs then you need additional file storage and an async job queue for generating the gif. I try to avoid image processing personally.