Skip to main content

Cast videos (with subtitles) straight from your PC.

Project description

PyPI pyversions PyPI version shields.io PyPI license Downloads

Kast

Seamlessly cast your local video files to chromecast type devices. Regardless of media containers, codecs or subtitle formats.

Features:

  • Detect cast devices in your local network.
  • Cast video files compliant with chromecast supported formats withou any extra steps.
  • Automatically transcode and remux incompatible video files before casting.
  • Automatically convert subtitles.
  • Display local preview of streamed video.
  • Thanks to the OS media integration, control your stream with a regular remote media control applications intended for your platform. (e.g. KDE Connect for Plasma linux desktop)

Supported platforms:

  • Linux
  • Windows

(Might work on others, but it's untested.)

Supported devices:

  • Chromecast 4
  • Chromecast Ultra
  • Chromecast 3

(Might work with others, but it's untested.)

Local preview backends:

Engine Supported platforms Required setup to achieve full functionality Notes
Null All - Just a mock. Does not provide audio nor video.
PyAV Linux, Windows - Aimed to be the default on all platforms.
WinRT Windows Installation of some proprietary codecs (like HEVC). Codecs must be compatible with Windows Media Foundation. Aimed to be phased out.
Qt All Installation of multiple codecs.
On Linux GStreamer codecs.
On Windows either DirectShow (default PyPI release) or Windows Media Foundation (default for binary release).
Aimed to be phased out.

Installation:

Binary release:

  • Linux Arch - Available at AUR under name kast-bin.
  • Linux Generic - Download installation script from here.
  • Windows - Download installer from here.

PyPI release:

For satisfying user experience it is recommended to install the application in a separate virtual environment. You can use your favorite env creation method like conda or venv.

Installation from PyPI using venv:

python -m venv /path/to/your/venv
cd /path/to/your/venv
source bin/activate
python -m pip install kast

Changelog:

  • Version: 1.40
    • Added support for 4K streaming.
    • Enabled PyAV based local player for Windows.
    • Cast device search provides results on the go and is interruptable.
    • Local player reports internal engine errors on screen.
    • Added recovery mode.
    • Resolved window flickering on open.
    • Improved background threading with scheduling.
    • GStreamer codecs are no longer bundled which caused crashes on Linux.
    • Binary releases no longer bundles python and scripts but actually compiles to a native binary.
  • Version: 1.3.0
    • Alternative local player backend. (Experimental)(Windows)
    • Made new experimental local player backends into defaults. (Linux/Windows)
    • Improved local player backend switching stability.
    • Improved logger performance by making all prints non-blocking.
    • Dropped support for: Python < 3.10
  • Version: 1.2.0
    • Local player subtitles support.
    • Option to disable local player.
    • Alternative local player backend. (Experimental)(Linux)
    • Improved subtitles extraction and conversions.
    • Improved performance and stability of the UI.
  • Version: 1.1.1
    • Silent fail with 4K videos fixed. - Most chromecast devices support resolution up to Full HD. All videos are now converted to satisfy that constraint. Full support for 4K devices coming in the future.
  • Version: 1.1.0
    • Taskbar progress support. (Windows/Linux)
    • Taskbar preview media controls. (Windows)

FAQ:

Local preview does not seem to work (video/audio/both issue).

  • First go to: Application > Settings > Local Player Backend
  • Then try to choose a different backend.
  • If PyAV backend is available on your platform, it should be the best option.
  • If problem persists try to install codecs on your OS:
    • Linux - Install GStreamer codecs.
    • Windows:
      • Install codecs compatible with Windows Media Foundation. Most notably HEVC codec. Should be available in MS Store.
      • Install codecs compatible with DirectShow. Some codec pack like K-Lite should be enough.

I see no progress on taskbar on Linux.

Taskbar progress on Linux is supported only by selected desktop environments. (Like KDE or Unity.)

Furthermore, the application would have to be installed in either of root or user environment.

However, both approaches are discouraged and binary installation is recommended.

If you don't want the binary package, please use venv like so:

# Copy desktop and icon files to user environment:
cp -fv ${your_venv_prefix}/share/applications/* ~/.local/share/applications/
cp -fv ${your_venv_prefix}/share/pixmaps/* ~/.local/share/pixmaps/

# Create launcher script:
echo "#!/usr/bin/sh" > ~/.local/bin/kast
echo "source ${your_venv_prefix}/bin/activate" >> ~/.local/bin/kast
echo "python -m kast" >> ~/.local/bin/kast
chmod +x ~/.local/bin/kast

# Remember to replace all occurrences of the "${your_venv_prefix}" with an actual path to your venv directory!

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kast-1.4.1.tar.gz (159.6 kB view details)

Uploaded Source

File details

Details for the file kast-1.4.1.tar.gz.

File metadata

  • Download URL: kast-1.4.1.tar.gz
  • Upload date:
  • Size: 159.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for kast-1.4.1.tar.gz
Algorithm Hash digest
SHA256 dfb4dcee671af593bfc1c54889dc7fd9f6f62c627ad831574801da0e32b740d5
MD5 c0389a0d27a8d328fe2b45bb01ed5cf9
BLAKE2b-256 79bb5b3f27fcef6193143c59aa6fcecf8f52179cb6d2eb8426bdaa88f8030230

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page