0
votes

I am using the following workflow which leaves several copies of the original assets and blobs that should be cleaned up. I want to make sure I only keep the necessary assets in order to playback the videos that have been encoded. Also I am wondering if there is a more efficient way of creating encoded assets. It seems the only improvements that could be made is uploading the blob directly to a media service container instead of having to copy the blob.

I am using the following workflow:

  1. From my website, a video file is uploaded to a non media service container
  2. After file is uploaded, a message queue is created for the blob
  3. Azure Web Job receives the message queue
  4. The uploaded blob is copied to the media service container
  5. Create a media service asset from the copied blob
  6. Start a media encoder job from the new asset for H264 Adaptive Bitrate MP4 Set 720p
  7. After the job is complete, delete the original blob, the first asset, and the queue message
1

1 Answers

2
votes

As you already mentioned one of optimization step is to eliminate uploading a media file to none media associated storage. Also since you already using azure queues you can use them to be notified when job is done. With proposed changes your workflow will be.

  1. in UI you calling asset creation before uploads starts.
  2. User directly uploading to storage associated with media account. see https://stackoverflow.com/a/28951408/774068
  3. Once upload is finished, trigger creation of media jobs with azure queues associated with it. See https://docs.microsoft.com/en-us/azure/media-services/media-services-dotnet-check-job-progress-with-queues
  4. Listen when azure queue get a message about job completion and execute source asset deletion once message received. You can utilize azure functions for it. https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage