Coder Social home page Coder Social logo

guijingting / multidatacenterencode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dbristolms/multidatacenterencode

0.0 0.0 0.0 14 KB

Using Azure Media Services this allows you to encode videos using a second datacenter if your jobs are queuing in your primary datacenter.

C# 100.00%

multidatacenterencode's Introduction

MultiDatacenterEncode

Using Azure Media Services this allows you to encode videos using a second datacenter if your jobs are queuing in your primary datacenter.

This application was written in C#.NET. It uses the Azure Media Services v2 API.

To use the application you need to have two Media Services accounts. One is your primary Media Services account and one is a backup account located in a less utilized datacenter. You’ll need to update the App.config with both the Media Services account information as well as the Storage account connection string.

The general workflow is that the application uploads a local video file to the primary Media Services account. Next it checks the primary account’s job queue. If there are more than 3 (configurable) jobs queued then the application copies the asset to the backup account. An encode job is kicked off in the backup account. Once the job is done the video is copied back from the backup Media Services account to the primary Media Services account. If the job queue is less than 3 then the primary Media Services account is used for encoding.

This is not meant to be production ready, but rather an outline for how it is possible to use multiple datacenters for encoding. Also note that copying assets between datacenters will incur additional egress (bandwidth) costs. Generally these are relatively low, but there is some additional cost in doing this.

The big benefit to this application beyond the ability to use a second datacenter for encoding is that you are still delivering content from the main primary account. The backup account is really just a place to do some extra work.

multidatacenterencode's People

Contributors

dbristolms 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.