DevLARLEY / player.akamai.net.in

Saves the decrypted HLS manifests and implants the decrypted AES key
GNU General Public License v3.0
1 stars 1 forks source link

Issue related Akamai Decryption and Merging #1

Closed chintapakdumdum22 closed 2 days ago

chintapakdumdum22 commented 1 week ago

Dear Larley,

I hope you like this post. I used your N_m3u8DL-RE repo and I am having an issue with .tsa/.tsb/.tsc/.tsd/.tse fragment decoding. The fragment is not getting decoded properly which is giving an error while merging the decrypted fragment.

Can you improve the code? I will send you the m3u8 link with key and IV, you can test it and see what error is coming. I don't think it will be safe to attach the link here, you tell me where I can contact you, I will send you the m3u8 link.

Thank you for considering my issue I look forward to hearing from you.

Best regards, Aryan Raj

DevLARLEY commented 1 week ago

Some questions first:

chintapakdumdum22 commented 1 week ago

Yes, I downloaded the correct build of N_m3u8DL-RE (N_m3u8DL-RE_Beta_build-win-x64_20241014.zip). And I am dealing with all extensions .tsa/.tsb/.tsc/.tsd/.tse.

Please check this https://appx-transcoded-videos-mcdn.akamai.net.in/videos/yesofficer-data/137230-1729156619/hls-drm-82a1bc/360p/master-720267.1809834449.m3u8 KEY: 53a505853865cee5a9a0824f27e2c95f IV: 8487c82f16ba7271e2238bf58fe7f09f

DevLARLEY commented 1 week ago

You should use the HLS file generated by the python script as input to N_m3u8DL-RE.

chintapakdumdum22 commented 1 week ago

aka The generated json file also contains the hls-drm link with the base64 key and IV

DevLARLEY commented 1 week ago

Where did you get that manifest url from? The manifest should be encrypted in the secure-player response

chintapakdumdum22 commented 1 week ago

There is an edtech platform called yesofficer. I got this link from there.

Actually, I got the fragment link from the network section of developer tools. The fragment in the photo I have attached in the previous comment above is the same fragment link. And then I changed its extension with m3u8..

DevLARLEY commented 1 week ago

So:

chintapakdumdum22 commented 1 week ago

I have taken API (which is a link) from someone which gets the key and gives it to me. For this I have written a simple code which extracts URI from m3u8 link and appends it to API link and then gets the key from that API.

DevLARLEY commented 1 week ago

Does my script not work?

chintapakdumdum22 commented 1 week ago

Your script is working but only 1 out of 3 links is decrypting and merging correctly. Try downloading, decrypting and merging the link I sent in the previous comment (this one).

DevLARLEY commented 1 week ago

Works fine

chintapakdumdum22 commented 1 week ago

How ?

What command did you use?

DevLARLEY commented 1 week ago

N_m3u8DL-RE "yesofficer.m3u8" --base-url "https://appx-transcoded-videos-mcdn.akamai.net.in/videos/yesofficer-data/137230-1729156619/hls-drm-82a1bc/360p/" --del-after-done False --thread-count 1 yesofficer.m3u8:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-KEY:METHOD=AES-128,URI="yesofficer.key",IV=0x8487c82f16ba7271e2238bf58fe7f09f
#EXTINF:10.416667,
master-720267.1809834449-0.tsc
#EXTINF:10.416667,
master-720267.1809834449-1.tsc
...

yesofficer.key containing your key in bytes

chintapakdumdum22 commented 1 week ago

error It show error...

DevLARLEY commented 1 week ago

did you place ffmpeg in the folder?

chintapakdumdum22 commented 1 week ago

Yes, I placed ffmpeg in the same folder as N_m3u8DL-RE

DevLARLEY commented 1 week ago

Then I don't know. Download the newest version of ffmpeg?

chintapakdumdum22 commented 1 week ago

Yes, i am using newest version of ffmpeg which is 7.0.1.

N_m3u8DL-RE "yesofficer.m3u8" --base-url "https://appx-transcoded-videos-mcdn.akamai.net.in/videos/yesofficer-data/137230-1729156619/hls-drm-82a1bc/240p/" --custom-hls-key 53a505853865cee5a9a0824f27e2c95f --custom-hls-iv 8487c82f16ba7271e2238bf58fe7f09f --del-after-done False --thread-count 1

I used this command and it is showing me this error

Capture

DevLARLEY commented 1 week ago

Is the video playable? It was throwing these errors for me too When did the error change from Invalid data found when processing input to this?

chintapakdumdum22 commented 6 days ago

Invalid data found while processing input This error came because the key in 'yesofficer.key' was in bytes and IV was in hex. But when I gave this command

N_m3u8DL-RE "yesofficer.m3u8" --base-url "https://appx-transcoded-videos-mcdn.akamai.net.in/videos/yesofficer-data/137230-1729156619/hls-drm-82a1bc/240p/" --custom-hls-key 53a505853865cee5a9a0824f27e2c95f --custom-hls-iv 8487c82f16ba7271e2238bf58fe7f09f --del-after-done False --thread-count 1

the fragments got downloaded but not decoded properly. The downloaded fragments are playable but frames are getting stuck.

DevLARLEY commented 6 days ago

I had hicks too in the fragments, but the final video played fine.

chintapakdumdum22 commented 6 days ago

How did you do it?

DevLARLEY commented 6 days ago

By running the command I posted earlier and playing the video after waiting for it to finish