Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
HLS Stream : Encrypted TSHi everybody,
I'm trying to download a video from a website wich uses hls stream protocol. I managed to get the playlist file and all the ts files, but when I try to concatenate them with ffmpeg, it doesn't works obviously. In the playlist file, there a URI link to the key: Code:
#EXT-X-KEY:METHOD=AES-128,URI="link to the key",IV=0x3838c5776a2114c7233d9099fb7d7bf2 Code:
AttributeError: 'M3U8' object has no attribute 'key' Code:
D×>< AiB?a±?U<Á Thanks! |
#2
|
|||
|
|||
Re: HLS Stream : Encrypted TSDá»± ??n cao cá??p quá?*n 9 Rio Vista nh?* phố v?* biệt thá»± l?* dá»± ??n nh?* á»? cao cá??p của tá?*p Ä‘o?*n MIK Group. Ná?±m tá??i Khu biệt thá»± Khang Ä?iá»?n, ph?°á»?ng Ph?°á»›c Long B, quá?*n 9, Tp.HCM. Rio Vista l?* niá»?m tá»± h?*o tiá??p theo của MIK Group sau nhá»?ng dá»± ??n Ä‘?¬nh Ä‘??m tr?°á»›c Ä‘?? bao gồm: Villa Park quá?*n 9, Park Riverside, Park Riverside Premium & River Park.
T??n dá»± ??n: Khu d??n c?° cao cá??p Rio Vista Quá?*n 9 Chủ Ä‘á?§u t?°: Tá?*p Ä?o?*n MIK GROUP Quy m?´: 4.8 ha vá»›i số l?°á»?ng nh?* phố 234 cÄ?n v?* diện t?*ch má??ng xanh & tiện ?*ch ná»™i khu: 1 ha Loá??i h?¬nh nh?* á»?: nh?* á»?, nh?* phố th?°??ng má??i v?* biệt thá»±. B?*n giao: Ho?*n thiện ngo?*i sá»? há»?u sổ hồng vÄ©nh viá»…n v?* b?*n giao :4/2018 Dá»± ??n Rio Vista ná?±m tr??n Ä‘?°á»?ng D?°??ng Ä??¬nh Há»™i, Ph?°á»?ng Ph?°á»›c Long B, Quá?*n 9,TPHCM . Dá»± ??n ná?±m gá?§n khu biệt thá»± Gia H??a, khu Khang Ä?iá»?n, khu biệt thá»± Valora Nam Long . Dá»± ??n cÄ?n há»™ Rio Vista vá»›i nhiá»?u chức nÄ?ng nhá?±m Ä‘??p ứng nhu cá?§u của cuá»™c sống hiện Ä‘á??i v?* tiá??t kiệm tối Ä‘a thá»?i gian Ä‘i lá??i v?* nghỉ ng??i của c?° d??n m?* kh?´ng phá??i cá?§n Ä‘i Ä‘??u xa. Khu trung t??m th?°??ng má??i mua sá??m rá»™ng lá»›n Ä‘á?§y đủ tiện ?*ch khu c?´ng vi??n, c?? nhiá»?u má??ng xanh gi??p cho kh??ch h?*ng c?? nhá»?ng gi??y ph??t th?° giá??n tuyệt vá»?i b??n gia Ä‘?¬nh cafe sang trá»?ng v?* dịch vá»? chÄ?m s??c sức khá»?e: gym, spa… Ph??ng sinh hoá??t cá»™ng đồng dịch vá»? bá??o vệ chuy??n nghiệp 24/24 an ninh tuyệt đối, khu vui ch??i cho trá?» em, BBQ ngo?*i trá»?i cho cá?? gia Ä‘?¬nh …. Gi?? b??n dá»± kiá??n nh?* phố Rio Vista : (Xem cÄ?n há»™ thá»±c tá??) – Nh?* phố Rio Vista: 5?—15 – Gi?? 3,1 – 3,3 tá»·/cÄ?n (Ä??? VAT) , – Biệt thá»± g??c Rio Vista – Gi?? 5 – 7 tá»·/cÄ?n (Ä??? VAT) , – Shophouse Rio Vista : 5?—20 – Gi?? 4,5 – 5 tá»·/cÄ?n (Ä??? VAT) >>>Gá»?i ngay Ä‘á»? nhá?*n ngay bá??ng gi?? ?°u Ä‘??i<<<Chủ Ä?á?§u T?° Hotline :0911.3433.22 |
#3
|
|||
|
|||
Re: HLS Stream : Encrypted TSYes but the key looks very weird, don't you think? There' no extension in the key url and it looks like this:
|
#4
|
|||
|
|||
Re: HLS Stream : Encrypted TSSo if I understand right, the hexadecimal converted key should looks like this:
Code:
44c3973e3cda416942c2a361c2b1c3a03553cc381 Code:
import m3u8 from Crypto.Cipher import AES f = open('file.ts','rb') playlist = m3u8.loads(playlist) key = '44c3973e3cda416942c2a361c2b1c3a03553cc381' iv = '3838c5776a2114c7233d9099fb7d7bf2' # For the iv I guess I didn't have to put '0x' in front of it. aes = AES.new(key, AES.MODE_CBC, iv) for x in playlist.segments : r = urllib2.urlopen(x.uri) d = r.read() d = aes.decrypt(d) f.write(d) f.close() Code:
ValueError: AES must be either 16, 24, or 32 bytes long Thanks for your time! |
#5
|
|||
|
|||
Re: HLS Stream : Encrypted TSI've tried this way, but there's still a problem with the key. ffmpeg says "Invalid data found when processing output". You can see here that they had the same problem (comments at the end).
I've uploaded the key files I'm using, the thing is that I don't know what's wrong in it. Thanks |
#7
|
|||
|
|||
Re: HLS Stream : Encrypted TSQuote:
|
Tags: hls, key, m3u8 |
Thread Tools | |
Display Modes | |
|
|