Hello:
There are some live sports videos from some web site, I want to download the video in local disk and play back later on. I can see the video from Google Chrome browser, but using streamlink (version 3.1.1), the following command failed.
D:\Videos\Download>streamlink --http-header "Referer=https://live-streamfootball.com/" --hls-duration 00:00:3000 https://live.wowaha.tv/live/10/chunks.m3u8 best -o Test.mp4 -l debug
[cli][debug] OS: Windows 10
[cli][debug] Python: 3.9.8
[cli][debug] Streamlink: 3.0.3
[cli][debug] Requests(2.26.0), Socks(1.7.1), Websocket(1.2.1)
[cli][debug] Arguments:
[cli][debug] url=https://live.wowaha.tv/live/10/chunks.m3u8
[cli][debug] stream=['best']
[cli][debug] --loglevel=debug
[cli][debug] --output=Test.mp4
[cli][debug] --hls-duration=3000
[cli][debug] --hls-segment-threads=10
[cli][debug] --ffmpeg-ffmpeg=C:\Program Files\StreamLink\ffmpeg\ffmpeg.exe
[cli][debug] --http-header=[('Referer', 'https://live-streamfootball.com/')]
[cli][info] Found matching plugin hls for URL https://live.wowaha.tv/live/10/chunks.m3u8
[plugins.hls][debug] URL=https://live.wowaha.tv/live/10/chunks.m3u8; params={}
[utils.l10n][debug] Language code: en_US
[cli][info] Available streams: live (worst, best)
[cli][info] Opening stream: live (hls)
[stream.hls][debug] Reloading playlist
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] First Sequence: 789; Last Sequence: 794
[stream.hls][debug] Start offset: 0; Duration: 3000; Start Sequence: 792; End Sequence: None
[stream.hls][debug] Adding segment 792 to queue
[stream.hls][debug] Adding segment 793 to queue
[stream.hls][debug] Adding segment 794 to queue
Exception in thread Thread-HLSStreamWriter:
Traceback (most recent call last):
File "threading.py", line 973, in _bootstrap_inner
File "C:\Program Files (x86)\Streamlink\pkgs\streamlink\stream\segmented. py", line 200, in run
self.write(segment, result, *data)
File "C:\Program Files (x86)\Streamlink\pkgs\streamlink\stream\hls.py", line 162, in write
return self._write(sequence, *args, **kwargs)
File "C:\Program Files (x86)\Streamlink\pkgs\streamlink\stream\hls.py", line 177, in _write
decryptor = self.create_decryptor(sequence.segment.key, sequence.num)
File "C:\Program Files (x86)\Streamlink\pkgs\streamlink\stream\hls.py", line 88, in create_decryptor
return AES.new(self.key_data, AES.MODE_CBC, iv)
File "C:\Program Files (x86)\Streamlink\pkgs\Crypto\Cipher\AES.py", line 232, in new
return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
File "C:\Program Files (x86)\Streamlink\pkgs\Crypto\Cipher\__init__.py", line 79, in _create_cipher
return modes[mode](factory, **kwargs)
File "C:\Program Files (x86)\Streamlink\pkgs\Crypto\Cipher\_mode_cbc.py", line 274, in _create_cbc_cipher
cipher_state = factory._create_base_cipher(kwargs)
File "C:\Program Files (x86)\Streamlink\pkgs\Crypto\Cipher\AES.py", line 93, in _create_base_cipher
raise ValueError("Incorrect AES key length (%d bytes)" % len(key))
ValueError: Incorrect AES key length (64 bytes)
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 795 to queue
[stream.hls][debug] Adding segment 796 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 797 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 798 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 799 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 800 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 801 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 802 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 803 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 804 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 805 to queue
[stream.hls][debug] Adding segment 806 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 807 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 808 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 809 to queue
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[cli][error] Try 1/1: Could not open stream <HLSStream('https://live.wowaha.tv/live/10/chunks.m3u8', None)> (Failed to read data from stream: Read timeout)
error: Could not open stream <HLSStream('https://live.wowaha.tv/live/10/chunks.m3u8', None)>, tried 1 times, exiting
[cli][info] Closing currently open stream...
D:\Videos\Download>"C:\Program Files\streamlink\bin\streamlink.exe" --http-header "Referer=https://live-streamfootball.com/" --hls-duration 00:00:3000 https://live.wowaha.tv/live/25/chunks.m3u8 best -o Test.mp4 -l debug
[cli][debug] OS: Windows 10
[cli][debug] Python: 3.9.8
[cli][debug] Streamlink: 3.1.1
[cli][debug] Requests(2.26.0), Socks(1.7.1), Websocket(1.2.1)
[cli][debug] Arguments:
[cli][debug] url=https://live.wowaha.tv/live/25/chunks.m3u8
[cli][debug] stream=['best']
[cli][debug] --loglevel=debug
[cli][debug] --output=Test.mp4
[cli][debug] --hls-duration=3000
[cli][debug] --hls-segment-threads=10
[cli][debug] --ffmpeg-ffmpeg=C:\Program Files\StreamLink\ffmpeg\ffmpeg.exe
[cli][debug] --http-header=[('Referer', 'https://live-streamfootball.com/')]
[cli][info] Found matching plugin hls for URL https://live.wowaha.tv/live/25/chunks.m3u8
[plugins.hls][debug] URL=https://live.wowaha.tv/live/25/chunks.m3u8; params={}
[utils.l10n][debug] Language code: en_US
[cli][info] Available streams: live (worst, best)
[cli][info] Opening stream: live (hls)
[cli][debug] Checking file output
[stream.hls][debug] Reloading playlist
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] First Sequence: 1408; Last Sequence: 1413
[stream.hls][debug] Start offset: 0; Duration: 3000; Start Sequence: 1411; End Sequence: None
[stream.hls][debug] Adding segment 1411 to queue
[stream.hls][debug] Adding segment 1412 to queue
[stream.hls][debug] Adding segment 1413 to queue
Exception in thread Thread-HLSStreamWriter:
Traceback (most recent call last):
File "threading.py", line 973, in _bootstrap_inner
File "C:\Program Files\streamlink\pkgs\streamlink\stream\segmented. py", line 200, in run
self.write(segment, result, *data)
File "C:\Program Files\streamlink\pkgs\streamlink\stream\hls.py", line 197, in write
return self._write(sequence, *args, **kwargs)
File "C:\Program Files\streamlink\pkgs\streamlink\stream\hls.py", line 222, in _write
decryptor = self.create_decryptor(sequence.segment.key, sequence.num)
File "C:\Program Files\streamlink\pkgs\streamlink\stream\hls.py", line 121, in create_decryptor
return AES.new(self.key_data, AES.MODE_CBC, iv)
File "C:\Program Files\streamlink\pkgs\Crypto\Cipher\AES.py", line 232, in new
return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
File "C:\Program Files\streamlink\pkgs\Crypto\Cipher\__init__.py", line 79, in _create_cipher
return modes[mode](factory, **kwargs)
File "C:\Program Files\streamlink\pkgs\Crypto\Cipher\_mode_cbc.py", line 274, in _create_cbc_cipher
cipher_state = factory._create_base_cipher(kwargs)
File "C:\Program Files\streamlink\pkgs\Crypto\Cipher\AES.py", line 93, in _create_base_cipher
raise ValueError("Incorrect AES key length (%d bytes)" % len(key))
ValueError: Incorrect AES key length (64 bytes)
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1414 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1415 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1416 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1417 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1418 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1419 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1420 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1421 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1422 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1423 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1424 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1425 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1426 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] Adding segment 1427 to queue
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[cli][error] Try 1/1: Could not open stream <HLSStream('https://live.wowaha.tv/live/25/chunks.m3u8', None)> (Failed to read data from stream: Read timeout)
error: Could not open stream <HLSStream('https://live.wowaha.tv/live/25/chunks.m3u8', None)>, tried 1 times, exiting
[cli][info] Closing currently open stream...
D:\Videos\Download>
The request headers are shown below:
My question is: how I can add some parameter to streamlink to make the download working.
The M3U8 link can be some thing like:
https://live.wowaha.tv/live/2/chunks.m3u8
https://live.wowaha.tv/live/10/chunks.m3u8
https://live.wowaha.tv/live/20/chunks.m3u8
https://live.wowaha.tv/live/25/chunks.m3u8
The web site have other M3U8 links, if not like the above, then usually streamlink works, but for the above links, they always fail.
Please advise,
Thanks,
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 3 of 3
Thread
-
-
This post is identical to this one you made: https://forum.videohelp.com/threads/404592-How-to-download-some-HLS-and-save-to-local-...ing-streamlink
And the solution is STILL the same - we need the mother url of the page you are trying to download from so we can ascertain any errors you are making as to whether you have the correct m3u8 or mpd and / or any other required information to make the DL happen via any tools.
But; you should have realized you have answered your own question with this:
[Attachment 63541 - Click to enlarge]
Streamlink will not download encrypted segments. Read the docs.Last edited by codehound; 24th Feb 2022 at 17:44.
-
Hello:
You can get a number of similar URL from this web page: https://bingsport.com/
There are always some live sports games, you can click on any of the live games and view the underlying URL for M3U8 links.
During weekend, there are really a lot.
You can check now.
Similar Threads
-
Question how to download youtube with new streamlink
By jimdagys in forum Video Streaming DownloadingReplies: 9Last Post: 3rd Jun 2022, 09:43 -
Download from FUNIMATION with Streamlink
By minegroasprilla in forum Video Streaming DownloadingReplies: 6Last Post: 15th Apr 2021, 12:02 -
How to download movies from this site using streamlink?
By wan hassan in forum Video Streaming DownloadingReplies: 3Last Post: 28th Dec 2020, 09:47 -
How to download WE-PLAY.TV with Streamlink?
By minegroasprilla in forum Video Streaming DownloadingReplies: 2Last Post: 3rd Aug 2020, 14:30 -
How do I get Streamlink to auto download a YT Livestream once it goes live?
By calypso_blue in forum Video Streaming DownloadingReplies: 0Last Post: 3rd Oct 2019, 19:44