Download Youtube videos

video

#1

I have made a macro to download primarily Youtube-videos. Even tough it works on other videosites.
Sometimes I need to take some videos to places where I do not have internet.

Videos are download into your downloads folder. Subtitles are downloaded as well.

For the macro to work you need to have the youtube-dl command line tool installed on your Mac. A comfortable way to install the latest version is via Homebrew:

brew install youtube-dl

Keyboard Maestro “Download video/sound” Macro

Download video-sound.kmmacros (2.5 KB)


Set timer when macro used
#2

Yes, youtube-dl is absolutely great!


#3

Thanks @JimmyHartington ! Great idea and macro!

I didn’t know youtube-dl existed. After having used dozens of websites and Chrome extensions to download YouTube videos, I think I finally found the ultimate tool. I adapted your macro to use it with Chrome and, as I regularly download MP3s from YouTube for my teen daughter, I created another macro with the following shell script:

export PATH=/usr/local/bin:$PATH; youtube-dl -x --embed-thumbnail --audio-format mp3 -o '~/Downloads/%(title)s.%(ext)s' $KMVAR_YoutubeLink

The macro will download an MP3 file with the YouTube embed thumbnail as cover art.

Thanks again!

:+1:


What's the best YouTube to MP3 converter
#4

Hey Jimmy,

Well done.  :smile:

I prefer to do the download in the Terminal, so I have progress indicators, etc.

My script here is worth a look:

https://forum.keyboardmaestro.com/t/how-can-i-create-a-macro-that-checks-for-a-keyword-in-?source_topic_id=5259
highlighted-text-if-not-found-then-checks-the-last-clipboard-entry-and-uses-it/1277/7?u=ccstone

I’ll have to revisit it and look at the various switches you and Cary have demonstrated.

NOTE: I bought a copy of Downie and have been pretty happy with it. I also own a copy of VideoBox.

Because of Downie I don’t use my script much anymore.

-Chris


#5

Hi Chris

I have previosly used this 4K Video Downloader (free).
But since the videofiles are normally small I do not mind not seeing any progress.
Like the fire and forget of the macro. :slight_smile:

// Jimmy


#6

I forgot to mention something very important to download MP3s.

From the youtube-dl documentation:

Convert video files to audio-only files requires ffmpeg or avconv and ffprobe or avprobe

Personally, I installed ffmpeg via Homebrew:

brew install ffmpeg


Cary


#7

I use Macports myself.

You must have Macports and Xcode installed.

https://www.macports.org/install.php

sudo port install youtube-dl

sudo port install ffmpeg

sudo will require you to enter your password.

-Chris


#8

Does KM only work with browser-related things if you’re using Safari? or will it work if you’re using Chrome too?

I’m switching from TE to KM, and I had a TE expansion that would pop up and ask for the URL that I’d manually copied from $BROWSER… but if KM reads the URL from the browser session then… KM - WHERE HAVE YOU BEEN ALL MY LIFE?! :open_mouth:


#9

KM has virtually identical support for Safari and Chrome:

See these KM Wiki Searches:


#10

Hey Aaron,

Keyboard Maestro only supports Safari and Google Chrome directly, and it can do that because both of these browsers have AppleScript support (which KM uses under-the-hood).

Some other browsers like iCab also have AppleScript support. While KM does not directly support these browsers, it does directly support AppleScript itself – so many things are possible.

Hiding in plain sight for the last 12+ years… :sunglasses:

-Chris


#11

Some sites are also available, such as keepvid,savefrom ,catchvideo that enable you to download videos during surfing online. Easy and useful!
http://www.videoconverterfactory.com/tips/catchvideo-net-download.html


#12

I highly recommend Allavsoft.

It works great in batch downloading videos, music, playlist, subtitles from YouTube.

Here is the easy guide http://www.allavsoft.com/how-to/download-youtube-palylist-to-mp3-mp4-avi-on-mac-windows.html

It also helps to download from Spotify, Vimeo, TED, etc 10000+ websites.


#16

I have closed this topic as it is a spam magnet. @JimmyHartington if you wish to update the macro or whatever, just let me know.