VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Hi all,

    I have an M3U8 file that looks like this:
    HTML Code:
    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-TARGETDURATION:6
    #EXT-X-PLAYLIST-TYPE:VOD
    #EXTINF:6.080000,
    #EXT-X-KEY:METHOD=AES-128,URI="key_rotation_4040-link",IV=0xc6de934ec7a81e95e66f626265c12f68
    segment-1.ts
    #EXTINF:6.080000,
    #EXT-X-KEY:METHOD=AES-128,URI="key_rotation_4041-link",IV=0xee2ced88ee46155f8083c1f02e16a896
    segment-2.ts
    #EXTINF:6.080000,
    #EXT-X-KEY:METHOD=AES-128,URI="key_rotation_4042-link",IV=0x1e4abb1c1a8e2b5d916797e28f9e3c27
    segment-3.ts
    #EXTINF:6.080000,
    #EXT-X-KEY:METHOD=AES-128,URI="key_rotation_4043-link",IV=0xeadab56884fed1558fdcf6ef044fe432
    segment-4.ts
    #EXTINF:6.080000,
    #EXT-X-KEY:METHOD=AES-128,URI="key_rotation_4044-link",IV=0x55c5c983f8847a32f7f0fc96eff80cf0
    segment-5.ts
    (just removed the links and changed to the files I saved)

    I downloaded all the key and ts files, but no matter what I tries, I wasn't able to decrypt and merge the files.
    Tried mainly CMDs like this:
    ffmpeg -allowed_extensions ALL -i playlist.m3u8 -c copy video.mkv
    Any ideas? Is there some other key missing?
    Thanks!
    Quote Quote  
  2. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Pick a random fragment and its corresponding key/iv. Can it be decrypted on its own?
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  3. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Pick a random fragment and its corresponding key/iv. Can it be decrypted on its own?
    No, getting this:
    HTML Code:
    [hls @ 000001537776da00] Skip ('#EXT-X-VERSION:3')
    [hls @ 000001537776da00] Opening 'D://tmp//key.4040' for reading
    [hls @ 000001537776da00] Opening 'crypto+D://tmp//1080.1.ts' for reading
    [hls @ 000001537776da00] Error when loading first segment 'D://tmp//1080.1.ts'
    [in#0 @ 000001537776d680] Error opening input: Invalid data found when processing input
    Error opening input file tmp-single.m3u8.
    Error opening input files: Invalid data found when processing input
    Quote Quote  
  4. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by ZIPC View Post
    No, getting this:
    That's interesting. Could you upload only one random fragment and write the key/iv (or upload the key if you have it stored in a file as bytes)? I wanna check something.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  5. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Originally Posted by ZIPC View Post
    No, getting this:
    That's interesting. Could you upload only one random fragment and write the key/iv (or upload the key if you have it stored in a file as bytes)? I wanna check something.
    Sent in DM, thanks!
    Quote Quote  
  6. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by ZIPC View Post
    Sent in DM, thanks!
    I tried manually decrypting via a script using the CBC mode of AES 128 just to make sure this stuff you sent is valid. And I have some doubts regarding that key. I think it is not the right one. I may be wrong but to me it doesn't look ok. It is 16 bytes in length though which is good but it can't be used for the corresponding fragment.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  7. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Originally Posted by ZIPC View Post
    Sent in DM, thanks!
    I tried manually decrypting via a script using the CBC mode of AES 128 just to make sure this stuff you sent is valid. And I have some doubts regarding that key. I think it is not the right one. I may be wrong but to me it doesn't look ok. It is 16 bytes in length though which is good but it can't be used for the corresponding fragment.
    Tried sending you the original M3U8... maybe I'm downloading/approaching in the wrong way?
    Quote Quote  
  8. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by ZIPC View Post
    Tried sending you the original M3U8... maybe I'm downloading/approaching in the wrong way?
    I've taken a look. This stuff is complex. The URL contains "key_rotation". And the key rotation is a complex mechanism in which encryption keys can be updated time to time. Now if you said you download all the keys and all the fragments, the keys should match, but they don't. Taking a blind guess, I would say the keys are for the "wrong" version of fragments (I may be talking nonsense here, I'm not an expert in security).

    Or the keys after being received are altered through some unknown steps that can be understood by debugging javascript code. If I were in your place, I would play around with the JS code to see what happens to the encryption key for a specific fragment. Try and find the part where it actually does the decrypting.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!