Skip to content

Commit 92a804a

Browse files
committed
Update desc
1 parent eb4c1e4 commit 92a804a

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ Generate an image from the css-doodle source file. The source file can be a `.cs
4141
* `-x, --scale`: Scale factor of the generated image, defaults to 1.
4242
* `-s, --selector`: CSS selector to target the rendered node, defaults to `css-doodle`.
4343
* `-d, --delay`: Delay after the image is rendered, e.g, `2s`.
44-
* `-t, --time`: Record screen for a specific time, e.g, `10s.
44+
* `-t, --time`: Record screen for a specific time, e.g, `10s`.
45+
* `-ws, --window-size`: `The size of the rendered window, e.g, `800x600`, defaults to `1600x900`.
46+
* `--mp4`: Transform the generated `webm` file into `mp4`.
4547

4648
```bash
4749
cssd render
@@ -57,6 +59,13 @@ Screen recording:
5759
cssd render -t 10s
5860
```
5961

62+
By default the generated video is in `webm` format, you can transform it automatically into `mp4` by adding `--mp4` option, or use an output filename with `.mp4` extension.
63+
64+
```bash
65+
cssd render -t 10s --mp4
66+
cssd render -o result.mp4
67+
```
68+
6069
### preview
6170
Open a window to preview the css-doodle source file. The source file can be either `.css` or `.cssd`.
6271

bin/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ program
4646
.option('-x, --scale <scale>', 'Scale factor of the generated image, defaults to `2`')
4747
.option('-s, --selector <selector>', 'CSS selector to target the rendered node, defaults to `css-doodle`')
4848
.option('-d, --delay <delay>', 'Delay after the image is rendered, e.g, `2s`')
49-
.option('-t, --time <time>', 'Record screen for a specific time, e.g, `10s')
49+
.option('-t, --time <time>', 'Record screen for a specific time, e.g, `10s`')
5050
.option('-ws, --window-size <size>', 'The size of the rendered window, e.g, `800x600`, defaults to `1600x900`')
51-
.option('--mp4', 'Generate an mp4 video')
51+
.option('--mp4', 'Transform the generated `webm` file into `mp4`')
5252
.action(handleRender);
5353

5454
program

0 commit comments

Comments
 (0)