This post was most recently updated on February 19th, 2022.3 min read.
Today, I’m documenting a simple way to download audio files from Vidyard. This approach only works for files that aren’t password-protected or behind authentication – I don’t think you can use it easily for nefarious stuff, but just in case you’re trying to commit some kind of IP theft (intellectual property), please don’t. And definitely do not ask for instructions in the comments section :)
Anyway – why did I take up this task? What did I want to achieve, in order to need… This?
I ran into this case when I wanted to listen to a fantastic free audiobook, that was only offered as audio files embedded on a web page. Namely, this audiobook (also available as an e-book):
I wanted to listen to it whilst digging trenches in my backyard (I’m preparing for the inevitable invasion of moose – always happens when the apples ripen up). But a page in a mobile browser is not a very good vessel for that. It’ll reset the location constantly and only works somewhat while running in the background.
So, I thought I’d grab the files for myself. It’s easy to figure out the address of the mp3-file, so I just decided to access it directly.
Well, of course, that wasn’t so easy. You’ll need the URL (with the media file name & an access token), AND the referer (or is it “referrer?”)
Solution: Using youtube-dl to download files from Vidyard
There is a tool built for this – although it’s not super straightforward to use. youtube-dl will do the trick, but there are a couple of steps that you will need to take!
Note: I doubt this works properly for DRM-protected files, and you should definitely not redistribute the files, as I’m fairly certain that’ll be at least a copyright infringement. But when you’re downloading free stuff with no marketing gates or anything and only using it yourself, I think you should be fine. Remember to check with your favorite local lawyer, specialized in Intellectual Property law – just in case. 😜
Time needed: 30 minutes.
How to download media files from Vidyard?
- Download youtube-dl
It’s here, it’s legal, it works, even if it’s a bit complicated – you can get it from here: https://youtube-dl.org/
- Inspect the request to get the media file using your browser’s dev tools
Refresh the page where the media file is embedded, open up developer tools (might be accessible using F12, depends on your browser), filter by mp3 (or whatever your media file might be, and you’ll get something like below:
- Grab the referer and access token from the request
Fairly simple – after selecting the right request (as shown above), you need to find the referer from the request headers. An access token is already included in the URL itself – grab that as well.
If you don’t have a clipboard manager (you should!), you can also just copy-paste the values into a notepad.
- Combine the proper command
Now that you have the URL with the access token and the referer value, you can combine the proper command. That’ll happen somewhat like this (the example is from PowerShell):
.\youtube-dl --hls-prefer-native --add-header "Referer: [referer here]" "[the url with the access token included here]"
- Enter the command into your command line of choice
With that, you should be good.-The command to download the whole thingie should then download the file nicely to your working directory.
Look below for a nice sample:
And you should be good!
I have no idea if this works with all Vidyard media files, but I’m kind of expecting it to fail for the more DRM-protected ones – and that’s fine by me. Don’t download stuff that’s not meant to be shared with you. :)
- Automatically get version number from project dependencies in Azure DevOps - March 28, 2023
- Solving “AADSTS90097: An error has occurred during admin consent processing.” issues in your app - March 21, 2023
- How to fix your MAUI Blazor app crashing on startup with “Failed to compare two elements in the array.” ? - March 14, 2023