如何在iOS中实现视频DRM [英] How to implement video DRM in iOS

查看:507
本文介绍了如何在iOS中实现视频DRM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找在iOS视频播放器中实现DRM的方法,但是我不确定如何实现.为了实现视频DRM(同时仍使用Apple的硬件加速的H264解码),我需要一种将解密的H264流馈送到标准iOS视频播放API中的方法.

I'm looking to implement DRM in an iOS video player, but I'm not sure how to implement this. In order to implement video DRM (while still using Apple's hardware accelerated H264 decode), I need a way to feed the decrypted H264 stream into the standard iOS video playback APIs.

根据此问题,在2010年9月无法实施第三方DRM.有一个 Apple开发者论坛中的线程无法解决.但是,到目前为止,存在许多第三方DRM库: Widevine 马林鱼.他们清楚地找到了一种将自定义流传递给Apple认可的应用程序中的媒体播放器的方法.

According to this question, it was not possible to implement 3rd party DRM in September 2010. There's a thread in the Apple Developer Forums that goes nowhere. However, as of today a number of 3rd party DRM libraries exist: Widevine, Irdeto (PDF), Marlin. They have clearly found some way to pass a custom stream to the media player in Apple approved apps.

我找到了两个线索.一种建议是创建自定义URL协议,但人们似乎拥有将其与视频配合使用效果不佳.另一个是创建本地HTTP服务器线程,并通过iDevice内127.0.0.1上的HTTP实时流提供内容.我非常想确保苹果公司会批准那条路线.

I've found two leads. One is a suggestion to create a custom URL protocol, but people seem to have poor success using this with video. The other is to create a local HTTP server thread and provide the content by HTTP live streaming on 127.0.0.1 inside the iDevice. I'd like to be very sure that Apple will approve before going that route.

那么-第三方DRM实施使用哪些Apple批准的API来将解密的视频数据输入到视频播放器中?

So - what Apple approved APIs do 3rd party DRM implementations use to get decrypted video data into the video player?

最新的iOS BBC iPlayer 允许下载程序供以后查看.他们要么以明文形式存储内容,要么就解决了这个问题.

the latest BBC iPlayer for iOS allows programmes to be downloaded for later viewing. Either they store the content in the clear, or they have cracked this problem.

推荐答案

您可以开始将文件解密为另一个文件,并在解密时回放该文件.您需要让它缓冲几秒钟的视频,但它可以正常工作.

You can begin decrypting the file into another file and playback that file as you decrypt. You'll need to let it buffer a few seconds worth of video, but it will work.

此外,您还需要确保moov原子位于文件中mdat原子之前,否则它将不起作用. (例如,AVFoundation创建的MP4,其中moov原子位于mdat原子之后,因此需要对其进行修改才能起作用)

Additionally you'll need to make sure that the moov atom is BEFORE the mdat atom in the file, otherwise it won't work. (AVFoundation, for example, creates MP4s where the moov atom comes after the mdat atom, and so they would need to be modified to work)

这篇关于如何在iOS中实现视频DRM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