Abema Dash Encryption Decryptor
- About
- What This Is
- Requirements
- Usage
- FAQ
- 1. Work on Premium?
- 2. How to Get a KID?
- Issues
This project provides code to decrypt the encryption used by:
https://license.p-c3-e.abema-tv.com/abematv-dash
All processing is implemented purely in Python, without relying on Node.js or similar environments.
This repository is a continued / extended version of the original project:
👉 https://github.com/NyaShinn1204/abema-dash-decryptor
- Python 3.12 or later
- Japan VPN
- See
requirements.txtfor Python dependencies
First, clone the repository:
git clone https://github.com/China-chan/pydabemaAfter cloning, you can use pydabema as a module:
import pydabema
response = pydabema.decrypt(
content_type="program", # Target content type
content_id="19-171_s2_p38", # Target content id
kid="KTofq8TORPmxAFWIYyODfg" # Target content kid
session=None, # Optional session (e.g., use premium)
member_id=None # Optional session info
)
⚠️ Note: Argument details may vary depending on the implementation.
The manual.py script is included inside the cloned repository under pydabema/.
Run it with:
python -m pydabema.manualor:
python pydabema/manual.pyFollow the on-screen instructions and enter the URL when prompted.
Yes, it works. However, you need a token that grants access to premium content to run it.
Here's how:
import requests
import pydabema
session = requests.Session()
session.headers.update(
{
"authorization": "Bearer eyXXXXXX....."
}
)
member_id = "CSKoXXXXXX....."
response = pydabema.decrypt(
content_type="program", # Target content type
content_id="90-2046_s1_p801", # Target content id
kid="Fh1Id0HBSVeIyQ0_humWCw" # Target content kid
session=session, # Optional session (e.g., use premium)
member_id=member_id # Optional session info
)Open the following URL in your browser:
https://ds-vod-abematv.akamaized.net/program/{episode_id}/manifest.mpd
Replace {episode_id} with the target episode ID.
Example:
19-171_s2_p1
Search in the MPD file for the following tag:
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"/>
Copy the value of cenc:default_KID.
The extracted KID must be converted into a Base64 (URL-safe) format.
Example in Python:
import base64
kid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
kid_base64 = base64.b64encode(
bytes.fromhex(kid.replace("-", ""))
).decode("utf-8").replace("==", "").replace("+", "-").replace("/", "_")
print(kid_base64)- Remove all
-(hyphens) before converting. - The result is a URL-safe Base64 string.
If you encounter any problems, please open an issue on the repository.