.ie \n(.g .ds Aq \(aq .el .ds Aq ' .TH "ipbt" "1" "2007\(hy04\(hy19" "Simon\ Tatham" "Simon\ Tatham" .SH "NAME" .PP \fBipbt\fP - play back tty recording files with random access .SH "SYNOPSIS" .PP .nf \fBipbt\fP\ [\ \fIoptions\fP\ ]\ \fIfile\fP\ [\ \fIfile\fP\ ...\ ] .fi .SH "DESCRIPTION" .PP \fBipbt\fP is a \fBcurses\fP-based playback utility for recordings of terminal sessions in either \fBttyrec\fP or \fBnh-recorder\fP format. .PP \fBttyrec\fP and \fBnh-recorder\fP are both programs which record the output of a terminal session, interspersed with timestamps. This allows the session to be replayed on another terminal at the original speed, so that the replaying terminal screen looks identical to the original, provided the recording and replaying terminals are sufficiently compatible. \fBttyrec\fP and \fBnh-recorder\fP produce differently formatted files, but the principle is very similar. .PP To replay a tty recording in a forward direction, a program such as \fBttyplay\fP will simply write the contents of the file to the output terminal, stopping to wait for the appropriate period every time it encounters a timestamp. Speeding up, slowing down and pausing the replay are easy. Rewinding, however, is almost impossible with this replay architecture. .PP \fBipbt\fP solves this by running the entire tty recording through an internal terminal emulator and storing the resulting screen contents in a manner that permits random access. Once this loading process is complete, \fBipbt\fP can play forwards and backwards, or jump to an arbitrary point in the recording, with equal ease. .PP This flexibility comes with two disadvantages: .IP "\fB\(bu\fP" \fBipbt\fP takes noticeable time to load a tty recording in the first place. At the time of writing this, it typically takes a few seconds per megabyte of input. Simpler programs such as \fBttyplay\fP can begin playing instantly. .IP "\fB\(bu\fP" Since \fBipbt\fP does its terminal emulation internally, it can support only one type of terminal, namely that provided by PuTTY (of which \fBipbt\fP is a derived work). Any tty recording which is not compatible with that terminal type will not come out looking right. Simpler programs such as \fBttyplay\fP rely on the terminal they are running in to interpret the terminal control sequences, so they can be made to support any terminal type simply by running them in that type of terminal. .PP If either of these is a serious problem, you probably don't want to be using \fBipbt\fP. .SH "OPTIONS" .PP By default, \fBipbt\fP interprets tty recordings as if they were intended to be replayed on an 80\(mu24 screen. You can alter this using the following options: .IP "\fB-w\fP \fIwidth\fP" Set the width of the emulated terminal to \fIwidth\fP columns. .IP "\fB-h\fP \fIheight\fP" Set the height of the emulated terminal to \fIheight\fP rows. .IP "\fB-u\fP" Set the width and height of the emulated terminal to be the same as that of the real terminal in which you are running \fBipbt\fP. .PP By default, \fBipbt\fP will attempt to analyse the input files and automatically guess whether they are in \fBttyrec\fP or \fBnh-recorder\fP format. On rare occasions this automatic guessing may fail: for example, a \fBttyrec\fP made on a system whose clock occasionally jumps backwards may contain timestamps in non-increasing order, in which case \fBipbt\fP may consider the file not to be a valid \fBttyrec\fP and either try to interpret it as \fBnh-recorder\fP format or (more likely) refuse to load it at all. If this happens, you will need to explicitly tell \fBipbt\fP what type of file it is dealing with using the following options: .IP "\fB-T\fP" Specify that all files appearing on the command line after this point (until a subsequent format-specifying option) should be assumed to be in \fBttyrec\fP format. .IP "\fB-N\fP" Specify that all files appearing on the command line after this point (until a subsequent format-specifying option) should be assumed to be in \fBnh-recorder\fP format. .PP \fBipbt\fP also provides the following miscellaneous options: .IP "\fB-f\fP \fIframe\fP" After loading the tty recordings, jump to the specified frame number. Frame numbers are allocated starting from zero, as if all the input files were concatenated; so if you provided two input files, one with 100 frames and one with 50, then frame numbers 0-99 would indicate positions in the first file and frame numbers 100-149 would indicate positions in the second. .IP "\fB-P\fP" After loading the tty recordings, terminate immediately. This option is unlikely to be very useful at present, although it might have specialist uses for people wanting to measure \fBipbt\fP\*(Aqs loading speed or test its automatic format detection. .IP "\fB-U\fP" Treat the input terminal data as being encoded in UTF-8. .RS .PP If \fBipbt\fP has been compiled against the \fBncursesw\fP library and is running in a UTF-8 terminal, it will reproduce the Unicode characters in the input file as faithfully as it can. If not, it will at least try to reproduce as many of the characters as it can on whatever terminal it does have. .RE .SH "PLAYING" .PP Once \fBipbt\fP has loaded a set of tty recordings, it enters a full-screen playing mode. This section describes the keypresses which control the player. .PP To terminate the player, press `\fBq\fP', or Control-C. .PP Press `\fBp\fP' or `\fBs\fP' to toggle between pause and play mode. The player starts up in pause mode, so you may well want to press this immediately to begin playing. .PP To go back by one frame, press `\fBb\fP' or `\fB<\fP'. To go back by many frames, type a number followed by `\fBb\fP' or `\fB<\fP'. .PP To go forward by one frame, press the space bar or `\fB>\fP'. To go back by many frames, type a number followed by the space bar or `\fB>\fP'. .PP To jump to a particular frame number, type the number followed by `\fBg\fP'. Pressing `\fBg\fP' on its own will jump to the start of the recording. .PP Pressing \fIcapital\fP `\fBG\fP' will jump to the \fIend\fP of the recording. If you type a number followed by `\fBG\fP', it will jump to that many frames \fIbefore\fP the end. .PP To play back the recording at higher speed, type a number followed by `\fBx\fP'. For example, typing `\fB3x\fP' will set the player to three times normal speed. (This will not automatically bring you out of pause mode; you still need to press `\fBp\fP' or `\fBs\fP' for that.) .PP To play back at a \fIlower\fP speed, type a number followed by \fIcapital\fP `\fBX\fP'; for example, `\fB3X\fP' will set the player to one-third normal speed. .PP To return to normal speed, you can type `\fB1x\fP' or `\fB1X\fP', or just `\fBx\fP' or `\fBX\fP'. .PP If you press `\fBl\fP', the player will toggle logarithmic time compression. This is a mode in which the delay between frames is scaled in a non-linear fashion: small delays are changed very little, but extremely large delays are made significantly less large, so that an hour between frames in the original recording becomes only about eight seconds, a day becomes eleven, and even a \fIyear\fP between frames would become around seventeen seconds. This is helpful if the person who made the recording left the terminal for a long time in the middle of their session. Logarithmic mode can be used in conjunction with the `\fBx\fP'/`\fBX\fP' scaling feature. .PP If you press `\fBo\fP', the player will show an on-screen display near the top left of the screen, showing the current frame number and playback settings. Press `\fBo\fP' again to make the display go away. .PP You can also search the recording for a frame in which a particular piece of text appears on the screen. Press `\fB/\fP' to search forwards from the current position, or `\fB\e\fP' or `\fB?\fP' to search backwards. Each of these commands will cause \fBipbt\fP to prompt for a piece of text to find, and will then search for a frame that contains that text. Press `\fBn\fP' to search for the same piece of text again in the same direction. .SH "BUGS" .PP \fBipbt\fP\*(Aqs internal terminal emulation is that of PuTTY, but its display of the resulting data is rather more simplistic. Some output features supported by PuTTY are therefore not supported by \fBipbt\fP .PP For example, \fBxterm\fP 256-colour mode is not supported at all. .PP Also, \fBipbt\fP\*(Aqs Unicode support does not currently handle various Unicode complications such as characters outside the Basic Multilingual Plane, double-width CJK characters, right-to-left scripts, or combining characters. .PP (Patches or help from people who know how to persuade \fBncursesw\fP to do any or all of those things would be welcome!) .SH "LICENCE" .PP \fBipbt\fP is free software, distributed under the MIT licence. Type \fBipbt --licence\fP to see the full licence text.