pydash2hls


Namepydash2hls JSON
Version 2.1.5 PyPI version JSON
download
home_pagehttps://github.com/hyugogirubato/pydash2hls
SummaryPython library for converting DASH manifest files to HLS format.
upload_time2023-06-07 11:32:17
maintainer
docs_urlNone
authorhyugogirubato
requires_python>=3.7
licenseGPL-3.0-only
keywords manifest hls m3u8 dash
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyDash2HLS

[![License](https://img.shields.io/github/license/hyugogirubato/pydash2hls)](https://github.com/hyugogirubato/pydash2hls/blob/main/LICENSE)
[![Release](https://img.shields.io/github/release-date/hyugogirubato/pydash2hls)](https://github.com/hyugogirubato/pydash2hls/releases)
[![Latest Version](https://img.shields.io/pypi/v/pydash2hls)](https://pypi.org/project/pydash2hls/)

PyDash2HLS is a Python library for converting DASH (Dynamic Adaptive Streaming over HTTP) manifest files to HLS (HTTP
Live Streaming) format.

## Features

- Convert MPD files to HLS format.
- Support for remote and local MPD files.
- Retrieve media URLs for a specific profile.
- Handle DRM (Digital Rights Management) information in MPD files.

## Installation

You can install PyDash2HLS using pip:

````shell
pip install pydash2hls
````

## Usage

### Converter Initialization

To initialize the Converter class, you can use the following methods:

#### Initialization from a Remote URL

````python
from pydash2hls import Converter

# Initialize Converter from a remote URL
url = "http://example.com/manifest.mpd"
converter = Converter.from_remote(url)
````

#### Initialization from a Local File

````python
from pydash2hls import Converter
from pathlib import Path

# Initialize Converter from a local file
file_path = Path("path/to/manifest.mpd")
converter = Converter.from_local(file_path)
````

### Building HLS Manifest

To build an HLS manifest for a specific profile, you can use the `build_hls()` method:

````python
# Build HLS manifest for a profile
profile_id = "profile1"
hls_manifest = converter.build_hls(profile_id)
````

### Getting Media URLs

To retrieve a list of media URLs for a specific profile, you can use the `media_urls()` method:

````python
# Get media URLs for a profile
profile_id = "profile1"
media_urls = converter.media_urls(profile_id)
````

### Exceptions

The following exceptions can be raised by PyDash2HLS:

- `InvalidPath`: Raised when the file path is invalid.
- `InvalidFileContent`: Raised when the contents of the file are not in DASH format or are incompatible.
- `InvalidProfile`: Raised when the selected profile is invalid.
- `MissingRemoteUrl`: Raised when a remote file URL is required but not provided.

### License

This project is licensed under the [GPL v3 License](https://github.com/hyugogirubato/pydash2hls/blob/main/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hyugogirubato/pydash2hls",
    "name": "pydash2hls",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "manifest,hls,m3u8,dash",
    "author": "hyugogirubato",
    "author_email": "hyugogirubato@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e9/91/cfc843a241c1a278ecbfd6a4aa37fdfed7428d9bcf18260d0960b8ed08ea/pydash2hls-2.1.5.tar.gz",
    "platform": null,
    "description": "# PyDash2HLS\r\n\r\n[![License](https://img.shields.io/github/license/hyugogirubato/pydash2hls)](https://github.com/hyugogirubato/pydash2hls/blob/main/LICENSE)\r\n[![Release](https://img.shields.io/github/release-date/hyugogirubato/pydash2hls)](https://github.com/hyugogirubato/pydash2hls/releases)\r\n[![Latest Version](https://img.shields.io/pypi/v/pydash2hls)](https://pypi.org/project/pydash2hls/)\r\n\r\nPyDash2HLS is a Python library for converting DASH (Dynamic Adaptive Streaming over HTTP) manifest files to HLS (HTTP\r\nLive Streaming) format.\r\n\r\n## Features\r\n\r\n- Convert MPD files to HLS format.\r\n- Support for remote and local MPD files.\r\n- Retrieve media URLs for a specific profile.\r\n- Handle DRM (Digital Rights Management) information in MPD files.\r\n\r\n## Installation\r\n\r\nYou can install PyDash2HLS using pip:\r\n\r\n````shell\r\npip install pydash2hls\r\n````\r\n\r\n## Usage\r\n\r\n### Converter Initialization\r\n\r\nTo initialize the Converter class, you can use the following methods:\r\n\r\n#### Initialization from a Remote URL\r\n\r\n````python\r\nfrom pydash2hls import Converter\r\n\r\n# Initialize Converter from a remote URL\r\nurl = \"http://example.com/manifest.mpd\"\r\nconverter = Converter.from_remote(url)\r\n````\r\n\r\n#### Initialization from a Local File\r\n\r\n````python\r\nfrom pydash2hls import Converter\r\nfrom pathlib import Path\r\n\r\n# Initialize Converter from a local file\r\nfile_path = Path(\"path/to/manifest.mpd\")\r\nconverter = Converter.from_local(file_path)\r\n````\r\n\r\n### Building HLS Manifest\r\n\r\nTo build an HLS manifest for a specific profile, you can use the `build_hls()` method:\r\n\r\n````python\r\n# Build HLS manifest for a profile\r\nprofile_id = \"profile1\"\r\nhls_manifest = converter.build_hls(profile_id)\r\n````\r\n\r\n### Getting Media URLs\r\n\r\nTo retrieve a list of media URLs for a specific profile, you can use the `media_urls()` method:\r\n\r\n````python\r\n# Get media URLs for a profile\r\nprofile_id = \"profile1\"\r\nmedia_urls = converter.media_urls(profile_id)\r\n````\r\n\r\n### Exceptions\r\n\r\nThe following exceptions can be raised by PyDash2HLS:\r\n\r\n- `InvalidPath`: Raised when the file path is invalid.\r\n- `InvalidFileContent`: Raised when the contents of the file are not in DASH format or are incompatible.\r\n- `InvalidProfile`: Raised when the selected profile is invalid.\r\n- `MissingRemoteUrl`: Raised when a remote file URL is required but not provided.\r\n\r\n### License\r\n\r\nThis project is licensed under the [GPL v3 License](https://github.com/hyugogirubato/pydash2hls/blob/main/LICENSE).\r\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Python library for converting DASH manifest files to HLS format.",
    "version": "2.1.5",
    "project_urls": {
        "Homepage": "https://github.com/hyugogirubato/pydash2hls"
    },
    "split_keywords": [
        "manifest",
        "hls",
        "m3u8",
        "dash"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e991cfc843a241c1a278ecbfd6a4aa37fdfed7428d9bcf18260d0960b8ed08ea",
                "md5": "ef88a9522f7d5215e32d7edf84acefdc",
                "sha256": "d09c92632c130ae1fb74c272aa6de371565be362964ce28c7d997683586d19b8"
            },
            "downloads": -1,
            "filename": "pydash2hls-2.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "ef88a9522f7d5215e32d7edf84acefdc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 18456,
            "upload_time": "2023-06-07T11:32:17",
            "upload_time_iso_8601": "2023-06-07T11:32:17.915296Z",
            "url": "https://files.pythonhosted.org/packages/e9/91/cfc843a241c1a278ecbfd6a4aa37fdfed7428d9bcf18260d0960b8ed08ea/pydash2hls-2.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-07 11:32:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hyugogirubato",
    "github_project": "pydash2hls",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pydash2hls"
}
        
Elapsed time: 0.14954s