Skip to main content

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.



📬 Contact

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


Metadata

Release files for rtmps 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rtmps 0.1.1
File Size Uploaded Provenance
rtmps-0.1.1.tar.gz 11.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rtmps 0.1.1
File Interpreter ABI Platform
rtmps-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / rtmps-0.1.1.tar.gz

Download URL rtmps-0.1.1.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c0d3241f6e564a1c5b3a7925f34db2e2cce3153e72d555e6df4d2b562a25f2cf
BLAKE2b-256 checksum
How to use checksums
0b284683ba5bbcd8721e609c32e9a54ea653163f73c004360bf1ede4a41ef5d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.

Transparency log

Release files / rtmps-0.1.1-py3-none-any.whl

Download URL rtmps-0.1.1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72baac4d41a264f1bc8a7608655e50b5b9286af5220448c72360221b1be059a3
BLAKE2b-256 checksum
How to use checksums
3afbfcbfea8e89dee92dd9bbff278e3310d692fbb51ea496ebe6adcf4956088f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.

Transparency log

Security for rtmps 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rtmps-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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