What to achieve:
I need to support offline videos on android device just like Netflix and prohibiting its distribution using DRM support.
What I've done till now:
I've converted a sample video into m3u8 format using Shaka Packager. Used this link https://google.github.io/shakapackager/html/tutorials/widevine.html
Problem faced:
1. Is this enough for DRM protection?
2. I know i'll have to use Licensed Widevine Server, which I'm unable to find anywhere on how to get one. Please help me out on this.
3. I suppose for point 2 I have to store a secret key on server. This same key will be used on android device to enable the video player. I'm a little confused on how to setup this.
Thanks in advance!!
You probably want to use MPEG-DASH instead of HLS. Widevine doesn't support HLS as the packaging format, and MPEG-DASH is what pretty much all Widevine content is packaged as.
The shaka packager documentation has information on both how to package DASH and apply DRM.
In order for DRM to work, you will, as you mention, need a Widevine License Server. You have to options for this. Option 1 is to become a CWIP yourself, the other is to work with an existing CWIP. You are also correct that the key used to encrypt the content should be stored on the license server side. Some of the more popular providers might be DRMToday and BUY DRM.
When you have your content, and the license server, the last piece you need is a video player. For Android, the most popular player is ExoPlayer which is developed at least partially by Google. ExoPlayer has documentation on how to work with Widevine and has a downloader component.
Related
I am new to mobile programming, and I am making an application which will play video files. I am trying Azure media service (AMS) with Xamarin Forms. I would like to know how to it works to have a file that will play with Widevine on android and Fairplay on IOS.
I need explanations!
Thanks in advance!
The implementation on the client side for those different DRM's is about as different as you can imagine. Xamarin.Forms does not out of the box provide a component that can handle the DRM specific methods. You will likely need to create platform specific plugins for that or find a ready-made component for that - although in my search i haven't found that. The closest is a cross platform video player such as https://github.com/adamfisher/Xamarin.Forms.VideoPlayer
Also, you are not likely to get a file to play, it will likely be a stream with different manifests for the two platforms. Azure Media Services however can do that on the fly from a set of MP4's. So it might look like MP4's but what is actually served to the client is a video manifest file.
There is no library/component in Xamarin that allows you to handle multiple DRM schemes. Your best option is to use platform libraries wrapped, to be able to consume DRM content. I would check out the Inside Secure DRM solution, that allows the playback of the DRM Schemes that you listed.
I was reading several tutorials about how to use the Youtube Api. Just to find out after I implemented it. That it was not working when the original Youtube App was not installed on device. In the tutorials I read this was not mentioned. Just in original doc's it says:
The API client library interacts with a service that is distributed as a part of the YouTube app for the Android platform
If that is the case I think it is an exclusion criterion. Cause it forces the user to install another 20mb sized app.
So my question would be if there is another way to play youtube Videos.
One possibility is to use HTML5 player in a web-view. But It may have compatibility issues with older android OS and experience may vary from device to device.
i am working on an application like you tube in which i want to implement offline feature. Please suggest where i save the video file so that user can not access it outside from the application.
I had already did some R&D on this part and found that we can save the video in application private storage but i think only limited amount of data we can save in application private storage , so this approach is not beneficial in my case.
Then please suggest how can i achieve this in android ?
Thanks in advance.
I think from your description that you probably want to use DRM - this will not 'hide' where the video is stored but it will encrypt the video so that only someone with the right key can watch it.
There are a number of widely available DRM schemes - Widevine modular is one example that will support the offline behaviour you are looking for.
If you don't feel you need the features of a full DRM implementation you could just encrypt the video yourself and build a simpler mechanism to get the key to a valid user (this is essentially what DRM systems do, albeit with more techniques and tricks to keep the key safely secret)>
I'm developing mobile apps for iOS and Android. Mostly iOS. One of the clients has a fairly big repository of self-created videos (70+), which the companion website hosts on Vimeo at the moment. I investigated some time to find out, that Vimeo doesn't want and support HTTP live streaming to ease up embedding such videos in an iOS app. But perhaps I'm missing something here.
My question is: What is the best way for hosting videos to embed them in an (iOS) app? I explicitly don't want to use an HTML frame, like UIWebView, for this.
I already have some solutions in mind:
self-hosting, since HTTP live streaming isn't rocket science anymore (think real networks streaming services a few years ago)
YouTube
Vimeo (they got their own iOS app, so they have to do some streaming for themselves, perhaps sniffing the network traffic can lighten things up)
I'm afraid this list isn't complete. So perhaps somebody has some superb ideas on that topic. And yes, commerical plans aren't a show stopper if they're reasonable priced.
Google will be presenting a YouTube API in a few weeks at the Google I/O - perhaps that might be perfect for you.
I just found out that Vimeo has introduced another paid plan apart from the established »Plus« plan: »Pro« for companies ($199/year). One of its features is HTTP live streaming. A staff member states on the forum:
We do support http live streaming. And to answer your initial question, our normal embed code will not recognize when http live streaming is appropriate, nor will it automatically switch over to it. Consequently, you will need to use a third party player with the Http live streaming link in your video's Settings page for your video to play with http live streaming.
But there's a one caveat at the moment: you can't directly access the link to the HTTP streaming playlist via Vimeos API. There's a post on their API forum where people can vote for certain features: Vimeo API forum: http live streaming link through API
We are developing plugins which convert media file as the source and convert in to other format that can be used by DLNA compatible device in android.
Any help on how to deal with media and its file format and convert into DLNA file format..
Any idea will be appreciable...
Thank you
There are several containers and codecs supported by DLNA, most of which can be created with FFmpeg.
Specs: http://www.dlna.org/industry/why_dlna/key_components/media_format/
Now do you plan to do the conversion on the device or will a server be involved? There are several servers on this approved / supported list: http://www.rbgrn.net/content/21-how-to-choose-dlna-media-server-windows-mac-os-x-or-linux
If you plan to do conversion on the device, there are ports of FFmpeg that run on Android but your mileage will vary of course.
You may also be interested in using Kik API for sharing rich content and media with other mobile app users. You can build your app on top of Kik Messenger and use Kik's own transport, infrastructure and userbase to share content from your mobile app. This API is available for Android and iPhone, and in simpler scenarios it takes only about 5 lines of code to integrate. There is more info on Kik API website: http://www.kik.com/dev and http://apiblog.kik.com
Disclaimer: I'm one of the developers behind Kik API :)