Specifically from Rakuten TV (live.tv.rakuten.co.jp)
FMI: https://cdm-project.com/How-To/ & https://old.reddit.com/r/Piracy/comments/y30ffr/
- Install Tampermonkey: https://www.tampermonkey.net/
- Install yt-dlp: https://github.com/yt-dlp/yt-dlp#installation
- Install ffmpeg: https://ffmpeg.org/download.html
- Download Bento4: https://www.bento4.com/downloads/
- Have a proxy/VPN if you're not in Japan since stuff is geolocked
- Install this userscript: https://greasyfork.org/en/scripts/373903-eme-logger
- Search browser JS Console for
MediaKeySession::generateRequest, then press play on the video and look under "Init Data" - Get something like
AAAAMnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAXXXXXXXXFtoyTEzFOZDD4T9lmTiI=
- After doing the above, go to your browser developer tools' Network tab and search for
Widevine - Right click > Copy > Copy link address
- Get something like
https://azcp001.keydelivery.japaneast.media.azure.net/Widevine/?kid=e0c5b68c-9313-314e-6430-f8XXXXXXXX22
- Left click on the Widevine entry from the above steps, under the "Headers tab" scroll down to "Request Headers"
- Copy the following lines & do some manual formatting, get something like:
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,ja-JP;q=0.8,ja;q=0.7
Authorization: blahblah
Cache-Control: no-cache
Content-Length: "blahblah"
Origin: https://live.tv.rakuten.co.jp
Pragma: no-cache
Referer: https://live.tv.rakuten.co.jp/
User-Agent: blahblah
- Open https://cdrm-project.com/
- Input the results from the previous steps and press "Send"
- Hopefully see the "SUCCESS" message along with a key that looks like
e0c5b68c93133XXXXXXXX84fd9664e22:499047f36b770957XXXXXXXX9dfc4033
- In the developer console Network tab, search for
mpd - Find something that starts with
Manifest, right click and copy the URL, e.g.https://azclwds01.akamaized.net/9dc3547a-ede5-4aed-841f-5cXXXXXXXX0f/tXyKyP_tab_hd.ism/Manifest(format=mpd-time-csf,encryption=cenc,filter=pc_hd_001) - Run the Terminal command:
yt-dlp --allow-unplayable [url] - Get two files, an .mp4 and an .m4a
- In Bento4's
bin/folder, find themp4decryptcommand line utility - Navigate to this folder in your Terminal and run
mp4decrypt --key [yourkey] /path/to/corrupted.file /path/to/fixed.fileon both files - Run
ffmpeg -i fixedvideo.mp4 -i fixedaudio.m4a -c:v copy -c:a copy output.mp4 - The end

Thank for fast reply. I indeed found it but there are two streams on lots of videos. I tried this for the second one i i get a error. The first one worked with this comment. It didnt seem to work with the last step on the guide. I counldnt decrypt it. When using request headers the way the guide provides i get an error on cdmpool but it still created an key. How can i download from the m3u8 link the videos on stream 1 and stream 2? Thanks in advance
n-m3u8DL-RE -M format=mp4 --key 0001970572fa5e8eacb92a7349842dfe:baa584f641c592d403e0f4f393d5a61a --auto-select --tmp-dir "/home/anon/videos" --save-dir "/home/anon/" --save-name "herdenking2" https://sk-video.cdn.beeldengeluid.nl/HERDENKINGVAN-HRE0002F83D/cmaf/master.m3u8?CloudFront-Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9zay12aWRlby5jZG4uYmVlbGRlbmdlbHVpZC5ubC9IRVJERU5LSU5HVkFOLUhSRTAwMDJGODNELyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3ODk0OTMwODJ9fX1dfQ__&CloudFront-Signature=X0jPzYh17zS9Xt~yTykP~KuUpPEpkIJruKBmZAUZzblYsqqfbMkLpdaloLyIOqRE3Lb4VpI~-1ru6kTfEtDu~GO9961Yq1IwZOBFRvYGVp9qYDhjxcmRW6Jmu4ogq-P224HMDvcqeFqcq-3XsU9psK9dzCXfWLG2nj-fajLecSjvQNt6me4tH999ent7idkkFYXBb~piK2pD6TVEpUrU0n1nKSgiBjFeHi2~pgAH9rdnPaM~NkLZxSMZG2aAwG9LObowUXYNHKwmlw8BUyxQgIWD5xJ8l2VXwD7lyeWzrsIdZJeJO7XneZAlIwN2yWF4rARGPDTvYipngxVME43l7w__&CloudFront-Key-Pair-Id=K1C5L1HDJC2G68&Expires=1789410282&Signature=Af8nBfWVFeWZxasCwK973G8NKqITsFTKjFPpCBIBQlQfirwyVnJKG4td6vn9ZkllfAlxnuqDLE4cB7Cp65uDSg93C8A3R2FtFehg17znBOqDpXko-CmMpfeGq2jBDszCikBYGORVL2OSQjBfrepfiRuGio5UZA6gzp~mZpSyme7wkwZai0fy2Y~OD8bqpEbt~eByQ~rhXi94N0y-eCFK50FftZRk8ocZpuXUL3wC7aePDODjHr5MsFBWCCpoixzaOQH7AJpfjy0vTlLBAX8AnhEP-ExoiCjXGeVCAZK864MpV42gYFLqQr~9GbFq8veAKBCAMUiDncjOnjscnDqlbg__&Key-Pair-Id=K1C5L1HDJC2G68
here is pic of the error
https://ibb.co/CKhg4k9G