Code Monkey home page Code Monkey logo

hls-downloader's Introduction

hls-downloader

Download all files as is from HLS (HTTP Live Streaming) VoD (Video on Demand) playlist m3u8 from https://developer.apple.com/streaming/examples/

Python application

Python 2 suport

Branch python2 should work in Python 2

Requirements:

  • m3u8
  • python-slugify
  • requests

Usage:

python main.py 'http://some.m3u8' /some/dir/for/files/

Known Issues:

  • No encryption/decryption supported yet

hls-downloader's People

Contributors

denex avatar denivyruck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hls-downloader's Issues

FEATURE: Add support for live streams

Playlist is not endlist. Only VOD Playlists are supported

example m3u8 file of livestream.

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:13
#EXT-X-MEDIA-SEQUENCE:29
#EXTINF:10.427778,
hls_360p_0029.ts
#EXTINF:4.546511,
hls_360p_0030.ts
#EXTINF:10.427778,
hls_360p_0031.ts
#EXTINF:10.427778,
hls_360p_0032.ts
#EXTINF:10.427778,
hls_360p_0033.ts

hls_360p.m3u8.zip

TypeError: slugify() got an unexpected keyword argument 'lowercase'

File " hls-downloader\downloader.py", line 30, in filter_filename_part
result = slugify.slugify(string, lowercase=False, regex_pattern=allowed_pattern)
TypeError: slugify() got an unexpected keyword argument 'lowercase'

testslug.py

import slugify
import re


def test(string,allowed_pattern=re.compile(r'[^-.@!\w]+', re.IGNORECASE)):
      
        result = slugify.slugify(string, lowercase=False, regex_pattern=allowed_pattern)
        return result
        
        
string="some"


test(string)          

Traceback (most recent call last):
File "testslug.py", line 14, in
test(string)
File "testslug.py", line 7, in test
result = slugify.slugify(string, lowercase=False, regex_pattern=allowed_pattern)
TypeError: slugify() got an unexpected keyword argument 'lowercase'

Add option to ignore SSL verification

Server in this URL has incorrect certificate. There should be an option to ignore verification errors.

C:\Users\shahi\Desktop\hls-downloader-master>python main.py -v https://cdn1live.irib.ir/live-channels/smil:nasim/playlist.m3u8?s=GNRxCLRXueTW8gbQPyzqrg&t=1577000338 ./
usage: main.py [-h] [-v] url_to_m3u8 download_dir
main.py: error: too few arguments
't' is not recognized as an internal or external command,
operable program or batch file.

Originally posted by @shahinesi in #3 (comment)

Add ability to select the video and audio stream

I would like to request the addition of a command to show the available video and audio streams and then an option to select a stream.

Something like
python main.py https://hi.com/test.m3u8 --list
To get the available formats
And

python main.py https://hi.com/test.m3u8 -v 1 -a 2 ./out.mp4

Also, an option to add encoding options for ffmpeg would be terrific

Question

Could you please put show me an example of how to run this? I can't figure it out :(

not support AES-128 decryption

not support AES-128 decryption

#EXTM3U
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:NO
#EXT-X-VERSION:2
#EXT-X-KEY:METHOD=AES-128,URI=

Python3 m3u8 problem

In my case I had an error loading m3u8 package, athouhg I already installed it with pip3 (for some reason is not listed in the requirements).
It can be fixed via installing a fork
pip install --upgrade git+https://github.com/globocom/m3u8.git
And also, because python3 might not be the default python interpreter in the system, i prefer starting the command with python3

MacOS 10.14.6
Python 3.7.6
pip 19.3.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.