HUB
Sign inSign up

rosyiid1440/stream-youtube

By rosyiid1440

•Updated over 1 year ago

Image
0

257

rosyiid1440/stream-youtube repository overview

⁠YouTube Multi-Session Looping Streamer

This Docker image contains a powerful, web-based application designed to stream video files on a continuous loop to multiple YouTube accounts simultaneously. It's a secure, self-hosted solution for managing 24/7 live streams, event replays, or any content you want to keep live.

The application is built with Flask and FFmpeg, and the core Python source code has been compiled with Cython for performance and to protect the intellectual property. The original .py source code is not included in the final image.


⁠✨ Key Features

  • Multi-Session Streaming: Run multiple independent streaming sessions to different YouTube accounts from a single, centralized web interface.
  • Looping Video: Automatically loops any video file indefinitely for 24/7 streaming.
  • Secure Login: The application is protected by a username and password authentication system.
  • API Key Verification: The application validates a master API key against a central gateway before it can run, ensuring only authorized instances are active.
  • Real-time Monitoring: Each session card displays live CPU usage and the latest data transfer output from FFmpeg.
  • Dynamic Controls: Start, stop, and manage each streaming session independently.
  • File Management: Upload new video files directly through the web UI.

⁠🚀 How to Run

This application is designed to be run with docker-compose for easy management of configuration and volumes.

  1. Create a docker-compose.yml file:

    services:
      streamer:
        image: rosyiid1440/stream-youtube:latest
        container_name: youtube-streamer-secure
        ports:
          - "5000:5000"
        volumes:
          - ./uploads:/app/uploads
        environment:
          - REQUIRED_API_KEY=your_master_api_key
          - APP_USERNAME=your_admin_username
          - APP_PASSWORD=your_secure_password
          - FLASK_SECRET_KEY=a_very_long_and_random_secret_string
        restart: unless-stopped
    
  2. Create an uploads directory:

    mkdir uploads
    

    This directory will be used to store your video files and will persist even if the container is restarted.

  3. Run the container:

    docker-compose up -d
    
  4. Access the application: Open your web browser and navigate to http://localhost:5000. You will be prompted to log in with the APP_USERNAME and APP_PASSWORD you defined.


⁠⚙️ Environment Variables

You must configure the following environment variables for the application to run:

VariableDescriptionExample
REQUIRED_API_KEYThe master API key for validation against the central gateway.12387uhauyduyqwe
APP_USERNAMEThe username to log into the web application.admin
APP_PASSWORDThe password for the application user.MySuperSecureP@ssw0rd
FLASK_SECRET_KEYA long, random string used to secure user sessions.generate_a_random_string_for_this

⁠🔒 Security

  • Compiled Code: The Python source code (app.py) is compiled into a C binary (.so file). It is not present in the Docker image, preventing direct viewing or modification of the core logic.
  • Credential Management: All sensitive data (API keys, passwords) is managed through environment variables and is not hardcoded in the application.
Tag summary
Recent tags
Content type
Image
Digest
sha256:ccc4b0581…
Size
147.9 MB
Last updated
over 1 year ago
docker pull rosyiid1440/stream-youtube:latest