Within the keyboard preferences pane click the Shortcuts tab. Open up System Preferences then Keyboard. This is very handy as we’ll just need to hit the keyboard shortcut in the browser with a YouTube video open to kickstart the download service. Next we need to bind the service to a keyboard shortcut. Once you’re done you can save the service, I chose Download video using youtube-dl as the name. Tell application "Finder" to set homeFolder to path to home folderĭo shell script "/usr/local/bin/node /usr/local/lib/node_modules/osx-notifier/bin/osx-notifier.js -type info -title \"Video Download\" -subtitle \"New video download started\" -message " & quoted form of currentTitleĭo shell script "/usr/local/bin/youtube-dl -o \"" & POSIX path of homeFolder & "Desktop/%(title)s.%(ext)s\" -ffmpeg-location /usr/local/bin/ffmpeg -recode-video mp4 " & currentURLĭo shell script "/usr/local/bin/node /usr/local/lib/node_modules/osx-notifier/bin/osx-notifier.js -type pass -title \"Video Download\" -subtitle \"Video download successful\" -message " & quoted form of currentTitle Tell application "Safari" to set currentTitle to name of currentTab Tell application "Safari" to set currentURL to URL of currentTab ![]() ![]() Tell application "Safari" to set currentTab to current tab of window 1 Then from the Actions library choose Utilities and Run Applescript.Ĭhange Service receives dropdown to no input and paste the script below into the Run AppleScript area. Next, open the Automator app on Mac and create a new service. ![]() In Terminal, run: brew install youtube-dl ffmpeg node npm install -g osx-notifier *used for nice notifications in user interface When we combine it with Mac’s Automator we can set a keyboard shortcut to download the video we currently have open in our browser tab. Youtube-dl is an awesome tool that lets you download videos from the most popular video platforms.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |