Skip to content

GIF generation documentation #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 20, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions docs/how-write-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,45 @@ IntelliJ:
* Editor font: Fira Code, 16
* Enable ligatures: true

# GIF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be ## level (same as screenshots).


## Preparation

Use [simplescreenrecorder](http://www.maartenbaert.be/simplescreenrecorder/) to record .mkv
Use [giflossy](https://github.com/pornel/giflossy/releases/tag/lossy/1.82.1) for GIF compression (aliased as gifsicle)

## Recording MKV

Configure simplescreenrecorder:

* Set frame rate to 10
* Don't record audio
* Record a fixed rectangle at 1280x960 at (0,0)

Resize and move window to upper-left corner:

```
xdotool search --name "graph-examples" windowsize 1280 960 windowmove 0 0
```

Save recorded video with screencast.mkv name

## Generate GIF

cd into directory where screencast.mkv resides

Execute following commands

```sh
mkdir frames
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put this in a function that accepts name for a gif
And also do all operations in /tmp folder?

ffmpeg -i screencast.mkv -vf fps=4 frames/ffout%03d.png
convert -loop 0 -delay 20 frames/ffout*.png output.gif
gifsicle -O3 --lossy=80 --colors 256 output.gif > result.gif
rm -r frames
rm output.gif
```


# Database seed

## Queries
Expand Down