This sample project demonstrates how to use Azure Media Services with Spring Boot.
-
An Azure subscription; if you don't already have an Azure subscription, you can activate your MSDN subscriber benefits or sign up for a free Azure account.
-
A Java Development Kit (JDK), version 1.8.
-
Apache Maven, version 3.0 or later.
- Go to Azure portal and create the service by following this link.
- Mark down the
TENANT,CLIENT IDandCLIENT SECRETfrom this link,REST API ENDPOINTfrom the service.
-
Navigate to
src/main/resourcesand openapplication.properties. -
Fill in the
tenant,client-id,client-secretandrest-api-endpointwithTENANT,CLIENT ID,CLIENT SECRETandREST API ENDPOINTrespectively.azure.mediaservices.tenant=${your-tenant-id} azure.mediaservices.client-id=${your-client-id} azure.mediaservices.client-secret=${your-client-secret} azure.mediaservices.rest-api-endpoint=${your-rest-api-endpoint}
Optional
If you are using network proxy then add below properties to run azure media services behind proxy.azure.mediaservices.proxy-host=put-your-network-proxy-host azure.mediaservices.proxy-port=put-your-network-proxy-port azure.mediaservices.proxy-scheme=put-your-network-proxy-scheme
- Change directory to folder
azure-spring-boot-sample-mediaservices. - Run below commands.
mvn package java -jar target/azure-spring-boot-sample-mediaservices-0.0.1-SNAPSHOT.jar
The video file video.mp4 under src/main/resources folder is from GitHub repository big-buck-bunny-480p-5s without any modification and is under the Creative Commons Attribution 3.0 license.