[Attachment 94120 - Click to enlarge]
help with decrypting flv live stream
VLC is somehow able to play the video, but it is partially corrupted, as shown above.
When attempting to play the stream on this website (https://bilibili.github.io/flv.js/demo/), I receive information regarding the decryption keys, as shown in the image below
[Attachment 94121 - Click to enlarge]
By providing the `key_id` to the license URL, I am able to retrieve the decryption key:
Code:https://jdrm-license-cf.@@@.com/api/v1/jdrm/th/GetEncryptKey?authKey=eyJhb..-pGokwDig5mMqz-E&key_id=16d994bf4f4111f0aac200163e323f7c { "message": "success", "request_id": "", "code": 1, "data": { "key_id": "16d994bf4f4111f0aac200163e323f7c", "key": "8820975b219c432abe197a99cf395bed", "enc_algo": "v1" } }
this python code should generate fresh URI from API (you may need middle east IP)
Code:import json import time from base64 import b64decode import requests as r #pip install requests def events(endpoint) -> dict | None: data=[] ts = int((time.time() - 300) * 1000) a = r.get(f"{b64decode(endpoint).decode()}{ts}").json() # json.dump(a,open("HOMEPAGE.json","w"), indent=2, ensure_ascii=False) cards = a.get('data',{}).get('cards') if not cards: raise ValueError("no cards at this time") for card in cards: cardId = card['id'] if not cardId.split(":")[0] == "MATCH_CARD": continue cells = card.get("cells", []) if cells: for cell in cells: match_info = cell['data']['body']['match_info'] logo = match_info.get('logo',{}).get('url_template',"") or match_info.get('cover_image',{}).get('url_template',"") matchId = match_info['match_id'] description: str = match_info.get('description',"Unkown Event") flv = match_info.get("live_plays",[])[0].get("pull_streams",{}).get('play_infos',[])[0].get('stream_info',{}).get('streams',[])[0].get('urls',[])[0].get('url', None) lice= match_info.get("live_plays",[])[0].get("pull_streams",{}).get('play_infos',[])[0].get('stream_info',{}).get('streams',[])[0].get('urls',[])[0].get("license",[]) data.append({ 'Name': description, 'id': matchId, 'LogoUrl':logo.replace(r"${img_ratio}", "original"), 'Video': 'best', 'Flv': flv, 'License': lice }) return data data = events("aHR0cHM6Ly9wdXNoLnRobWFueWFoY2RuLmNvbS9wcm9kL3NwbC1wdXNoLWFjdGl2ZS1hbmRyb2lkLmpzb24/dD0=") print(json.dumps(data, indent=2, ensure_ascii=False)) input("Press Enter to EXIT")
+ Reply to Thread
Results 1 to 1 of 1
-
Last edited by itti_KB9; 24th Oct 2026 at 17:10. Reason: video sample attached
Similar Threads
-
Encryption used in tencent 4k movies
By loxan in forum Video Streaming DownloadingReplies: 1Last Post: 25th Dec 2024, 07:24 -
Download from v.qq (tencent video)
By eltarrowsp in forum Video Streaming DownloadingReplies: 3Last Post: 16th Oct 2023, 21:05 -
How to download video from tencent or QQ with 4K
By kenryuakuma in forum Video Streaming DownloadingReplies: 0Last Post: 20th Apr 2023, 12:43 -
Download from v.qq (tencent video)
By xharxong in forum Video Streaming DownloadingReplies: 4Last Post: 16th Dec 2022, 01:47 -
Trying to download and play a Sample-Aes encryption live stream
By Shaico in forum Video Streaming DownloadingReplies: 4Last Post: 3rd Nov 2021, 13:37


Quote