Skip to main content

Webfilecast

A simple, modern web frontend for Terminalcast to cast local video files to your Chromecast.

New Webfilecast UI

Features

  • Modern, responsive UI: A clean, dark interface that works on desktop and mobile.
  • Searchable File List: Instantly find the file you're looking for, even in large collections. The search supports fuzzy matching and exact phrases in quotes (e.g., SomeSeries "Episode 7").
  • Natural Sorting: Files are sorted logically, so "Episode 2" comes before "Episode 10".
  • Clear Controls: Icon-based buttons for starting the server, playing on Chromecast, opening in browser, and stopping the server.
  • Dynamic UI: Buttons are enabled/disabled based on the application state to guide the user.
  • Real-time Feedback: See the connection status, server status, and file scan progress at a glance.

Requirements

  • Python 3.10+
  • Redis Server (running on localhost)

Installation

You can install Webfilecast directly from PyPI:

pip install webfilecast

For a production deployment, it is recommended to install the deployment dependencies as well:

pip install "webfilecast[deployment]"

Usage

  1. Set Environment Variables: The application is configured via environment variables.

    • MOVIE_DIRECTORY: (Required) The absolute path to the directory where your video files are stored.
    • CORS_ORIGINS: (Required) A semicolon-separated list of allowed origins for the web frontend (e.g., http://localhost:8000;http://127.0.0.1:8000).
    • TERMINALCAST_KNOWN_HOSTS: (Optional) A comma-separated list of known Chromecast IP addresses to speed up discovery.
  2. Run the application:

    For Development: A simple development server can be started using the flask command. To enable automatic reloading on code changes, use the --debug flag.

    # Example
    export MOVIE_DIRECTORY="/path/to/your/videos"
    export CORS_ORIGINS="http://127.0.0.1:5000"
    
    flask --app webfilecast --debug run
    

    For Production (Recommended): For the best performance and to ensure all real-time features work correctly, it is highly recommended to use a production-ready WSGI server like gunicorn with eventlet.

    # Example
    export MOVIE_DIRECTORY="/path/to/your/videos"
    export CORS_ORIGINS="http://your-domain.com"
    
    gunicorn --worker-class eventlet -w 1 --bind 0.0.0.0:8000 "webfilecast:app"
    

    Then open your browser and navigate to the specified host and port.

Advanced Configuration (Reverse Proxy)

If you are running Webfilecast behind a reverse proxy (like Nginx) and want to serve the video files through the same domain/port (to avoid mixed content issues or firewall restrictions), you can configure terminalcast to use a fixed port and a specific public URL.

  1. Set additional Environment Variables:

    • TERMINALCAST_PORT: The fixed port where the internal video server should listen (e.g., 8081).
    • TERMINALCAST_VIDEO_URL: The public URL that the Chromecast and browser should use to access the video (e.g., https://your-domain.com/video).
  2. Configure Nginx: Add a location block to your Nginx configuration to proxy the video traffic to the internal TERMINALCAST_PORT.

    server {
        listen 443 ssl;
        server_name your-domain.com;
        
        # ... ssl config ...
    
        # Main Webfilecast App
        location / {
            proxy_pass http://127.0.0.1:8000; # Gunicorn port
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            
            # WebSocket support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    
        # Video Streaming
        location /video {
            proxy_pass http://127.0.0.1:8081/video; # TERMINALCAST_PORT
            proxy_set_header Host $host;
            proxy_buffering off; # Important for streaming
        }
    }
    

How it works

The application scans the MOVIE_DIRECTORY for video files and caches their metadata in Redis. The web frontend communicates with the Python backend via Socket.IO to select a file, choose an audio stream, and control the casting process. When a video is to be played, a temporary web server is started via terminalcast to stream the file to the Chromecast.

Metadata

Release files for webfilecast 1.1.4

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

Source distribution (sdist)

Source distribution for webfilecast 1.1.4
File Size Uploaded Provenance Actions
webfilecast-1.1.4.tar.gz 7.8 kB With provenance Details for webfilecast-1.1.4.tar.gz

Built distribution (wheel)

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

Total release size: 16.0 kB

Release files / webfilecast-1.1.4.tar.gz

Download URL webfilecast-1.1.4.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5fadc72f62291d69ed8d679af1a40fe3b0d4f2fa109ef33de3b963000042aacb
BLAKE2b-256 checksum
How to use checksums
cc045904ffe726bfb58031c23e0e34d1e4aabf462fed8f2cb474a18b33868501
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 7, 2026.

Transparency log

Release files / webfilecast-1.1.4-py3-none-any.whl

Download URL webfilecast-1.1.4-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e04f2f09e0ee56aa2deb9e22008989005a56d59f805f08bcd89163e2e411ad1d
BLAKE2b-256 checksum
How to use checksums
31405d366b0a2711f633ce7b9b6b2900df954b2070c5245b92a0bf5cefe4fd04
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 7, 2026.

Transparency log

Security for webfilecast 1.1.4

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 webfilecast-1.1.4.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 7, 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

1.1.4 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