When I checked the output, I found some content are lost, and the number of lost lines is related to Height parameter.
If I set height to 1, e.g. -g 1000x1, it would not lost anything.
After some debugging, I found it is due to two ESC Sequences: <ESC>[H<ESC>[2J.
<ESC>[H will move the cursor to row 0, column 0, and <ESC>[2J will erase the screen.
The two sequences appears serval times in my typescript file, so output will lost Height - 1 lines when parser meet them each time.