Skip to main content

m3u8-dl

MIT license PyPI version Docker CodeQL Upload Python Package Downloads

A CLI program to download a video played using a m3u8 playlist. Read about m3u8 here https://en.wikipedia.org/wiki/M3U#M3U8

Dependencies

Usage

Setup without Docker

  • clone the repository using git clone "ssh/https url".
  • create a virtual environment using virtualenv -p python3.6 venv in linux terminal, see 'Dependencies' for platform specific instructions.
  • activate virtual environment using source venv/bin/activate in linux terminal, see 'Dependencies' for platform specific instructions.
  • install dependencies using pip install -r requirements.txt.
  • insert the url request headers in headers.txt.
  • start the script using python -m m3u8dl <url of playlist>.

Setup with Docker

Re-build docker image

  • build docker image using docker build -t m3u8dl-img .
  • start container docker run -d -it --name m3u8dl-app m3u8dl-img
  • attach to container via terminal docker exec -it m3u8dl-app bash
  • start the script using python3 -m m3u8dl <url of playlist>.

Pull exisiting docker image from github packages or docker hub

  • pull from docker hub using docker pull excaliburkrv/m3u8-dl
  • if not pulled from docker hub you can pull from github packages using docker pull ghcr.io/excalibur-kvrv/m3u8-dl:master
  • then start the container in detached mode using docker run -d -it --name m3u8dl-app excaliburkrv/m3u8-dl if pulled from docker hub
  • attach to container via terminal docker exec -it m3u8dl-app bash
  • start the script using python3 -m m3u8dl <url of playlist>.

Installing/Uninstalling Globally

Installation and usage using pip:-

  • ensure ffmpeg is installed see dependecies section
  • visit PyPI https://pypi.org/project/m3u8dl/0.5.2/ or install using below commands.
  • run pip install m3u8dl
  • run the program now using m3u8-dl <url-of-playlist>

Uninstalling using pip:-

  • run pip uninstall m3u8dl

Installation in ubuntu using PyInstaller:-

  • install pyinstaller using pip install PyInstaller
  • activate virtualenv using source venv/bin/activate
  • run pyinstaller main.py --name m3u8-dl --onefile -p venv/lib/python3.6/site-packages/ in terminal.
  • run sudo mv dist/m3u8-dl /usr/local/bin/ in terminal window.
  • now that the program is installed globally you can start the program using m3u8-dl in the terminal

Uninstalling in ubuntu:-

  • run sudo rm /usr/local/bin/m3u8-dl

CLI Options

--help, -h:- display how to use the script
--convert, -c:- specify this flag to convert the video to mp4 using ffmpeg`
--name, -n:- specify the name by which to save the downloaded video, else 'video' is chosen as default name`
--header-path, -p:- specify the path of header file`
--retry, -r:- specify number of retries, by default 5 retries will be initiated
--debug, -d:- print helpful messages to console to understand program flow
--processes, -m:- specify custom number of processes, default is 4
--threads, -t:- specify custom number of threads, default is 4 per process

Metadata

Release files for m3u8dl 0.5.2

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

Source distribution (sdist)

Source distribution for m3u8dl 0.5.2
File Size Uploaded Provenance Actions
m3u8dl-0.5.2.tar.gz 15.5 kB Without provenance Details for m3u8dl-0.5.2.tar.gz

Built distribution (wheel)

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

Total release size: 33.9 kB

Release files / m3u8dl-0.5.2.tar.gz

Download URL m3u8dl-0.5.2.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7f57f0927454fdbe89076a0f6843c7cef4bfffd830168fd21f5efa2ba9969f94
BLAKE2b-256 checksum
How to use checksums
876a2825ae6a085078f8eb5391c1da940589b72b5a56855bdccc28ce29f4c00d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / m3u8dl-0.5.2-py3-none-any.whl

Download URL m3u8dl-0.5.2-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7bb4e7681847e4f182974a30c61e7d837e1f21c815a36a43942cbe2fe0f3bf5
BLAKE2b-256 checksum
How to use checksums
2b5d797189046fcac011518f2214a929b6918be580a96405baf566809a0aec58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for m3u8dl 0.5.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.5.2 This release

2 release files No 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