Skip to content

deemkeen/termostream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

termoStream

termoStream is a command-line tool that allows you to stream your mobile device's camera to your terminal using QR codes, creating a unique ASCII art video stream. It can also display the stream in a web browser with the -web flag.

Features

  • Live camera streaming to terminal
  • Optional web browser viewing with -web flag
  • ASCII art conversion in real-time
  • Switch between front and back cameras
  • Clean and responsive web interface
  • Secure HTTPS connection
  • Cross-platform (Windows, macOS, Linux)

Requirements

  • Go 1.23 or higher
  • chafa command-line tool for ASCII art conversion
  • Modern web browser with camera access

Installation

# Clone the repository
git clone <this repo>

cd termostream

# Build the binary and generate SSL certificates
./build.sh

# Optional: Copy binary to your PATH to run from anywhere
sudo cp termostream /usr/local/bin/

Usage

  1. Run the termostream binary in your terminal:
./termostream        # For terminal output
./termostream -web   # For web browser output
  1. A QR code will appear in your terminal

  2. Scan the QR code with your mobile device's camera

  3. Your browser will open with camera controls:

    • Click "Start Video Stream" to begin streaming
    • Use "Switch Camera" to toggle between front/back cameras
    • Click "Stop Video Stream" to end the stream
  4. When using -web flag, open the provided view URL in your browser to watch the stream

Environment Variables

  • HOST_ADDR: Set a specific IP address or hostname (default: auto-detect)
  • HOST_PORT: Set a specific port (default: 8443)

Example:

HOST_ADDR=192.168.1.100 HOST_PORT=3000 ./termostream

Notes

  • HTTPS is required for camera access in modern browsers
  • The stream URL contains a random suffix for basic security
  • Works on any device with a modern browser and camera
  • No need to be on the same Wi-Fi network as long as the device can reach the host IP
  • Video stream is converted to ASCII art using the chafa utility when viewing in terminal
  • Web view shows the original video stream without ASCII conversion

Technical Details

  • Uses WebSocket for real-time video streaming
  • Converts frames to JPEG before transmission
  • Optimized for terminal display using chafa
  • Responsive web interface with mobile-first design

Credits

License

MIT License

About

cli for mediastream playback in terminal

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published