Listen, record, and even pause Relay.fm Live using VLC and Audio Hijack

Relay.fm has a schedule of live shows which you can listen to as they are recording. Most people just listen to these in a web browser, because that makes the most sense and is the easiest way to do it. If you have an iOS device you can use the free Relay.fm app which I will also use if I am not at home when a show is live.

However, if I am on my Mac when a show is live, I prefer to listen using VLC which is a free app, and I also like to record the live show, either so I can pause it if I get interrupted or can just listen later to the MP3. This is accomplished by using VLC plus Rogue Amoeba’s Audio Hijack program, which is not free, but which any self-respecting Mac nerd ought to own because it’s amazing cool and powerful. It can do 1,000 more things than this, but I’m just going to talk about this for now.

Using VLC to listen to Relay.fm live

To listen to Relay.fm in VLC, you need the URL to the live-stream server:

http://stream.relay.fm:8000/stream

That URL is only enabled when the live-stream is active.

First go the File » Open Network:

VLC: File » Open Network

Second, put the URL into the Network URL in the Open Source window that will open:

VLC: Network Pane

If the live-stream is active, it will look like this:

VLC: Live Stream window

If you’re comfortable with the command line, you can replace the first two steps by this line in Terminal:

open -a VLC 'http://stream.relay.fm:8000/stream'

which will automatically open VLC with the stream playing (again, only if it is live).

Record Relay.fm Live with VLC and Audio Hijack

If you want to record Relay.fm with Audio Hijack, we can still use VLC, and then set it up the output to go two places:

  1. To an MP3 so we can listen later

  2. To the Mac’s speakers

In number 2, we also add a “Time Shift” block, which will allow us to pause the livestream (which will keep recording in real-time to the MP3, because that is completely separate). It will also allow us to rewind the broadcast if we missed something. It’s sort of like TiVo for audio.

The setup (which Audio Hijack calls a “Session”) will look something like this:

VLC in Audio Hijack

You can see there are two “branches” from VLC, one going up to an MP3, and the other going down to “Time Shift” and “Output Device”.

We have to tell VLC what to play when this Session runs, which we can set by clicking on the VLC “block” in Audio Hijack, which will reveal the VLC settings. You can see it here:

VLC settings in Audio Hijack

Note that the box next to “Open URL” is checked, and the URL is entered into the appropriate box.

You can also change the MP3 settings (not shown) by clicking on the “Recorder” block. I have mine set to save recordings to the folder ~/Music/Audio Hijack/ with filenames that are formatted like this:

Relay.FM-2019-05-16-at-13-04.mp3

The first part makes sure that all the Relay.fm recordings will be grouped together by name, and then the date (YYYY-MM-DD) followed by the time that the recording began (13-04 refers to 1:04 p.m. local time on May 16th of 2019).

You can download my Audio Hijack session file here: Relay-to-Speakers-and-mp3.ahsession

Assuming you have Audio Hijack installed, you should be able to double-click on the Relay-to-Speakers-and-mp3.ahsession file and have it open right in Audio Hijack. You can then adjust any of the settings that you might want to change. (The file also assumes that VLC is installed at /Applications/VLC.app.)


p.s. – You can easily adapt these instructions to record other podcasts which record live, by creating a new “Session” in Audio Hijack and changing the URL of the live-stream server. For example, ATP’s URL is http://marco.org:8001/listen

With ATP, you can even use Audio Hijack’s “Schedule” feature to record Wednesday nights at 8:58 p.m. (US/Eastern) to 11:55 p.m. and automatically record most of ATP’s live shows. They do occasionally change that date/time of recording, but that will catch most weeks. I suggest starting a few minutes before 9:00 p.m. not because I want to subject you to Marco’s Phish concerts, but just to give yourself a little leeway. Also, they usually stop recording long before 11:55 p.m., but Audio Hijack is smart enough to figure out when there is no sound playing.

Trying to make a Virtual Machine from Apple’s recent DMG releases of Mac OS X

Scroll down to “Update and Solution” to see how to get this to work.


Apple recently released new installers for Mac OS X/OS X/mac OS to deal with expired certificates:

If an installer says it can’t be verified or was signed with a certificate that has expired – Apple Support

Three of the six are links to the Mac App Store:

The other three are URLs to download DMGs:

Today I tried (and failed) to create a new Virtual Machine in either Parallels or VMware Fusion using one of these DMGs, specifically, the El Capitan one.

I will explain what I did, and where I got stuck, in the hopes that someone else might figure out what I did wrong and point me in the right direction.

Download the DMG

Apple has created three DMGs for Yosemite, El Capitan, and Sierra, but couldn’t be bothered to give them useful names, so Yosemite and El Capitan are called ‘InstallMacOSX.dmg’ and Sierra is ‘InstallOS.dmg’.

Likewise the DMGs aren’t named usefully when you mount them either, so make sure you name the DMGs well when you download them to avoid confusion. Here’s how to download it and rename it at the same time

