Skip to main content

Telegram RTMPS Voice Chat music streaming engine (educational, non-commercial)

Project description

RTMPS

RTMPS is a high-performance Telegram Voice Chat music streaming engine built using Telethon and FFmpeg, designed specifically for RTMPS-based voice chats.

It supports multiple Telegram groups simultaneously, each with its own RTMPS stream, queue, and FFmpeg process, while preserving a clean and informative user experience.


✨ Features

  • 🎧 Stream music to Telegram Voice Chats via RTMPS
  • 🧩 Multi-group support
    • Different chats
    • Different songs
    • Different queues
    • Different FFmpeg processes
  • 🔐 Secure global configuration via CLI
  • ⚙️ Per-chat RTMPS setup using /setup
  • 📥 Smart queue management with preloading
  • 🔁 Loop, shuffle, skip, clear queue
  • 🕊️ Informative status messages (Downloading…, Added to queue, etc.)
  • 🚀 Built as a real PyPI package, not a raw script

📦 Installation

pip install rtmps

⚠️ FFmpeg is required and must be available in your system PATH.


🔧 Global Configuration (One-Time)

Run the configuration wizard:

rtmps-config

You will be asked for:

API_ID

API_HASH

BOT_TOKEN

Session name (optional)

Configuration is stored at:

~/.rtmps/config.json


▶️ Start the Bot

rtmps

Expected output:

🎵 RTMPS running


🔑 Per-Chat Setup (Required)

Each Telegram group or channel must configure its own RTMPS stream.

Inside the target chat:

/setup

Follow the prompts:

  1. Send RTMPS URL

  2. Send RTMPS Stream Key

Example:

/setup rtmps://dc5-1.rtmp.t.me/s/ AOV1a58_FgtC2oPzneeehUg

Configuration is stored per chat, allowing unlimited simultaneous streams.


🎵 Music Commands

All commands operate independently per chat.

▶️ Play (reply-based)

Reply to an audio file:

*play

If music is already playing, the track is added to the queue.


⏭️ Skip

*skip

Skips the current track and plays the next one (if available).


📜 Queue

*queue

Shows:

Currently playing track

Up to 10 upcoming tracks

Remaining count (+ n more)


🔀 Shuffle Queue

*shuffle


🔁 Loop Current Track

*loop current <n>

Example:

*loop current 3


🧹 Clear Queue

*clearqueue

(Current track continues playing.)


🧠 Architecture Overview

Telethon for Telegram MTProto communication

  • FFmpeg for RTMPS audio streaming

  • One player per chat

  • One FFmpeg process per chat

  • Fully asynchronous, non-blocking design

  • Restart-safe configuration storage


📁 Configuration Files

├── config.json   # Global Telegram credentials
└── chats.json    # Per-chat RTMPS configuration

🚧 Roadmap

*stream <profile> support

Song metadata via info.json

  • Admin-only permissions

  • Persistent queue resume after restart

  • FFmpeg crash auto-recovery

  • Optional web dashboard


🛡️ Requirements

  • Python 3.8+

  • FFmpeg

  • Telegram bot with voice chat permissions

  • RTMPS-enabled voice chat


📜 License

PolyForm Noncommercial License © 2026
Ankit Chaubey

Educational and non-commercial use only.


🔗 Links


📬 Contact

For educational, non-commercial use, questions, or feedback:


Project details


Download files

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

Source Distribution

rtmps-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

rtmps-0.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file rtmps-0.1.0.tar.gz.

File metadata

  • Download URL: rtmps-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rtmps-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f6e1597fec25eebf3504605791e17ab33731a54fe9437037cf17eb90b156a04
MD5 7cb94429f150bfdaf1842f3aa7eba179
BLAKE2b-256 3f10d9dcbba9e81a5f19445afb605b1c15c2c2e8eeb73b01d56f9479f1057848

See more details on using hashes here.

Provenance

The following attestation bundles were made for rtmps-0.1.0.tar.gz:

Publisher: publish.yml on ankit-chaubey/RTMPS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rtmps-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rtmps-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rtmps-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97f2234de773bf017715567a2df172fae68f7ea21aeff414fc8a40566c6c7b12
MD5 54d5dd685b6988aed8d27a8ed867c0c2
BLAKE2b-256 b2f000c1865cb0b459fdbcba8c9124abb1c6bf8e9495e65f62d8ebb852d20f5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rtmps-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ankit-chaubey/RTMPS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page