Using blob storage to host my podcast .mp3 files

 

I host a podcast called The Indie Dev Podcast where I interview game developers from around the world in 30 minute segments. I’m always fascinated by what people are able to create, and I’m even more curious about how they make these games happen.

I store the most recent episodes of the podcast on PodOmatic, which allows them to be picked up by iTunes and other podcast feed readers, but I am limited by the number of podcast episodes that I can store at once, because I am using the free tier. My older episodes then, are then lost, unless I upgrade to the premium tier.

What problem does Blob Storage solve?

With blob storage, I can take all of my .mp3s, store them in a container, and then allow the public to download them from the container.

When I upload my files to a blob container, I am given an HTTP endpoint, which I can use as a link to download an episode. Click on this link to download the most recent episode with Michael Hicks. You could do the same for videos that you record, too.

I’m going to walk you through the steps of how I set up my container to host all of the .mp3s of the podcast.

How does blob storage work?

Blob Storage demo1

Blob storage is a service for storing large amounts of unstructured data, such as text or binary data, that can be accessed from anywhere in the world via HTTP or HTTPS. You can make these files public or private as well, which means that you can use it as a storage repo for your own content for only you to access, or perhaps use it as a cost-effective way to store large amounts of media to share with others.

Common uses of Blob storage include:

  • Serving images, documents, audio, or video directly to a browser
  • Storing files for to be distributed to others
  • Streaming video and audio
  • Performing secure backup and disaster recovery

You can find out more about Blob Storage here.

Blob concepts and terms

  • Storage Account: All access to Azure Storage is done through a storage account.
  • Container: A container provides a grouping of a set of blobs. All blobs must be in a container.
  • Blob: A file of any type and size. There are two types of blobs that can be stored in Azure Storage: block and page blobs. Most files are block blobs, and we’re going to use those for this tutorial. A single block blob can be up to 200 GB in size.

How do I get blob storage?

You’ll need an Azure Account. You can sign up for a free Azure trial, or reach out to me about information on how to obtain a BizSpark account and receive $150 / mo in Azure credits. This is what I use to host the files.

Creating a storage account

You’ve got an understanding of how blob storage works now, as well why you’d want to use it. Let’s go through the process of creating an account and a container. This is directly from the blob storage blogs on the Azure portal:

To use Azure storage, you’ll need a storage account. You can create a storage account by following these steps. (You can also create a storage account by using the Azure service management client library or the service management REST API.)

Log into the Azure Management Portal.

At the bottom of the navigation pane, click NEW.

New Image

Click DATA SERVICES, then STORAGE, and then click QUICK CREATE.

Create new Azure media service saccountIn URL, type a subdomain name to use in the URI for the storage account. This value becomes the host name within the URI that is used to address Blob, Queue, or Table resources for the subscription.

Choose a Region/Affinity Group in which is closest to your current location.

Optionally, you can select the type of replication you desire for your account. Geo-redundant replication is the default and provides maximum durability, meaning your files will be backed up across multiple datacenters in the same area. So if Godzilla comes to attack, and takes out one datacenter, your info is still backed up in another one.

Click CREATE STORAGE ACCOUNT.

You’re ready to roll. Now you can create a container which will host your files.

Creating a container

In the Azure portal, click on the Storage icon on the left hand side of the screen. A new screen will appear with the name of the account you created above. In my case, it is called blobindiedev.

blob indie devClick on the name of the blob, then Containers at the top of the page. You’ll make a new one here. At the bottom of the page, click on Add to create a new container.

Create new bob containerI called mine podcastep, as this will hold all of my episodes.

 

By default, the container is private and can be accessed only by the account owner. To allow public read access to the blobs (.mp3s)in the container, but not the container properties and metadata, use the “Public Blob” option. To allow full public read access for the container and blobs, use the “Public Container” option. We want Public Container.

New blob containerWe’re ready to upload files to this container from Visual Studio now.

 

 

Uploading files from Visual Studio

For this part you’ll need Visual Studio. You can download the VS 2013 Community Edition for free from here. You’ll also need the Azure SDK to access your Azure account from Visual Studio. Download the SDK here. You’ll need the SDK that matches the version of Visual Studio you are using. If you have VS 2013 installed, you’ll want to use the VS 2013 Azure SDK.

 

With that installed, open Visual Studio, click on the Server Explorer and look for the Azure button. Click on Storage and it should ask you to log in to your account.

Blob storage server explorer 1Click on Storage and you should see the new Blob storage account you created as well as container which will host the episodes.

Blob storage within visual studioClick on the Blobs icon / text to see your container. I see podcastep, as well as any files I have uploaded there.

Blob storage within visual studio 2To upload your own files, click on the Upload Blob icon, which is an arrow pointing to a horizontal line.

Blob storage within visual studio 3A pop-up window will appear, and ask you to browse to browse to the file you want to upload.

upload new file azure blob storageIn my case, I’m looking for podcast episodes. You should see the Azure Activity Log appear at the bottom of the screen, which notifies you of the file’s current status.

blob upload VSOnce it has completed uploading, right click on the file, and copy the URL.

blob upload VS 2That URL is how others can download your files now! On my webpage I provide a link to that URL on every episode, and folks now all of my episodes are made available!

If you navigate back to the Azure Portal, you can see that they are all there too.
Blob storage container azure

Conclusion

Azure Blob Storage is a cost-effective way of saving and service content across the internet. The blob storage page has more information, but hopefully after this, you understand the value in it. I can record my podcast and easily serve it to anyone around the world, without having to pay monthly fees or build any hardware on my own. Best of all, it took me a total of 5 minutes to get the files online.

Any questions? Feel free to reach out.

Here’s a full list of the tutorials in this series:

-----------------------


subscribe-to-youtube

7 thoughts on “Using blob storage to host my podcast .mp3 files

  1. So to avoid paying for a paid podcast account which probably has a simple upload button we should use a paid Azure account which seems to be even more complex to set up…

    Whats the cost benefit here? Would azure work out cheaper if you didn’t have a free bizspark account

  2. I don’t have much content in my Blob Storage account for podcasts at the moment. About 18 episodes, and each is roughly 50mb. Look at the storage costs (http://azure.microsoft.com/en-us/pricing/details/storage/) , it comes to:

    First 1 TB / Month $0.024 per GB

    So less than a penny?

    And I wish the podcast upload button was just one button 🙂

    Technically, I don’t need to use Podomatic at all to serve the content. Right now the benefit they provide me is that they can aggregate my podcast into an RSS feed which podcast services like iTune and Feedburner can pick up.

    What I have been considering is using the WordPress Burberry plugin, which does exactly that, on my wordpress site. The Indie Dev Podcast site is still running on WordPress’ servers, becuase I haven’t created a new MySQL DB for myself.

    I haven’t switched yet because I need to spin up a MySQL DB in a VM running LAMP. (WordPress uses MySQL, but there are other work around to use different types of DBs). Got that running, but haven’t brought over my Database yet. 0

  3. Great article and EXACTLY what I am looking for.

    I have one snag however. I created my Storage account and my container. I installed the VS 2013 Azure SDK and I cna see my VM’s App Service and a Storage for Development, but my new storage account is not showing up.

    Am I missing some piece of the puzzle?

    Thanks for any help.

    • Hmm.. it doesn’t look like you are missing out on anything here. Can you send me a picture of what it looks like for you?

      So you open up VS, click on “Solution Explorer” then on the “Azure” tab, but you do not see anything for Blob Storage?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.