播放加密的 MP4
Playing encrypted MP4
我正在制作一个(本地 - 多平台)视频保护应用程序,但我不知道第一个问题的正确解决方案是什么"encrypt->save on HDD" 然后 "load from HDD->decrypt->play" 加密视频。
我阅读了有关 MPEG-DASH 和一些 DRM 的信息并找到了这个 Bento4 命令:
mp4dash --encryption-key=000102030405060708090a0b0c0d0e0f:00112233445566778899aabbccddeeff --encryption-args="--property 1:ClearLeadFragments:10 --property 2:ClearLeadFragments:10" movie.mp4
但我不确定 MPEG-DASH 是否可以成为解决方案的一部分。
我该如何解决这个问题?
在 google 上多次搜索后,我在这里找到了 @erti-chris-eelmaa 的答案:
Playing encrypted video
I wrote my own Videoplayer using openGL+FFMPEG that could play mp4 and
decrypt each frame in the GPU using shaders. I also experimented with
another possible solutions, such as streaming from a webserver using
VLC. (VLC offers some kind of encryption/decryption when dealing with
streams), and yada yada yada.
Also one solution was to use 4 mediaelements(WPF) and the actual video
was virtually split into 4 areas and each area was rotated so the
video was not viewable. Once you loaded the video into 4
mediaelements, you could map out which part you wanted to show and
also rotate it back. But in all honesty, MediaElement is bad.
However I ended up exactly with what RomanR said. I built DirectShow
graph using mp4splitter, ffdshow, videorenderer and I modified
mp4splitter sourcefilter. The reading happens in
BaseSplitter/AsyncReader.cpp (just modify SyncRead function) that
mp4splitter uses.
If you would like to implement it yourself, just use MPC-HC project
and modify the filters as you like. It took me some time to get around
the DirectShow concept, but once you understand it, it becomes great
weapon.
HLS + S3 + CloudFront + MediaConvert + VideoJS。
我正在制作一个(本地 - 多平台)视频保护应用程序,但我不知道第一个问题的正确解决方案是什么"encrypt->save on HDD" 然后 "load from HDD->decrypt->play" 加密视频。
我阅读了有关 MPEG-DASH 和一些 DRM 的信息并找到了这个 Bento4 命令:
mp4dash --encryption-key=000102030405060708090a0b0c0d0e0f:00112233445566778899aabbccddeeff --encryption-args="--property 1:ClearLeadFragments:10 --property 2:ClearLeadFragments:10" movie.mp4
但我不确定 MPEG-DASH 是否可以成为解决方案的一部分。
我该如何解决这个问题?在 google 上多次搜索后,我在这里找到了 @erti-chris-eelmaa 的答案:
Playing encrypted video
I wrote my own Videoplayer using openGL+FFMPEG that could play mp4 and decrypt each frame in the GPU using shaders. I also experimented with another possible solutions, such as streaming from a webserver using VLC. (VLC offers some kind of encryption/decryption when dealing with streams), and yada yada yada.
Also one solution was to use 4 mediaelements(WPF) and the actual video was virtually split into 4 areas and each area was rotated so the video was not viewable. Once you loaded the video into 4 mediaelements, you could map out which part you wanted to show and also rotate it back. But in all honesty, MediaElement is bad.
However I ended up exactly with what RomanR said. I built DirectShow graph using mp4splitter, ffdshow, videorenderer and I modified mp4splitter sourcefilter. The reading happens in BaseSplitter/AsyncReader.cpp (just modify SyncRead function) that mp4splitter uses.
If you would like to implement it yourself, just use MPC-HC project and modify the filters as you like. It took me some time to get around the DirectShow concept, but once you understand it, it becomes great weapon.
HLS + S3 + CloudFront + MediaConvert + VideoJS。