JCS
JCS

Reputation: 1101

Video rotation on a web app

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.

Upvotes: 0

Views: 191

Answers (2)

johndeu
johndeu

Reputation: 2512

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

Upvotes: 0

Mick
Mick

Reputation: 25471

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:

Upvotes: 1

Related Questions