├── LICENSE ├── README.md ├── docs ├── HOW-TO-DEPLOY.md └── HOW-TO-DEPLOY_ja.md ├── functions ├── Presets │ ├── Indexer-v2.json │ ├── encoding-mbr-thumb.json │ └── encoding-thumb.json ├── add-file-to-mediaasset │ ├── function.json │ ├── project.json │ └── run.csx ├── add-key-phrases │ ├── function.json │ ├── project.json │ └── run.csx ├── check-media-asset │ ├── function.json │ ├── project.json │ └── run.csx ├── create-empty-mediaasset │ ├── function.json │ ├── project.json │ └── run.csx ├── feed-webvtt-caption-search │ ├── function.json │ ├── project.json │ └── run.csx ├── get-sas-token │ ├── function.json │ └── run.csx ├── host.json ├── http-to-translator-queue │ ├── function.json │ └── run.csx ├── import-mediaasset-singleblob │ ├── function.json │ ├── project.json │ └── run.csx ├── monitor-copy-blob │ ├── function.json │ └── run.csx ├── monitor-media-job │ ├── function.json │ ├── project.json │ └── run.csx ├── publish-assets │ ├── function.json │ ├── project.json │ └── run.csx ├── submit-media-job │ ├── function.json │ ├── project.json │ └── run.csx └── translate-webvtt-mediaasset │ ├── function.json │ ├── project.json │ └── run.csx ├── images ├── architecture.png ├── logicapps-workflow.png ├── screenshot-functions-url.png ├── screenshot-logicapp-blob-connnector.png ├── screenshot-webapp-testaccess.png └── webui-screenshot.png ├── logicapp ├── LogicApp.json └── LogicApp.parameters.json ├── scripts ├── create-azuresearch-schema.sh ├── create-configure-ams-storage.sh ├── create-configure-source-storage.sh ├── delete-resources.sh ├── deploy-functions.sh ├── deploy-logicapp.sh ├── deploy-webapp-linux.sh ├── deploy-webapp.sh ├── setup-webapp-dependencies-packages.sh ├── update-functions-app-settings.sh ├── update-webui-app-settings.sh ├── videoanalytics.conf └── videoanalytics.conf.example └── webapp ├── .htaccess ├── Dockerfile ├── VERSION ├── apache2.conf ├── api ├── azuresearch-caption-api.php ├── signature.php └── video-upload-success.php ├── azurefineuploader ├── azure.fine-uploader.core.js ├── azure.fine-uploader.core.js.map ├── azure.fine-uploader.core.min.js ├── azure.fine-uploader.js ├── azure.fine-uploader.js.map ├── azure.fine-uploader.min.js ├── continue.gif ├── edit.gif ├── fine-uploader-gallery.min.css ├── fine-uploader-new.css ├── loading.gif ├── not_available-generic.png ├── processing.gif ├── retry.gif ├── simple-thumbnails.html ├── trash.gif └── waiting-generic.png ├── components ├── content_list.php ├── uploader_body.php └── uploader_head.php ├── css ├── design-index.css └── design-video.css ├── dockerscripts ├── build.sh ├── push.sh └── run.sh ├── index.php ├── init_container.sh ├── js └── captionsearch.js ├── lib ├── config.php ├── cosmos-meta.php └── utils.php ├── sshd_config ├── video.php └── web.config /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Yoichi Kawasaki 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # azure-serverless-video-analytics 2 | Showcase Application of Serverless Video Analytics Workflow using Azure Functions, Logic App, and other multiple Azure Services 3 | 4 | ## Application Overview 5 | ### Architecture 6 | ![](images/architecture.png) 7 | 8 | Related Azure Services in the solution: 9 | - Azure Functions 10 | - Azure Logic App 11 | - Azure Cosmos DB 12 | - Azure Search 13 | - Azure Media Services 14 | - Azure Web App 15 | - Azure Storage (Blob, Queue) 16 | - Azure Text Analytics API (Cognitive Services) 17 | - Azure Translator Text API (Cognitive Services) 18 | 19 | ### Logic Apps Workflow 20 | ![](images/logicapps-workflow.png) 21 | 22 | ### Web App UI 23 | ![](images/webui-screenshot.png) 24 | 25 | See also [Application Overview Video @ Youtube](https://www.youtube.com/watch?v=fgtBhoMGZBE) 26 | 27 | ## Deployment Procedures 28 | - [How to deploy the demo application](docs/HOW-TO-DEPLOY.md) 29 | 30 | ## Other Links 31 | - [Seminar slides: Serverless App Development with Azure Functions & Logic App (In Japanese)](https://www.slideshare.net/yokawasa/azure-functionslogic-app-89994585) 32 | 33 | ## Contributing 34 | 35 | Bug reports and pull requests are welcome on GitHub at https://github.com/yokawasa/azure-serverless-video-analytics 36 | -------------------------------------------------------------------------------- /docs/HOW-TO-DEPLOY.md: -------------------------------------------------------------------------------- 1 | # How to deploy the demo application 2 | 3 | ## Prerequisites 4 | You can run this walkthrough on OS X, Linux (Cloud Shell Bash), or Bash on Windows. 5 | 6 | - You need an Azure subscription. If you don't have one, you can [sign up for an account](https://azure.microsoft.com/). 7 | - Install the [Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) 8 | ``` 9 | pip install -U azure-cli 10 | ``` 11 | [NOTE] you can skip azure-cli installation if you execute bash commands from [Azure Cloud Shell](https://docs.microsoft.com/en-us/azure/cloud-shell/overview) 12 | 13 | 14 | ## Create Resources and Deploy applications 15 | 16 | ### 1. Create Resource Group 17 | Create resource group for the demo (Resource group named `rg-videoanalytics` in `japanwest` region): 18 | ``` 19 | az group create --name rg-videoanalytics --location japaneast 20 | ``` 21 | 22 | ### 2. Clone the project source code from Github and edit videoanalytics.conf 23 | 24 | Clone the project source code from Github 25 | ``` 26 | git clone https://github.com/yokawasa/azure-serverless-video-analytics.git 27 | ``` 28 | 29 | Then, open videoanalytics.conf and add values for the following variables in the file. 30 | - azure-serverless-video-analytics/scripts/[videoanalytics.conf](../scripts/videoanalytics.conf) 31 | ``` 32 | ... 33 | # Commons 34 | ResourceGroup="" 35 | ResourceLocation="" 36 | 37 | # Storage Account attached to Azure Media Services 38 | AMSStorageAccountName="" 39 | 40 | # Storage Account for Video data source (you upload videos to this storage) 41 | SourceStorageAccountName="