Skip to main content

RayoHX

CI PyPI Python versions Typed httpx Ruff uv License

The RayoHX Python library: look at an HLS stream, choose the quality and tracks you want, and download it to a file, all from your own code.

Coming from pym3u8downloader? See the migration guide.

Want a ready-made command instead? Install the rayohx command line from rayohx-cli.

What you can do

  • Inspect a stream from its web address and see its qualities, audio and subtitle tracks and encryption, without downloading any media
  • Choose a stream by quality, resolution or bitrate limit, or exactly by its number, resolution or name, prefer a video codec or dynamic range, and pick audio and subtitles by language or name
  • Download in one call, with parallel segments, progress events, and cancellation that returns a result instead of an error
  • Pause a running download and resume it later
  • Work with a playlist you already have as text, without fetching it
  • Download several streams one after another into a folder with download_many
  • Find and remove the working folders that interrupted downloads leave behind
  • Resume interrupted downloads where they stopped, with disk space needed for the video only
  • Save segments as separate files in a folder, or download just the video of a stream with a separate audio track
  • Save MPEG-TS and fragmented MP4 streams, join a separate audio track into one MP4 and save subtitles as .vtt files, with nothing re-encoded
  • Decrypt AES-128 streams, including keys given in the playlist or supplied by your own code; protected (DRM) and live streams are refused with a clear explanation
  • Use proxies (including SOCKS5 and ones from the environment), client certificates, TLS settings, headers, cookies and a speed limit, with automatic retries
  • Refuse damaged or hostile streams with a clear error instead of crashing, and never replace an existing file unless you allow it
  • Keep secrets such as tokens, cookies and proxy passwords out of logs and error messages

Install

pip install rayohx

Requires Python 3.11 or newer. An installed FFmpeg is used only as an optional fallback for codecs the built-in remuxer cannot copy.

Quick start

import rayohx

url = "https://cdn.example.com/vod/master.m3u8"

playlist = rayohx.inspect(url)
for variant in playlist.variants:
    print(variant.height, variant.bandwidth)

result = rayohx.download(url, "video.ts", quality="720p")
print(result.output.path, result.output.size_bytes)

Learn more

License

Apache-2.0. See LICENSE.

Metadata

Release files for rayohx 0.1.0

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

Source distribution (sdist)

Source distribution for rayohx 0.1.0
File Size Uploaded Provenance Actions
rayohx-0.1.0.tar.gz 890.5 kB With provenance Details for rayohx-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / rayohx-0.1.0.tar.gz

Download URL rayohx-0.1.0.tar.gz
Size 890.5 kB
Tags Source
SHA-256 checksum
How to use checksums
95edf8eb59cc7851b61ce11479a24e82badc4de0013da5f894c096c5d0adccc2
BLAKE2b-256 checksum
How to use checksums
684e365d1caf9facf9a3bc21b1c9fab68332cf9aaff3420358cdf019fcc336db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Release files / rayohx-0.1.0-py3-none-any.whl

Download URL rayohx-0.1.0-py3-none-any.whl
Size 172.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f137f971b09d99d3c585b5efb5c7c1b76960bd56730dda8fb9a5c6d37046f7ad
BLAKE2b-256 checksum
How to use checksums
d25c1ed2a171b5312fe7c045d26007727f0cdc5e24ffcb2cea5b955962582a33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Security for rayohx 0.1.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rayohx-0.1.0.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 Nov 21, 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

0.1.0 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