Giter VIP home page Giter VIP logo

durable-function-video-to-gif's Introduction

Azure Durable Functions : Video to GIF conversion

This application uses Azure Durable functions, Blob Storage, Event Grid, Application Insights and ffmpeg.

Provision Functions App and other resources

Use one of the below deploy options to provision the resources.

Deploy to Azure button

Deploy to Azure

Deploy using Azure CLI

az group deployment create --resource-group <resource-group-name> --name <deployment-name>--template-file deploy.json 

Once deployed you should see below resources in the resource group.

  • App Service plan(Premium EP1 plan, read more about Azure functions Premium plan)
  • Storage account
  • App Service - Function App
  • Application Insights

Deploy application code

To deploy the functions application code please follow these steps. Or use VS Code to deploy the application.

Create Event Grid Subscription

In this application Event Grid is used to trigger the functions app when a new Video is added to videos blob containers. Before we create event grid subscription we need to get system key. Replace code= with your master key. https://<function-app-name>.azurewebsites.net/admin/host/systemkeys/eventgrid_extension?code=<master-key>

This should result in something like below.

{"name": "eventgrid_extension",
"value": "2aSighjJgTUxhaOaCBN91QA0y5celLfFP1WOKzTasdfdf2THig==",
"links": [{
"rel": "self",
"href": "https://<function-app-name>.azurewebsites.net/admin/host/systemkeys/eventgrid_extension"}]}

Use the value from above as the code=system-key in below set of commands. Open Azure Cloud Shell and execute below commands.

storageName= <storage-account-name>
endpoint='https://<function-app-name>.azurewebsites.net/runtime/webhooks/eventgrid?functionName=blobEGTrigger&code=<system-key>'
resourceGroup=resource-group-name
storageid=$(az storage account show --name $storageName --resource-group $resourceGroup --query id --output tsv)
az eventgrid event-subscription create \
  --source-resource-id $storageid \
  --name vid-to-gif-function-app \
  --endpoint $endpoint \
  --subject-begins-with '/blobServices/default/containers/videos'

Upload the Videos

Upload a video to Video container in your blob storage account.Wait for couple seconds and you should have a GIF created in Gifs blob container.

durable-function-video-to-gif's People

Contributors

krishnaji avatar

Stargazers

Raj avatar Jitendriya Sendha avatar Hendrikus  van Katwijk avatar Vis avatar Yönet avatar Ali Sanjabi avatar Thomas Kortyka avatar Jasmine Greenaway avatar vaibhav avatar Simona Cotin avatar  avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.