Skip to main content

🎥 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 theme
  • dark: High-contrast dark theme
  • light: Light theme
  • solarized-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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sh2mp4-0.2.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sh2mp4-0.2.1-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file sh2mp4-0.2.1.tar.gz.

File metadata

  • Download URL: sh2mp4-0.2.1.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

Hashes for sh2mp4-0.2.1.tar.gz
Algorithm Hash digest
SHA256 13a212312f70406258eab57213105d338961051fa784489ec1ef584912bbd108
MD5 fdeb092d18f0ef41c1f30e5d6527c351
BLAKE2b-256 ea51aab31c9daae23860b77830348d6fc4ceea093b585d9be06a1ae74fe6e7c5

See more details on using hashes here.

File details

Details for the file sh2mp4-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: sh2mp4-0.2.1-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

Hashes for sh2mp4-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1a9d1de688234722c6064ed8d430d07196a5e827ced8e0ea4683132fabd8634b
MD5 c2ee7892de312774d1ebf1152b383208
BLAKE2b-256 21769b7adc6760096ea7c7bd3bd13f6659acecf9f8c4eeb8bdc47c25a8560f20

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

This release

0.2.1 This release

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page