🎥 sh2mp4
Records a shell script to mp4.
$ ./sh2mp4.sh "command to run" [output.mp4] [cols] [lines] [fps] [font] [font_size] [theme]
I set up a stdbuf fifo so you should be able to pipe stuff like keypresses in, but it's untested and you won't be able to see what you're doing either. Might be useful though.
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sh2mp4-0.2.0.tar.gz.
File metadata
- Download URL: sh2mp4-0.2.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc1e9ba158b1f05cd28df5df89e8f25ed1291f8b2a010a80cf47b8cf052d8a3a
|
|
| MD5 |
4c838d25662cfe4686382a99fa1e4be7
|
|
| BLAKE2b-256 |
e44daefe5cf76a18b501c7a7a211b6c7f1bddc0d534a127415f00f9de34e4018
|
File details
Details for the file sh2mp4-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sh2mp4-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbb986a515217da4447709b1e7205848b74c27334f661c9cacc397c532cc6411
|
|
| MD5 |
65787ce1c2e2596a43d2d923fe2f6d69
|
|
| BLAKE2b-256 |
980853a6724a3817acffa15bf4f0fd05190d14628e390fe8d519982a6c97583c
|