Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ybandou/MSE-EME-ClearKey
A simple JS page to test EME (Encrypted Media Extensions) with ClearKey DRM using MSE (Media Source Extensions).
https://github.com/ybandou/MSE-EME-ClearKey
Last synced: 10 days ago
JSON representation
A simple JS page to test EME (Encrypted Media Extensions) with ClearKey DRM using MSE (Media Source Extensions).
- Host: GitHub
- URL: https://github.com/ybandou/MSE-EME-ClearKey
- Owner: ybandou
- Created: 2018-01-03T14:25:36.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-11T13:20:50.000Z (almost 7 years ago)
- Last Synced: 2024-08-02T02:16:03.915Z (3 months ago)
- Language: JavaScript
- Homepage: https://ybandou.github.io/MSE-EME-ClearKey/
- Size: 1.65 MB
- Stars: 19
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README #
A simple JS page to test EME (Encrypted Media Extensions) with ClearKey DRM using MSE (Media Source Extensions).
# media-source-loader-simple.js #
This JavaScript file provides a simple MSE implementation, reads the segments of the media and appends them
in the appropriate SourceBuffer.# encrypted-media-clearKey-handler.js #
This JavaScript file provides a simple clearKey EME implementation, checks the EME support, handles the "encrypted", "message" and
"keystatuseschange" events, and updates the CDM session with the right keys.
This implementation allows to play an encrypted media (video or audio or both).The Media is created with Bento4, like that :
mp4fragment --track audio audio-tracks.mp4 media_frag_audio.mp4
mp4fragment --track video audio-tracks.mp4 media_frag_video.mp4
mp4encrypt --method MPEG-CENC --key 1:c0c1c2c3c4c5c6c7c8c9cacbcccdcecf:0123456789abcdef --property 1:KID:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf --global-option mpeg-cenc.eme-pssh:true media_frag_video.mp4 media_frag_video_cenc.mp4
mp4encrypt --method MPEG-CENC --key 2:a0a1a2a3a4a5a6a7a8a9aaabacadaeaf:0123456789abcdef --property 2:KID:b0b1b2b3b4b5b6b7b8b9babbbcbdbebf --global-option mpeg-cenc.eme-pssh:true media_frag_audio.mp4 media_frag_audio_cenc.mp4
python ~/workspace/Bento4/Source/Python/utils/mp4-dash.py --exec-dir /usr/bin -o media media_frag_video_cenc.mp4
python ~/workspace/Bento4/Source/Python/utils/mp4-dash.py --exec-dir /usr/bin -f -o media media_frag_audio_cenc.mp4