TermFace
Secure terminal video call. Your webcam rendered as color ASCII art, with end-to-end encrypted peer-to-peer calls.
Features
Stable (TCP Transport)
- End-to-end encryption — X25519 key exchange + XSalsa20-Poly1305 (libsodium)
- Opus audio codec — 24kHz at 32kbps, echo cancellation, noise gate
- zstd compression — with backward-compatible header detection
- Session strings — share
happy-sunset-oceaninstead of IP addresses - Auto-reconnection — exponential backoff with up to 5 retries
- Call quality stats — real-time RTT, bandwidth, and duration display
- LAN discovery — automatic peer discovery on local network
- Chat — in-call text messaging
- File transfer — with SHA-256 checksum verification and progress display
- Screenshots — save ASCII art as .txt and .png
- Recording — capture video/audio to AVI/WAV files
- Mute/camera controls — toggle mic and camera during calls
- Background effects — blur and removal (requires MediaPipe)
Experimental (WebRTC Transport)
- WebRTC data channel — for chat and control messages
- RTP media tracks — camera and microphone via aiortc
- Remote media rendering — receive and display remote video as ASCII
- ICE configuration — STUN/TURN server support
In Progress
- SFU integration — group calls via LiveKit/Janus (planned)
- Structured terminal UI — status bar, chat panel, participant list (planned)
Install
From PyPI
pip install TermFace
With optional dependencies:
# Full install (audio, screen, compression, WebRTC)
pip install "TermFace[full]"
# Just audio support
pip install "TermFace[audio]"
# Just WebRTC support
pip install "TermFace[webrtc]"
From Source
git clone https://github.com/Yash12b/TermFace.git
cd TermFace
pip install -e ".[dev]"
Quick Start
ASCII Webcam (local)
ascii-cam
Video Call
# Person A (receiver) — start first, wait for incoming
termface facetime
# Person B (caller) — connect to A's IP
termface facetime --target 192.168.1.100
With Session Strings
# Person A starts with a session string
termface facetime --session happy-sunset-ocean
# Person B joins using the same session string
termface facetime --session happy-sunset-ocean
WebRTC Call (Experimental)
# Requires: pip install "TermFace[webrtc]"
# Person A (answerer)
termface webrtc --role answerer --room myroom
# Person B (offerer)
termface webrtc --role offerer --room myroom --camera --microphone
Keyboard Controls
| Key | Action |
|---|---|
t |
Open chat (Enter to send, Esc to cancel) |
f |
Send file |
m |
Toggle microphone mute |
v |
Toggle camera on/off |
p |
Toggle push-to-talk mode |
1-4 |
Color mode: mono / grayscale / color / invert |
e |
Toggle edge detection |
b |
Toggle background blur |
r |
Toggle recording (connected) / background removal (idle) |
c |
Cycle character set |
+/- |
Adjust brightness |
[/] |
Adjust contrast |
s |
Take screenshot (saves .txt and .png) |
q |
Quit |
Architecture
┌─────────────────────────────────────────────┐
│ Terminal UI (ASCII rendering) │
├─────────────────────────────────────────────┤
│ Media Layer │
│ ├── VideoProcessor (capture → resize → JPEG)│
│ ├── AudioSystem (PyAudio + Opus codec) │
│ └── FrameCompressor (zstd compression) │
├─────────────────────────────────────────────┤
│ Protocol Layer │
│ ├── Frame (binary framing) │
│ ├── Encryptor (XSalsa20-Poly1305) │
│ └── MediaPacket (sequence numbers) │
├─────────────────────────────────────────────┤
│ Network Layer │
│ ├── TCPMediaServer/Client (TCP transport) │
│ ├── AiortcTransport (WebRTC, optional) │
│ └── DiscoveryService (STUN + LAN) │
├─────────────────────────────────────────────┤
│ Signaling Layer │
│ ├── SignalingClient/Server (TLS relay) │
│ └── Invite tokens (HMAC-SHA256) │
└─────────────────────────────────────────────┘
Security
- Encryption enabled by default for all calls with session strings
- X25519 key exchange for shared secret derivation
- XSalsa20-Poly1305 authenticated encryption (AEAD)
- Sequence numbers with replay protection
- Key rotation every 256 messages
- Invite tokens with expiration and room scoping
To disable encryption (not recommended):
termface facetime --no-encrypt
Diagnostics
# Check system requirements
termface doctor
# Update to latest version
termface update
Requirements
- Python 3.10+
- OpenCV (
opencv-python) - NumPy (
numpy) - PyNaCl (
PyNaCl) — for encryption
Optional:
- PyAudio + opuslib — for audio
- mss — for screen capture
- zstandard — for compression
- aiortc — for WebRTC
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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
termface-3.3.0-py3-none-any.whl
(65.2 kB
view details)
File details
Details for the file termface-3.3.0-py3-none-any.whl.
File metadata
- Download URL: termface-3.3.0-py3-none-any.whl
- Upload date:
- Size: 65.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb6eebfde45d669756b1a9fe4c59856885ea1874d03af7ba9daf05efdcb1165b
|
|
| MD5 |
84ca6ff1062541440977c397db5a9ab1
|
|
| BLAKE2b-256 |
e2b94b8a2777443e522e1a73e66ea4874312cf5abd1eae67654a434b68b6dc8c
|