glitu

Slow computers

Present on an old or slow computer without a browser, with a PDF in pdfpc or with glitu-play, the native player that keeps the arrows drawn step by step and the terminals typing.

A glitu presentation runs in a browser, and on an old netbook, the browser is what becomes too slow: the page lays out, blurs, shades and animates every slide. On such a computer, present without it. glitu prepares the presentation on another computer (the export needs Chromium), and the slow one only shows pictures:

PDF + pdfpcglitu-play
What is installed on the slow computera PDF reader: pdfpc, mupdf, zathura…glitu-play (4 MB, no browser)
Stepsone page per clickone picture per click
skemo arrows drawn step by stepno, they appearyes
Terminal recordings typingno, the result appearsyes
Speaker notes, timeryes, in pdfpcyes, s or --speaker

The pictures are those of the browser, pixel for pixel: the slide looks the same as in the browser.

Export at the screen's size

Find the size of the slow computer's screen (xrandr on Linux), and export the pictures at its width with --width. The pictures are then shown as they are, without being resized while you present, and the files are lighter. For a 1024 × 600 screen and 16:9 slides:

glitu build pdf slides.md --clicks --width 1024 -o talk.pdf    # PDF
glitu build play slides.md --width 1024 -o talk.glituplay     # glitu-play
glitu build video slides.md --width 1024 -o talk.mkv          # glitu-play, through mpv

With slides of another shape (for example 4:3 on a 16:9 screen), choose the width that fits the height: a 960 × 700 slide on a 1024 × 600 screen is 823 pixels wide.

A PDF, presented with pdfpc

--clicks makes one page per click, each a picture: a PDF reader only has to show it, which even a slow processor does at once. The pages of one slide carry the slide's number, so the readers that use page labels count slides, not clicks.

pdfpc (apt install pdfpc) adds the speaker view on a second screen: the current and the next slide, the notes, a timer. glitu writes the notes into talk.pdfpc, beside talk.pdf; keep the two files together.

pdfpc talk.pdf          # the presentation on the projector, the speaker view on the laptop
pdfpc -s talk.pdf       # the other way round
mupdf talk.pdf          # or any reader, full screen (mupdf: f)

Without --clicks, the PDF is printed as vectors: its text can be selected, but a slow computer has to draw each page, and the steps are lost. For presenting, prefer --clicks.

glitu-play, the native player

glitu-play is a small program, separate from glitu, that presents the .glituplay file written by glitu build play without a browser. It shows the pictures of the clicks, and animates by itself only what moves:

  • the skemo arrows drawn step by step: the browser's own pixels revealed along the arrow, then its head, as in the browser;
  • the terminal recordings: the typing recorded during the export, image by image, at its pace;
  • the other changes of a click fade in; the next slide fades over the previous one.

The last picture of each animation is exactly the browser's. Only the area that changes is redrawn, by software: no graphics card is needed.

glitu-play talk                  # full screen
glitu-play talk --window         # in a window
glitu-play talk --start 12       # from slide 12
glitu-play talk --speaker        # with the speaker view
KeyAction
→ ↓ Space Enter Page Down n, clickNext
← ↑ Backspace Page Up pPrevious
Home, EndFirst, last click
f, F11Full screen
EscLeave full screen
sSpeaker view: open, close
t, rTimer: pause or resume, back to zero
+, -Size of the notes
qQuit

A click during an animation ends it and goes to the next one. Going back shows the previous click at once.

The speaker view opens in a second window: the current click and the next one, the notes, the slide and its click, and a timer that starts at the first click forward. With two screens it goes full screen on the other one; with --speaker, the slides go to the secondary screen and the view to the primary one (the laptop's). The keys work in both windows.

The directory holds one PNG per click (and a few more for the arrows and the terminals), and a deck.json that describes them; copy the whole directory to the slow computer.

Install glitu-play on Linux (X11 or Wayland, glibc 2.28 and later), into ~/.local/bin, SHA-256 checked:

curl -fsSL https://glitu.net/install-play.sh | sh

On Windows, take glitu-play-windows-x86_64.exe from the releases. Elsewhere (macOS…), build it from the sources of glitu with cargo build --release -p glitu-play.

A video, presented with mpv

glitu build video records the presentation as a video, one chapter per click (see Export). Everything is played as it was recorded, transitions and zooms included: the slow computer only decodes a video, often with its graphics chip.

glitu-play talk.mkv               # full screen; --window, --start <slide>

glitu-play recognises the video and presents it with mpv, which must be installed: the video pauses at each click, and the keys are those of glitu-play (→ Space Enter PageDown next, ← PageUp previous, Home End, f full screen, q quit). c switches to continuous play, without the pauses, for a stand. There is no speaker view yet: the notes are in the video's subtitle track notes.

Without glitu-play

The pauses come from a script for mpv, which glitu-play carries and gives to mpv. To use mpv on its own, write the script into a file:

glitu-play --mpv-script > glitu.lua
mpv --script=glitu.lua --fs --no-osc talk.mkv

Or copy glitu.lua into mpv's scripts folder (~/.config/mpv/scripts/ on Linux and macOS, %APPDATA%\mpv\scripts\ on Windows): it then acts on every glitu video, recognised by the tag GLITU_PLAY that glitu build video writes, and leaves the other videos alone.

In VLC or any other player, the video plays from start to end; its chapters are the clicks (VLC: Playback → Chapter).

What is not there yet

  • In glitu-play: the animated backdrop (it is still), animated code and animated slides (they fade), drawing on the slides.
  • Rendering with the graphics card in glitu-play, which can be turned off.
  • For a video: a speaker view, the sound of the videos of the slides.