The first lines of the M3U8file are as follows:
When I try to download with yt-dlp I get 403, even though I specify headers and cookies.HTML Code:#EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:13 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-KEY:METHOD=AES-128,URI="http://localhost:3001/key.dat",IV=0x4d1acfe1962002a4abedb8b68c65fa93,KEYFORMATVERSIONS="1"
I tried to download with hlsdl and got the same problem ({"error_code":403, "error_msg": "http"}), I can't get key
+ Reply to Thread
Results 1 to 30 of 41
-
-
Localhost key? Where did you get this m3u8 from? Site link?
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
-
-
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
There is an app for desktop and an account is required. I will try for desktop and let you know, thanks for your support.
I have a question, won't the request localhost:3001/key.dat also apply to the computer, what will be different if I try from the computer? -
I just find it easier to get stuff done when poking around a site on desktop. It's a preference. When you try to access localhost to get the key, make sure you keep all the headers from that request. You can copy its curl and play with it to get that key. If you can't get the key from localhost on desktop, you could try to detect the localhost request and manually export the response from the network traffic.
If you are lucky that key should be good to decrypt the hls stream. If it doesn't work with that key then that means it is altered by the app after it is received, and things get messier.
Edit: You can access it only through the help of an app? No browser site?--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
-
Hi, I tried with the desktop app.
URI value: https://xxx.com/xxx.php?c=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
When I try to download with ffmpeg, hlsdl and yt-dlp it gives 403.
When I make a request to the link the php file is downloaded. -
You obtained the key from localhost? That's good. Now get the m3u8 link of the stream with all its headers. Bad headers may give you 403 forbidden so just a link pointing to it may not be enough in this case. And then decrypt the stream using N_m3u8DL-RE and --custom-hls-key "keyfile" (the local key file you managed to download).
Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 31st Jan 2024 at 16:03.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
no, the URI in the m3u8 link had another link (https://xxx.com/xxx.php?c=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
here are the header values:
HTML Code:headers = { 'Host': 'xxx.net', 'Sec-Ch-Ua': '"Not.A/Brand";v="8", "Chromium";v="114"', 'Sec-Ch-Ua-Mobile': '?0', 'User-Agent': 'Mozilla/xxx', 'Sec-Ch-Ua-Platform': '"Windows"', 'Accept': '*/*', 'Origin': 'https://xxx.net', 'Sec-Fetch-Site': 'same-site', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Dest': 'empty', 'Referer': 'https://xxx.net/', # 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'en-US', }
-
This is the first line of the m3u8 file
HTML Code:#EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:13 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-KEY:METHOD=AES-128,URI="https://xxx.com/xxx.php?c=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",IV=0x4d1acfe1962002a4abedb8b68c65fa93,KEYFORMATVERSIONS="1" #EXTINF:12.133, media_b595000_sl_0.ts #EXTINF:12.1, media_b595000_sl_1.ts #EXTINF:12.134,
-
-
-
-
the main m3u8 connection contains Policy, Signature and Key-Pair-Id values (https://xxx.m3u8?Policy=xxx&Signature=xxx&Key-Pair-Id=xxx), but the content is "media_b595000_sl_0.ts". these values are not defined in the included tracks, could this be the cause?
Is there a command that works with the key.php file so I can use mp4decrypt or how can I get the hex value from the key.php file? -
this should be the key (the key file in hex)
Code:0d5ba7503d466dc46c934a19621e14a7
Code:mp4decrypt --key kid:0d5ba7503d466dc46c934a19621e14a7 encrypted_file.mp4 decrypted_file.mp4
Code:mp4decrypt --key 0:0d5ba7503d466dc46c934a19621e14a7 encrypted_file.mp4 decrypted_file.mp4 mp4decrypt --key 1:0d5ba7503d466dc46c934a19621e14a7 encrypted_file.mp4 decrypted_file.mp4
-
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
[Attachment 76668 - Click to enlarge]
Code:N_m3u8DL-RE "https://m3u8_link" --custom-hls-method AES_128 --custom-hls-key 0D5BA7503D466DC46C934A19621E14A7
-
-
-
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Hi,
It gives 403, the reason is that the Policy, Signature and Key-Pair-Id values are not specific in the parts in the m3u8 file.
sample track link:
https://xxx.net/media_b1128000_slTR_0.ts?Policy=xxx&Signature=xxx&Key-Pair-Id=xxx
Is there support to specify them with N_m3u8DL-RE? -
Similar Threads
-
howto-deal-with-HLS-128-bit-aes-encrypted-the-hard-one-2.0-version
By akshaysic in forum Video Streaming DownloadingReplies: 194Last Post: 18th Mar 2025, 05:26 -
Converting HLSdl Command to FFmpeg for AES-128 Encrypted Video Download
By GirlsGill in forum Video Streaming DownloadingReplies: 0Last Post: 31st Dec 2023, 07:50 -
howto deal with HLS 128 bit aes encrypted - the hard one
By code47 in forum Video Streaming DownloadingReplies: 63Last Post: 28th Dec 2023, 08:45 -
How do I download AES encrypted video streamed over HLS?
By Videogamer555 in forum Video Streaming DownloadingReplies: 1Last Post: 20th Jul 2022, 08:03 -
Help downloading AES-encrypted HLS video stream
By Woodswolf in forum Video Streaming DownloadingReplies: 26Last Post: 25th May 2019, 14:20