curl --fail --location --continue-at - --output "$HOME/Downloads/InstallElCapitan.dmg" \
"http://updates-http.cdn-apple.com/2019/cert/061-41424-20191024-218af9ec-cf50-4516-9011-228c78eda3d2/InstallMacOSX.dmg"

Mount the DMG

Open the ‘~/Downloads/InstallElCapitan.dmg’

That will leave you with

“/Volumes/Install OS X/InstallMacOSX.pkg”

Extract the App

Don’t try to install from that .pkg file, it probably won’t work unless the Mac you’re using is capable of running El Capitan:

Instead, open it with Suspicious Package which will let you examine the contents of the .pkg file, as shown here:

Note the area in the red box. Obviously that’s not the full installer, despite the .dmg being over 6 GB. But let’s export it anyway:

Save it to /Applications/ (or wherever you prefer, but that’s where I’ll assume it is for the rest of these instructions).

Don’t eject “/Volumes/Install OS X/InstallMacOSX.pkg” yet, we still need to get the actual .dmg from it.

Get the other DMG

Download The Archive Browser if you don’t already have it (it’s free!) and use it to open “/Volumes/Install OS X/InstallMacOSX.pkg”.

It will look like this:

Click on the triangle to the left of “InstallMaxOSX.pkg” to reveal its contents, and select the “InstallESD.dmg” file from it.

Once it is selected, choose “Extract Selected” from the bottom-left. Save it to ~/Downloads/ (it won’t be staying there long).

Ok, this part could be confusing…

When The Archive Browser exports the file, it will not just export the “InstallESD.dmg” file. First it creates a folder “InstallMacOSX” and then it created “InstallMacOSX.pkg” inside that folder, and the “InstallESD.dmg” file is put inside the .pkg… but you can’t see it, because the .pkg file won’t let you open it.

That’s OK, because we’re going to use Terminal.app to move the file into place anyway.

First we need to create a directory inside the ‘Install OS X El Capitan.app’ which we previously saved to /Applications/. We’re going to use the same folder for two commands and we want to make sure we get it exactly right both times, so we’ll make it a variable:

DIR='/Applications/Install OS X El Capitan.app/Contents/SharedSupport'

Then use the variable with mkdir to create the folder:

mkdir -p "$DIR"

and then we need to move the “InstallESD.dmg” file into that folder

mv -vn "$HOME/Downloads/InstallMacOSX/InstallMacOSX.pkg/InstallESD.dmg" "$DIR"

Note: you probably want to trash the ‘~/Downloads/InstallMacOSX/InstallMacOSX.pkg’ (and its parent folder) now that it is empty, to avoid confusion later

mv -vn "$HOME/Downloads/InstallMacOSX/" "$HOME/.Trash/"

Now if you look at the ‘Install OS X El Capitan.app’ in the Finder, it should show itself as 6.21 GB:

open -R  '/Applications/Install OS X El Capitan.app'

So close, and yet…

VMWare was willing to start trying to make a virtual machine using the app, but it failed when it came to the actual installation part:

I don’t know what to try next. Parallels would not use either the ‘Install OS X El Capitan.app’ or the ‘InstallESD.dmg’ to try to create a new virtual machine.


Update and Solution

I posted a question on the VMware Fusion support forum asking how to do this, and someone came up with a very clever solution, which I will replicate here in case others are interested. The idea is simple, but I never would have thought of it.

  1. Create a virtual machine of any version of macOS, even the current version that you are using on your Mac.

  2. Inside the VM, download the .dmg (see below) and mount it.

  3. Launch the .pkg inside the .dmg.

  4. The .pkg seems to understand that it is inside a VM, and will install the app, which it would not do outside of the VM. Note that the Installer.app says that it will only take a few megabytes, but that is incorrect.

  5. Find the “Install OS X El Capitan.app” (or whatever the app name is) in the /Applications/ folder inside the VM. It should be over 6 GB in size.

  6. Copy the “Install….app” from the VM out to your actual Mac.

  7. Create a new VM using the “Install….app” from the /Applications/ folder on your Mac.

Step #4 is the part that I never would have guessed. The .pkg would not install the app outside of a VM, but will install it inside of a VM.

This worked perfectly with the El Capitan .dmg file, and I’m currently doing the same with Yosemite and Sierra. Then I’ll try the older versions of Mac OS X from old installers that I have from before they disappeared from Apple’s servers.

Update 2

Turns out that Rich Trouton wrote about this technique back in early 2017:

Downloading older OS installers on incompatible hardware using VMs | Der Flounder

But I wasn’t working with VMs at the time, so I must not not stored that in my long-term memory.

Update 3

I had saved the older installers for Lion, Mountain Lion, and Mavericks, which are no longer available for download.

Each of them still installed as a VM. Apparently they were not signed with the certificates that expired.

Older versions of Mac OS X (10.6.8 and before) are not available to virtualize.