YouTube – How to Embed Audio Only from YouTube Videos

audioblogbloggerembedyoutube

Is there a way to change the embed code or some JavaScript I can run in a blogger blog to embed only the audio of a YouTube video in my blog posts?

My specific situation: I have a private blog that I would like to record my musings to in audio form. I'm looking for a good solution for hosting the audio recordings and embedding them in my blog. My research has led me to believe that YouTube would be the best despite the fact that it is meant for video.

What I've tried: Everything online says that you just change the height of the embed code to be 25, but I think this is a hack and would like to avoid it if I can.

In case you're interested: Here are the things I've looked at and why I don't think they are suitable solutions for my problem:

  • Dropbox: Workable, but if I ever want to change the location of the files in my Dropbox then the links would all break (I presume). This is my current solution. I'm just using the <audio> tag which works great for me.
  • Google Drive: Doesn't have any streaming capabilities I'm aware of.
  • SoundCloud: Limit of two hours for free version and there's no way to make a clip "unlisted" so my blog can access it but the world can't.
  • Last.fm: Just won't work.

I'm open to other solutions, but this seems to be the best one. My criteria are:

  • Free and basically unlimited
  • Permanent links (this is why Dropbox is not a great solution)
  • Access only to those with a link, not searchable to the general public

Reiterating my question: Remember, I've done my research, so my question isn't which service I should use, but rather if there's a way to embed only audio from a YouTube clip. But I'm happy to accept alternatives. I just don't want to break the rules of the site 🙂

Best Answer

It turns out that Google Drive does have streaming capabilities. And it doesn't change the URL for anything you move, so it's the perfect solution (aside from not having unlimited storage, but my use case doesn't require that, so I'm good). So my blog post jus consist of the following HTML:

Whatever I want to write here...<br />
<br />
<hr />
<audio controls="controls" style="margin-left: auto; margin-right: auto;">
  <source src="https://googledrive.com/host/DRIVE_ID_OF_FILE_GOES_HERE" type="audio/mpeg"></source>
  Your browser does not support the audio element.
</audio>