This Week's Sponsor:

Listen Later

Listen to Articles as Podcasts


Downloading YouTube Videos on iPad with youtube-dl and a-Shell

Greg Godwin, writing at NonProfit Workflows:

There are various apps for the Mac that’ll download YouTube videos, but there’s nothing comparable for the iPad. I discovered that it’s possible to download these videos using the iCab browser if you change the user agent, but I could never get this to work consistently. There is a command-line program you can run called youtube-dl that will download videos from YouTube (and other sites). The problem is, the iPad doesn’t ship with a Terminal app like the Mac does, so while I could do this on my Mac, I struggled to find a way to use this command on my iPad.

Greg has written an excellent tutorial on how to install the (recently reinstated) youtube-dl utility (which I’ve been using to download YouTube videos on my Mac mini for years) and use it on iPad via a-Shell. I followed their tutorial and was able to get youtube-dl up and running on my iPad Pro – with support for encoding files via ffmpeg – in literally two minutes. There’s probably less of a need for downloading YouTube videos on iPhone and iPad now that the YouTube app supports native 4K playback on Apple platforms, but I think it’s great to be able to download videos offline for research and archival purposes regardless. I always like to download the best possible version of a video in the WebM format, which plays beautifully at crisp 4K in the free VLC app for iPad.

One crisp Tyler.

One crisp Tyler.

Side note: I’ve been trying to use this shortcut to pass the URL of the current video from Safari/YouTube to a-Shell via the share sheet. Unless I’m missing something obvious, the a-Shell app launches but doesn’t run my command, which is passed as a ‘Text’ parameter to its Shortcuts action.

Update: Thanks to MacStories reader Jay, I was able to make a-Shell’s Shortcuts action work by switching from single- to double-quotes. I’ve made a shortcut that lets you pass a YouTube URL from either Safari or the YouTube app to a-Shell – which will start downloading it – so you don’t have to type the command (and related options) manually each time. You can find it below and in the MacStories Shortcuts Archive. Also, don’t miss this tip by Greg on navigating a-Shell’s local folder structure.

youtube-dl

Download a video from YouTube using youtube-dl and the a-Shell app for iPhone or iPad. The shortcut accepts any YouTube URLs passed from Safari or the YouTube app via the share sheet. Detailed instructions on how to set up youtube-dl and a-Shell can be found here.

Get the shortcut here.