Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syohex/byzanz-window
Go Port of byzanz_window.py
https://github.com/syohex/byzanz-window
Last synced: 5 days ago
JSON representation
Go Port of byzanz_window.py
- Host: GitHub
- URL: https://github.com/syohex/byzanz-window
- Owner: syohex
- License: gpl-3.0
- Created: 2014-07-01T04:59:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-07-23T12:01:27.000Z (over 4 years ago)
- Last Synced: 2024-08-01T12:24:47.341Z (3 months ago)
- Language: Go
- Size: 371 KB
- Stars: 80
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: COPYING
Awesome Lists containing this project
- awesome-starred - syohex/byzanz-window - Go Port of byzanz_window.py (others)
README
# byzanz-window.go
This is Go port of [byzanz_window.py](https://gist.github.com/noamraph/8348560).
It is very nice python script however it does not work with Python 3.4.
So I port it in Go language. I test on XFce4 and LUbuntu. If byzanz-window does not
work on your platform please report me via github issue.## Installation
```
% go get github.com/syohex/byzanz-window/cmd/byzanz-window
```You can also install binary from [here](https://github.com/syohex/byzanz-window/releases).
## Requirement Packages
### Ubuntu
- byzanz
- xdotool
- x11-utils(`xprop`, `xwininfo`)
- libx11-dev```
% sudo apt install byzanz xdotool x11-utils libx11-dev
```### Fedora
- byzanz
- xdotool
- xorg-x11-utils
- libX11-devel```
% sudo yum install byzanz xdotool xorg-x11-utils libX11-devel
```## Example
```
% byzanz-window --duration=30 --delay=5 --cursor output.gif
```## Options
Some option names are changed from original ones.
|option |Description |Default |
|----------------|--------------------------------|--------|
|-d, --duration |Record seconds |10 |
|--delay |Delay seconds before recording |1 |
|-c, --cursor |Record mouse cursor |false |
|-a, --audio |Record audio |false |
|-r, --rectangle |Record in rectangle(Linux Only) |false |zsh completion is [here](https://github.com/syohex/zsh-go-completions/blob/master/_byzanz-window)
## Recording Steps
### 1. Execute `byzanz-window`
```
# Record 20 seconds
% byzanz-window --duration=20 --delay=5 --cursor output.gif
```### 2. Select Window
### 3. Start recording
You type **Return** key, then recording starts after `--delay` second(Default: 1 second).
### 4. Gif is generated
After `--duration` seconds(Default: 10 seconds), Gif file is generated.
Have fun!!
## Window Capture
```
% byzanz-window --duration=seconds --delay=seconds output-file.gif
```![window-capture](image/window-capture1.gif)
Generated gif is
![window-capture-generated](image/window-capture2.gif)
## Rectangle Capture
```
% byzanz-window --rectangle --duration=seconds --delay=seconds output-file.gif # with '--rectangle' option
```![rectangle-capture](image/rectangle-capture1.gif)
Generated gif is
![rectangle-capture-generated](image/rectangle-capture2.gif)