No description
  • Python 62.4%
  • HTML 14.6%
  • CSS 11.3%
  • JavaScript 7.7%
  • Dockerfile 2.4%
  • Other 1.6%
Find a file
Astounds 9a58762d62
All checks were successful
release / test (push) Successful in 3m13s
release / release-default (push) Successful in 15m29s
Fix tests
2026-05-20 00:17:59 -05:00
.gitea/workflows update workflow 2026-05-19 22:38:15 -05:00
docs feat: add admin panel with enhanced security and 2026-03-15 20:55:10 -05:00
src Revert base64, and add gunicorn 2026-05-20 00:10:57 -05:00
tests Fix tests 2026-05-20 00:17:59 -05:00
.dockerignore initial commit 2026-03-15 11:49:00 -05:00
.env.sample fix: docker-compose.yml - add channels.json volume 2026-03-15 21:23:42 -05:00
.gitignore feat: add admin panel with enhanced security and 2026-03-15 20:55:10 -05:00
babel.cfg feat: add admin panel with enhanced security and 2026-03-15 20:55:10 -05:00
channels.json fix: use dynamic port in proxy URLs and update Latina CDN 2026-05-19 22:33:21 -05:00
docker-compose.yml fix: docker-compose.yml - add channels.json volume 2026-03-15 21:23:42 -05:00
Dockerfile Revert base64, and add gunicorn 2026-05-20 00:10:57 -05:00
Makefile initial commit 2026-03-15 11:49:00 -05:00
pytest.ini initial commit 2026-03-15 11:49:00 -05:00
README.md feat: add admin panel with enhanced security and 2026-03-15 20:55:10 -05:00
requirements-dev.txt ci: add test job with requirements-dev.txt 2026-03-15 14:47:29 -05:00
requirements.txt Revert base64, and add gunicorn 2026-05-20 00:10:57 -05:00
run.py Revert base64, and add gunicorn 2026-05-20 00:10:57 -05:00

Live Stream Generator

HLS M3U8 playlist generator for legal TV channels.

Quick Start

1. Clone and configure:

git clone <repository>
cd live-generator
cp .env.sample .env

2. Edit .env and set your passwords:

ADMIN_PASSWORD=your_secure_password
SECRET_KEY=your_secret_key

3. Run with Docker:

docker-compose up -d

4. Access:


Project Structure

live-generator/
├── run.py                  # Main entry point
├── requirements.txt        # Python dependencies
├── README.md              # This file
├── babel.cfg              # Babel configuration
├── messages.pot           # Translation template
├── Makefile               # Build commands
├── pytest.ini             # Pytest configuration
├── Dockerfile             # Docker image
├── .dockerignore          # Docker ignore rules
└── src/
    ├── __init__.py
    ├── app.py             # Flask application
    ├── config/
    │   ├── __init__.py
    │   └── settings.py    # Configuration and channels
    ├── extractors/
    │   ├── __init__.py
    │   ├── base.py        # Base extractor class
    │   ├── iblups.py      # IBLUPS extractor (Panamericana)
    │   └── dps.py         # DPS extractor (Latina)
    ├── proxy/
    │   ├── __init__.py
    │   ├── manager.py         # Channel manager
    │   └── stream_manager.py  # HLS stream proxy
    ├── templates/           # HTML templates
    │   ├── index.html       # Home page
    │   └── web_player.html  # Web player page
    ├── static/              # Static assets
    │   └── css/
    │       ├── style.css        # Main stylesheet
    │       └── web-player.css   # Web player styles
    └── translations/        # i18n translations
        ├── en/
        │   └── LC_MESSAGES/
        │       └── messages.mo
        └── es/
            └── LC_MESSAGES/
                └── messages.mo
tests/
├── __init__.py
├── test_config.py       # Configuration tests
├── test_extractors.py   # Extractor unit tests
└── test_app.py          # Integration tests

Installation

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Usage

# Activate virtual environment
source venv/bin/activate

# Run the application
python run.py

The server will start at http://localhost:5000

Endpoints

Endpoint Description
/ Web UI with channel information
/list/list.m3u8 Complete M3U8 playlist
/proxy/[channel]/playlist.m3u8 HLS proxy for VLC
/proxy/[channel]/ts?src=URL Video segment proxy
/web/[channel] HTML5 web player
/api/status Channel status (JSON)
/api/extract/[channel] Force hash extraction
/api/refresh Refresh all channels

Channels

Panamericana TV

Latina TV

Features

  • Dynamic Extraction: Hashes and tokens are extracted automatically from official sources
  • Fallback Values: Pre-configured fallbacks if extraction fails
  • HLS Proxy: Local proxy for CORS and region restrictions
  • Web Player: Built-in HTML5 player using hls.js
  • Caching: 2-minute cache to reduce requests

Troubleshooting

If a Channel Stops Working

If a channel shows "Pending" status or fails to play, the hash may have changed.

Quick Fix (2 minutes):

  1. Open the channel's official website in your browser:

  2. Open Developer Tools (F12) → Network tab

  3. Reload the page and filter by: rudo.video or iblups.com

  4. Copy the hash from the URL:

    https://redirector.rudo.video/mix/register/777b4d4cc0984575a7d14f6ee57dbcaf7/...
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                    This is the hash (40 characters)
    
  5. Update src/config/settings.py:

    KNOWN_HASHES = {
        "tvperu": "NEW_HASH_HERE",
        # ...
    }
    
  6. Restart the application:

    docker-compose restart live-stream-generator
    
  7. Force refresh via API:

    curl http://localhost:5000/api/refresh
    

Check Logs

docker logs live-stream-generator

Look for errors or "404" status codes on stream URLs.

VLC Usage

  1. Open VLC Media Player
  2. Media > Open Network Stream
  3. Enter: http://localhost:5000/proxy/panamericana/playlist.m3u8
  4. Click Play

API Examples

# Get channel status
curl http://localhost:5000/api/status

# Force extraction for a channel
curl http://localhost:5000/api/extract/panamericana

# Refresh all channels
curl http://localhost:5000/api/refresh

Notes

  • This application is for personal and educational use only
  • Ensure compliance with local copyright laws
  • Stream URLs may change; fallbacks are provided for reliability