chjj / ttystudio

A terminal-to-gif recorder minus the headaches.
Other
3.24k stars 93 forks source link

Add screencast mode. #27

Closed zyrolasting closed 7 years ago

zyrolasting commented 7 years ago

If I am a screencaster I want a fluid recording with minimal filesize and no pauses when I am thinking of what to type while recording. When I type a command, the resulting animation should show a fixed delay between only frames that show updating content. I also wish to have the option to add padding frames to pause at moments of interest for my viewer.

This commit adds the screencast mode and relevant options.

Motivation

Recall the recorder either catches frames on a fixed interval, or when you press a screenshot key (default: C-p). This means when running $ foo on your screencast you would have to run ttystudio --screenshot and then type f <C-p> o <C-p> o <C-p>. Maybe you'd hit C-p a few more times on the command output to add more frames for people to read the output of your command. But then you have to concatenate the output files because the frames are written individually in screenshot mode.

What I ended up doing was making ttystudio grab a frame on each render, provided that the frame contents actually changed. Typing is laggy but this drastically reduced the number of frames recorded.

Adding pauses at moments of interest involves using --screencast-padding to add padding frames.

zyrolasting commented 7 years ago

Cherry pick 258b0eb63473e28feacc11f66ab70b941cf16e57 if you want this feature.

probonopd commented 7 years ago

Thanks @zyrolasting. When will this appear in the master branch?

zyrolasting commented 7 years ago

@probonopd Due to inactivity in this repo and major refactoring on my fork the merge will not go into master anytime soon. Review the forked refactor and see if it does what you need?

probonopd commented 7 years ago

Thank you very much @zyrolasting, it looks like it does.

zyrolasting commented 7 years ago

@probonopd Glad to hear it. Open an issue in my fork if I can help you in any way.