Ttyrec

ttyrec is a program or its file format capable of recording the TTY output of a text-mode program together with timestamps and then replaying it.
It is widely used for example in the NetHack community for storing game replays.
It is similar to the script command, but also allows for pausing, slowing down or speeding up playback. It can also stream the recording on the network and be used to transfer files with uudecode.[1]
Recorders and players
- original ttyrec[1] (Unix, abandoned)
- ovh-ttyrec (Unix) [2]
- Term::TtyRec[3] (Perl)
- Term::TtyRec::Plus[4] (Perl)
- Tie::Handle::TtyRec[5] (Perl)
- termrec[6] (Win32, Unix)
Playback only
Technical file format specification
Each chunk consists of a header using 32bit unsigned little-endian numbers:
- sec – seconds, either since the beginning of the recording (0-based) or since the Unix epoch
- usec – 0..999999 microseconds
- len – length of the payload
and the actual payload written as text with vt100 control codes.
The 32-bit sec range makes the format susceptible to the Year 2038 problem.
The format does not contain any information about the character set used nor about the terminal size needed to play back the file. termrec will inject this information as \e%G for UTF-8 or \e%@ for not UTF-8 and as \e[8;Y;Xt for size, but not all players will understand these codes.
Related formats
References
- ^ a b "Ttyrec: A tty recorder". Archived from the original on 2007-07-30. Retrieved 2006-07-06.
- ^ "ovh/ovh-ttyrec: Enhanced (but compatible) version of the classic ttyrec". GitHub. Retrieved 2025-01-25.
- ^ "Term::TtyRec - handles ttyrec data - metacpan.org". Archived from the original on 2021-10-27. Retrieved 2013-09-16.
- ^ "Term::TtyRec::Plus - read a ttyrec - metacpan.org". Archived from the original on 2021-10-27. Retrieved 2013-09-16.
- ^ "Tie::Handle::TtyRec - write a ttyrec - metacpan.org". Archived from the original on 2021-10-27. Retrieved 2013-09-16.
- ^ "1KB: Software/Termrec". Archived from the original on 2006-07-15. Retrieved 2006-07-06.
- ^ "Ttyplayer". Archived from the original on 2012-02-11. Retrieved 2008-04-09.
- ^ "IPBT: A high-tech ttyrec player for Unix". Archived from the original on 2006-06-30. Retrieved 2006-07-06.
- ^ "Nethack Recorder/Player Version 1.0". Archived from the original on 2006-06-21. Retrieved 2006-07-06.
- ^ "#68556 - [patch] adding timings to script - Debian Bug report logs". Archived from the original on 2019-04-10. Retrieved 2014-06-13.
External links
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.