We have a responsive web app (html5 + AngularJS) w/ an API (Web API, c#). Both the web app and api are hosted on Microsoft Azure and media files (images, files, videos, ...) are stored in Azure Blob Storage
The use case is the following:
1) User A uploads a video via the API
2) The API needs to fix the rotation of the video to avoid videos recorded in portrait mode to show stretched in full screen on Mobile Chrome in Android (Vertical Video Syndrome https://www.youtube.com/watch?v=Bt9zSfinwFA)
3) If User B has rights to access the video (not all users of the platform have), he should be able to stream the video
I was looking to use Azure Media Services (https://azure.microsoft.com/en-us/blog/advanced-encoding-features-in-azure-media-encoder/) to rotate the video and therefore implement step 2.
What would be the best way to implement 3, e.g, protect the content in order to ensure that only specific users of the platform have access to the video?
Thank you.
Answering your question at the end: 'What would be the best way to implement 3, e.g, protected the content in order to ensure that only specific users of the platform have access to the video?':
You have different options depending on the level of protection you require:
'hide' the video url in an area of your site which requires login with the right access to see it
use a token in the URL to control access to the video
use a DRM scheme to protect the video
The DRM approach is the most secure as it also protects you against the user copying or saving and redistributing the video.
As you are using Azure you might want to look at Azure's content protection - if you are using a different video hosting service they will usually have similar guidelines:
https://azure.microsoft.com/en-us/services/media-services/content-protection/
You can use Azure Media Services AES encryption to deliver encrypted adaptive bitrate streams using MPEG-DASH or HLS, and use JWT tokens to authenticate the user for access and decryption.
This is the same model that we use with Microsoft Stream (http://stream.microsoft.com). In the case of Stream, we use Azure Active Directory for authentication and JWT tokens.
There are a couple of sample blogs out there on the basics of how to do this.
http://gtrifonov.com/2015/01/03/jwt-token-authentication-in-azure-media-services-and-dynamic-encryption/
http://mingfeiy.com/how-client-pass-tokens-to-azure-media-services-key-delivery-services
Related
I am developing a virtual classroom app for coaching centers
I want to use Vimeo native playback in Android and iOS app of the students
Does Vimeo support Android /iOS Native playback for my app end users?
Because I cant understand the terms in their repo
Native playback
The basic requirements for native playback are:
User must be logged in.
User must be the owner of the video.
User must be PRO or higher (or the app must have the "can access owner's video files" capability).
Token must have the video_files
scope.
User must be the owner of the API app making the request.
please explain me
Yes, Vimeo supports native playback for Android and IOS. An example of this can be referenced to ct7ct7ct7's Android-VimeoPlayer on GitHub.
For extra features, it looks like the app owner must have a PRO account in order to make the video look custom to your application.
You can read more about it here under embedding videos in vimeo.
I currently have an IPTV subscription and as a fun little side project I decided to create a multiplatform IPTV app. However, I'm running into some trouble when trying to stream video.
The .m3u playlist I am currently using has streaming links, however they do not end in .m3u8 as I am usually accustom to.
When I do a get request to the link in insomnia, it begins to download content with a MIME type of video/mp2t.
I have tried using hls.js along with a few other html video players however I cannot seem to get it to work.
The playlist does work with VLC!
I feel like I am missing something, just not sure what.
Thanks!!
If your IPTV service has content that the service provider wants to restrict then they may encrypt the content, use DRM and/or obfuscate the access to the manifest files and segments streams.
The reason they do this is to ensure that only their apps can be used to playback the content - this does not always have to be just for paid services as the content owner may require the content to be encrypted even for free IPTV services.
You can still do your experiment and build your multiscreen project using test streams which are available online - there are both DASH and HLS online streams available in a number of places. see here for a useful list:
https://bitmovin.com/mpeg-dash-hls-examples-sample-streams/
Can I use Vimeo in my web application to record a video from my laptop which is connected to a camcorder ? Camcorder exposes JAVA API's which supports START / STOP / Zoom-in and all other camera options.
Vimeo was not created to record a video. It's just a video hosting platform similar to youtube but for professionals.
You need to be doing the recording and then use either their interface or their API to upload a video.
In your case, you could imagine creating an intermediate application that connects to your Camcorder's exposed API, gets the recorded video, and uploads it using Vimeo's API.
Here is an official list of libraries and sdk's that Vimeo proposes to simplify the API usage.
I have a website that has a web page with a html5 video-tag, and the user can supply a URL, and it will play in the video-tag.
The webpage uses JavaScript commands that control the video-tag - for instance, it can pause the video, move to a different point in the video, etc.
It works fine with the cloud. Videos stored on Microsoft Azure can be used, for instance (Azure gives you a way to get a URL to any video on your cloud storage, and streams it too).
However, I have users that store videos on Google-drive, and also on Microsoft One-Drive.
From what I can see, I can play these videos, but only in a page (probably with Google's own player in it) on their site.
It seems that there is no way to get a URL to these videos that I can put in a video tag.
Without the ability to do that, I can't use the javascript commands that work with the html5 video-tag.
Is there any workaround?
Or am I missing something?
Thanks.
For playing videos that are stored in google-drive using your app:
you need oauth2 credentials to access the user's drive, but assuming you have the oauth part covered :
you can create a drive application as a google appengine app and deploy it in a part of your website.
enable the drive-sdk and set the open-url to your website (that you have verified)
-> basically this tells drive to redirect towards your website whenever the user clicks on the video (from his drive)
when drive redirects to your website a json file will be sent, you'll have informations such as fileId from there i think you can execute the method files().get() to retrieve the necessary information for you to play the video
I advise you to take a look at this course in codeschool.
We have a web based system that we are looking at replacing our existing "help system" from uploading flash videos directly to our website to instead "embedding" content we upload to our vimeo account. We have setup a vimeo pro account and these videos need to be "private" i.e. not accessible to the general public. Which API version should I use? And do you have any sample code in say PHP I could take a peek at with the functionality we are after
The Advanced and Simple API's will no longer receive new features, and soon you will not be able to create new apps for them.
Vimeo has moved towards a unified API, which you can read about at http://developer.vimeo.com/api. Make sure to use the api through api.vimeo.com, not vimeo.com/api/rest/v2.
Vimeo has an official PHP library, with some very basic examples that you can see at http://github.com/vimeo/vimeo.php