videojs / videojs-contrib-dash

Video.js plugin for supporting the MPEG-DASH playback through a video.js player
https://videojs.github.io/videojs-contrib-dash/
Apache License 2.0
295 stars 128 forks source link

How to set ClearKey options in the player #194

Open mhassanist opened 7 years ago

mhassanist commented 7 years ago

Hello, I follow these steps to generate encrypted video ffmpeg -i input.mp4 -an -c copy video_only.mp4 ffmpeg -i input.mp4 -map 0:2 -c copy audio_only.m4a

ffmpeg -i video_only.mp4 -an -vcodec libx264 -s 1280x720 -c:v libx264 -b:v 384k -bf 2 -g 90 -sc_threshold 0 -an -strict experimental video_only_384kbps.mp4

MP4Box -dash 5000 -segment-name 'outputseg-%s' -url-template -bs-switching no -out output_not_encrypted.mpd -rap audio_only.m4a video_only_384kbps.mp4

MP4Box -crypt drm.xml audio_only.m4a -out audio_only_encrypted.m4a MP4Box -crypt drm.xml video_only_384kbps.mp4 -out video_only_384kbps_encrypted.mp4

MP4Box -dash 5000 -segment-name 'outputseg-%s' -url-template -bs-switching no -out output_enc.mpd -rap audio_only_encrypted.m4a video_only_384kbps_encrypted.mp4

I want tp play that encrypted content. I have the keys I used in Encryption (key&value).

How to attach them to the player ?

gesinger commented 7 years ago

Hey @mhassanist , this looks like it is similar to https://github.com/videojs/videojs-contrib-dash/issues/164

mhassanist commented 7 years ago

From #164 to #194 with no clear explanation of how to play encrypted video that was originally encrypted in clearkey format using mp4dash or mp4box.

Here is my latest trial with steps and successful play in Shaka player. https://github.com/videojs/videojs-contrib-eme/issues/20