Convert your Telegram channel videos into M3U8 playlist for OTT Navigator!
Forward Videos → Channel @malaysiaott → Run Script → Generate Playlist → OTT Navigator
No bot needed! Just manual forward videos to your channel.
- Go to: https://my.telegram.org/apps
- Login dengan phone number
- Create application:
- Title:
OTT Playlist - Short name:
ottplaylist
- Title:
- Copy:
api_id(example: 12345678)api_hash(example: abcd1234...)
Open generate_playlist.py, find these lines (top of file):
API_ID = 0 # Replace with your api_id
API_HASH = "" # Replace with your api_hashReplace dengan your credentials:
API_ID = 12345678 # Your actual api_id
API_HASH = "abcd1234..." # Your actual api_hash- Create repo:
telegram-ott-playlist - Upload files:
generate_playlist.pyrequirements.txtREADME.md
Create .github/workflows/generate.yml:
name: Generate Playlist
on:
schedule:
- cron: '0 */3 * * *' # Every 3 hours
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Generate playlist
env:
API_ID: ${{ secrets.API_ID }}
API_HASH: ${{ secrets.API_HASH }}
run: |
sed -i "s/API_ID = 0/API_ID = $API_ID/" generate_playlist.py
sed -i "s/API_HASH = \"\"/API_HASH = \"$API_HASH\"/" generate_playlist.py
python generate_playlist.py
- name: Commit playlist
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add playlist.m3u8 ott_playlist.session*
git commit -m "Update playlist $(date)" || exit 0
git pushSettings → Secrets → Actions → New secret:
- Name:
API_ID, Value: (your api_id) - Name:
API_HASH, Value: (your api_hash)
Settings → Pages → Source: main branch → Save
- Get video dari mana-mana (download, from other bot, etc)
- Forward ke @malaysiaott (your channel)
- Done!
GitHub Actions (Auto):
- Runs every 3 hours automatically
- Or manual: Actions tab → "Generate Playlist" → Run workflow
Local (Manual):
pip install telethon
python generate_playlist.pyPlaylist URL:
https://proksibizmy.github.io/telegram-ott-playlist/playlist.m3u8
Add dalam OTT Navigator → Stream! 🎬
Telegram doesn't provide direct streaming URLs by default. The playlist generates message links (https://t.me/channel/123).
Option A: Use Telegram Bot API (Current)
- Playlist contains Telegram message links
- OTT Navigator opens Telegram app
- Manual click to play
Option B: Telegram Web Player (Better)
- Need custom proxy/web interface
- Stream video directly
- Complex setup
Option C: Download & Re-host (Best for OTT)
- Auto-download videos from channel
- Upload to hosting (Cloudflare R2, Backblaze B2 - free tier)
- Direct stream URLs in playlist
- Need storage management
For true OTT Navigator streaming, consider:
- Manual forward videos to channel ✅
- GitHub Action auto-download from channel
- Upload to free storage (Cloudflare R2 = 10GB free)
- Generate M3U8 with direct URLs
- Stream dalam OTT Navigator ✅
Want me to create the auto-download + re-host version? 🤔
✅ Scan Telegram channel
✅ Find all videos
✅ Generate M3U8 metadata
✅ Auto-update via GitHub Actions
✅ Free hosting (GitHub Pages)
generate_playlist.py- Main scriptrequirements.txt- DependenciesREADME.md- This file
Channel: @malaysiaott
Playlist: Auto-updated setiap 3 jam!