title: Encode existing blob instead of uploading from a local folder
body: <p>I have a C# program that upload-encode-publish a video from my local folder.I want to change the "filepath" to a "URI of blob" in azure storage account. ie instead of uploading a video and encode-publish, process an uploaded video and encode-publish. Anyone kindly suggest a method to implement this.</p>
  
  <pre><code>namespace OnDemandEncodingWithMES
  {
      class Program
      {
          // Read values from the App.config file.
  
          static void Main(string[] args)
          {
              try
              {
                  // Create and cache the Media Services credentials in a static class variable.
                  _cachedCredentials = new MediaServicesCredentials(_mediaServicesAccountName,_mediaServicesAccountKey);
  
                  Console.WriteLine("Upload a file.\n");
                  IAsset inputAsset =
                      UploadFile(Path.(_mediaFiles, @"video.mp4"), AssetCreationOptions.None);
  
                  Console.WriteLine("Generate thumbnails and get URLs.\n");
                  IAsset thumbnailAsset = GenerateThumbnail(inputAsset, AssetCreationOptions.None);
                  PublishAssetGetURLs(thumbnailAsset, false, ".bmp");
  
                  Console.WriteLine("Encode to audio and get an on demand URL.\n");
                  IAsset audioOnly = EncodeToAudioOnly(inputAsset, AssetCreationOptions.None);
                  PublishAssetGetURLs(audioOnly);
  
                  Console.WriteLine("Encode to adaptive bitraite MP4s and get on demand URLs.\n");
                  IAsset encodedAsset =
                  EncodeToAdaptiveBitrateMP4s(inputAsset, AssetCreationOptions.StorageEncrypted);
  
                  PublishAssetGetURLs(encodedAsset);
              }
           }   
       } 
   }
  </code></pre>