-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(drop-idle-frames): implement idle frame detection and dropping
- relates to issue #10 - identifies identical frames and drops them - calculates also a proper offset for the duration ths is dropped together with the frame - add a comand line flag `-n` or `--natural` to disable this mechanism - adjust the README and the `docs/demo.gif` to illustrate a very fluid installtion of t-rec (where normally it would take more idle frames)
- Loading branch information
Showing
9 changed files
with
116 additions
and
39 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "t-rec" | ||
version = "0.1.2" | ||
version = "0.2.0" | ||
authors = ["Sven Assmann <[email protected]>"] | ||
edition = "2018" | ||
license = "GPL-3.0-only" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ Blazingly fast terminal recorder that generates animated gif images for the web | |
|
||
- Screenshotting your terminal with 4 frames per second (every 250ms) | ||
- Generates high quality small sized animated gif images | ||
- **Build-In idle frames detection and optimization** (for super fluid presentations) | ||
- Runs (only) on MacOS | ||
- Uses native efficient APIs | ||
- Runs without any cloud service and entirely offline | ||
|
@@ -48,7 +49,37 @@ or with specifying a different program to launch | |
❯ t-rec /bin/sh | ||
``` | ||
|
||
### Hidden Gems | ||
### Full Options | ||
|
||
```sh | ||
❯ t-rec --help | ||
t-rec 0.2.0 | ||
Sven Assmann <[email protected]> | ||
Blazingly fast terminal recorder that generates animated gif images for the web written in rust. | ||
|
||
USAGE: | ||
t-rec [FLAGS] [shell or program to launch] | ||
|
||
FLAGS: | ||
-h, --help Prints help information | ||
-l, --ls-win If you want to see a list of windows available for recording by their id, you can set env var | ||
'WINDOWID' to record this specific window only. | ||
-n, --natural If you want a very natural typing experience and disable the idle detection and sampling | ||
optimization. | ||
-V, --version Prints version information | ||
|
||
ARGS: | ||
<shell or program to launch> If you want to start a different program than $SHELL you can pass it here. For | ||
example '/bin/sh' | ||
``` | ||
### Disable idle detection & optimization | ||
If you are not happy with the idle detection and optimization, you can disable it with the `-n` or `--natural` parameter. | ||
By doing so, you would get the very natural timeline of typing and recording as you do it. | ||
In this case there will be no optimizations performed. | ||
## Hidden Gems | ||
You can record not only the terminal but also every other window. There 2 ways to do so: | ||
|
@@ -58,9 +89,9 @@ You can record not only the terminal but also every other window. There 2 ways t | |
```sh | ||
❯ TERM_PROGRAM="google chrome" t-rec | ||
tmp path: "/var/folders/m8/084p1v0x4770rpwpkrgl5b6h0000gn/T/trec-74728.rUxBx3ohGiQ2" | ||
Frame cache dir: "/var/folders/m8/084p1v0x4770rpwpkrgl5b6h0000gn/T/trec-74728.rUxBx3ohGiQ2" | ||
Press Ctrl+D to end recording | ||
[src/window_id.rs:122] window_owner = "Google Chrome 2" | ||
Recording Window: "Google Chrome 2" | ||
``` | ||
this is how it looks then: | ||
|
@@ -79,7 +110,7 @@ Code | 27600 | |
# set the WINDOWID variable and run t-rec | ||
❯ WINDOWID=27600 t-rec | ||
tmp path: "/var/folders/m8/084p1v0x4770rpwpkrgl5b6h0000gn/T/trec-77862.BMYiHNRWqv9Y" | ||
Frame cache dir: "/var/folders/m8/084p1v0x4770rpwpkrgl5b6h0000gn/T/trec-77862.BMYiHNRWqv9Y" | ||
Press Ctrl+D to end recording | ||
``` | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters