-
Notifications
You must be signed in to change notification settings - Fork 1
a high-tech ttyrec player for Unix
License
jmazon/ipbt
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This tree contain my patches to Simon Tatham's excellent IPBT player. The main difference is what I'd call "autoplay" mode: instead of analyzing the whole movie file and starting playback only after that, playback starts immediately while the analysis is performed in the background. Activate using the -l option (for "lazy"). Take care that if you don't specify a filetype using -T or -N, it will still be autodetected by reading the whole file twice, which can be a bit confusing considering -l gives the impression of a stream reading mode. Enjoy! JBM Simon's original README below. ====================================================================== This directory contains `ipbt', a high-tech player for `ttyrec' files. `ttyrec' is a program similar to script(1): it records all the terminal output during a Unix terminal session. Unlike script, it writes timestamps into the output file as well as raw output data, so that the session can be played back at the original speed. It is commonly used for recording games of NetHack. The ttyrec recorder program can be found at http://namazu.org/~satoru/ttyrec/index.html.en Conventional ttyrec players are little more than a loop interspersing sleep(2) with write(2); it's easy to pause and fast-forward, and a particularly advanced player might be able to rewind by noticing screen clears and using them as marker points (since replay can be restarted reasonably safely from a screen clear), but precision single-step backward and forward motion is entirely beyond such an application. ipbt works by embedding a terminal emulator: it is essentially a derivative work of the PuTTY code base. The input file is read in full and run through the internal terminal emulator, and the resulting screen states are saved in an internal movie array in such a way that any screen state (`frame') can be retrieved efficiently. Once this is done, the player application simply displays a sequence of frames using libncurses; the user can perform the usual pause and speed adjustment operations, but can also jump to an arbitrary frame number and move backwards as well as forwards. The downside is that ipbt takes time to read the entire input file before starting. I've been testing it on an 8Mb ttyrec of a NetHack ascension; on a 1GHz Pentium III it takes about a minute to read the file. After that setup phase, however, playback is efficient. Current status of ipbt: * Basically works. * Amenities such as online help and proper documentation are not available yet. * Dependent on libncurses; uses the use_default_colors() extension function, which means it probably won't compile on other curses implementations without a bit of autoconf work. * Makefile is rudimentary at best. Porting work required. See the TODO file for a full list of desirable features. Proper documentation has yet to be written (as mentioned above), but here's a quick list of the available keystrokes during playback: * `q' (or `Q') quits ipbt. * Space moves on by a frame. Prefix it by a number to move on by multiple frames at a time. * `b' moves back by a frame. Prefix it by a number to move backwards by multiple frames at a time. * `o' toggles the on-screen display, which shows the current status of ipbt. * `L' toggles logarithmic time compression (designed to have little effect on small delays but massively compress long ones). * Typing a number followed by `x' causes play to proceed at that many times normal speed (e.g. `3x' means play at triple speed). Typing just `x' is equivalent to `1x': it restores normal speed. * `X' is like `x', but slows down rather than speeding up: `2X' means half speed and `3X' means one third speed. `X' on its own restores normal speed, just like `x'. * `g' jumps to the beginning of the animation. Prefixing a number jumps to a particular frame. * `G' jumps to the end of the animation. Prefixing a number jumps to that many frames from the end. * `F' jumps to the end of the currently decoded animation, and follows it as more is decoded. Cancel by jumping to any other frame, e.g. with `G'. Only makes sense in lazy parsing mode. * `p' (and also `s', for historical reasons) toggles pause mode. Pause mode is initially enabled. * '/' searches forward for a frame containing the given text. * '?' and `\' both search backward for a frame containing the given text. * `n' repeats the previous search: searches for the same text in the same direction (i.e. `go to next match'). * `N' repeats the previous search in reverse: searches for the same text in the opposite direction (i.e. `go to _previous_ match'). Oh, and `ipbt' stands for `It's Play-Back Time'.
About
a high-tech ttyrec player for Unix
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published