🎥 sh2mp4
Records a shell command to an MP4 video, using xterm in a hidden desktop session.
This version is now written in Python. Use uvx sh2mp4 or pipx sh2mp4 to execute.
Usage
$ sh2mp4 "command to run" [output.mp4]
Defaults
| arg | value | description |
|---|---|---|
| command | (required) | Command or script to run in recording |
| output | output.mp4 | Output file name |
| cols | $(tput cols) |
Terminal width in characters |
| lines | $(tput rows) |
Terminal height in characters |
| fps | 30 | Frames per second for recording |
| font | DejaVu Sans Mono | Font to use (must be monospace) |
| font_size | 12 | Font size in points (4,6,8,10,12,14,16,18,20) |
| theme | sh2mp4 | Terminal color theme |
Fonts
Font size is configurable (default 12pt). Character dimensions are automatically
calculated based on the font size. Supported sizes: 4, 6, 8, 10, 12, 14, 16, 18, 20.
Run python3 measure_fonts.py to see pixel dimensions for all available fonts and sizes.
Themes
Available themes:
sh2mp4: Custom theme optimized for video recording (default)tango: Tango-based themedark: High-contrast dark themelight: Light themesolarized-dark: Solarized Dark theme
You can customize or add new themes in the themes.sh file.
Deps
See/run ./configure for a list. There's a few, so you might wanna run it in a
container.
License
WTFPL with one additional clause:
- 🛑 Don't blame me
Do wtf you want, but you're on your own.
Links
See also
- 📺 tvmux - a tmux recorder using asciinema.
Metadata
Release files for sh2mp4 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sh2mp4-0.2.3.tar.gz | 15.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sh2mp4-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.1 kB
Release files / sh2mp4-0.2.3.tar.gz
| Download URL | sh2mp4-0.2.3.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a9508cc566e0794088968473ef9085938cd5b868f1e18cfa6743a74ed4d33aa
|
|
BLAKE2b-256 checksum How to use checksums |
746c217d269825d5bff884cd853d68cd3a8d351535cb35f03fe7fe5af40c644c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / sh2mp4-0.2.3-py3-none-any.whl
| Download URL | sh2mp4-0.2.3-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
920f170ffea86ead12f1117e4dae7853b0c7a50a0a964359ce4265f8cd87d872
|
|
BLAKE2b-256 checksum How to use checksums |
2565cfbad6d722c0b1ad029cdc930f949c0e82f0bfcb238b854c2bcaf6610628
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|