Troubleshooting
Problems exporting and recording, and what causes them.
ffmpeg
MP4, WebM, and WebP need ffmpeg on your PATH. Export checks first, and fails at once. Builds without libwebp are common, so WebP can fail where MP4 works:
ffmpeg -encoders | grep -E 'libwebp|libx264|libvpx-vp9'To use a specific binary, pass sink.WithFFmpeg(path) in Profile.Encode.
ErrRawOutput
A profile with Redact, RedactInputs, or Hide can't also write .cast, which would keep what they hide. Write the .cast in a separate export, and keep it private.
A mark isn't found
Between returns a NoMarkError for a label it can't find, and effects that look for one report it after writing the outputs. reel.MissingMarks(err) separates these from other errors, for when a missing mark is fine. Check the label with reel info, or the inspector.
The export's first frame is blank
A program may write capability queries before its first paint, as Bubble Tea does. Open the session with reel.WithSkipPristine().
The last frame is blank
A program that clears the screen as it exits leaves a blank end, and a .png output draws that. Open the session with reel.WithSkipPristine(), which leaves out a bare terminal after the last paint, as it does before the first. A steep harness does this for you.
When the end isn't bare, such as when the program leaves its title set, mark the end before it quits and cut there with tl.Between("", "end").
Lines don't start at the left edge
With reel.WithoutONLCR(), LF moves down a row and keeps the column. A program that writes to the session directly and expects LF to start a new line then draws each line where the last one ended. Drop the option, so Session.Write adds the carriage return as a pseudo-terminal would.
Borders and dividers land at the left edge
Session.Write writes each LF as CR LF by default. A program that writes LF to mean only "down a row" draws a vertical run of cells at the left edge instead, such as Bubble Tea in your process on Windows, or a raw-mode program whose output you forward from a pseudo-terminal, such as over SSH. Open the session with reel.WithoutONLCR(). A steep harness does this for you on Windows.
Glyphs are boxes
The bundled fonts don't cover every glyph. See Fonts. WithFontFamilyName fails with the directories it searched, if a family can't be found.
Colors look wrong
A program that checks TERM may be choosing fewer colors. reel.Exec sets a color environment for the command, so pass cmd.Env if you need something else. For themes not applying, see The recording's colors.
Recording in a test
For tests, use steep, which handles the session, the waiting, and the export policy.
Last updated on