SW-DLT
A Shortcuts front end for yt-dlp and gallery-dl
Description
SW-DLT
SW-DLT ("Shortcuts Wrapper for -DL Tools") is an iOS shortcut that allows you to easily use, install and manage the popular and open source utilities yt-dlp
and gallery-dl
.
Compatibility:
-
iOS 15: Supported
-
iOS 14: Supported
-
iOS 13: Supported, not fully tested
REQUIRED APP:
OR
Download media from a massive collection of websites (1 & 2).
- Videos with quality & framerate selector
- Audio only files (or audio extraction from video)
- Video or audio playlists
- GIFs, clips, images (From single items to massive albums or entire webpages/profiles)
Other Features
- App Swap: Change between a-Shell or a-Shell mini easily and save storage space by using the lightweight version.
- Complete uninstall: completely uninstall the shortcut and its dependencies without deleting the a-Shell or a-Shell Mini app.
- Resuming downloads: downloads can be resumed if interrupted, for more information visit the GitHub documentation.
Documentation, Source Code & Maintenance
Planned features, Source code, bug reports, feature suggestions, and in-depth documentation are available at the GitHub repo for SW-DLT.
Disclaimers
- Use this shortcut for downloading media you own or are authorized to download.
- All software used (
yt-dlp
,gallery-dl
,ffmpeg
,ffprobe
, SW-DLT, & a-Shell) is open source and free. - It is recommended to have the VLC app or another universal media player app to play unsupported media formats in iOS/iPadOS.
Latest Release Notes
3E15 - Feb. 10, 2022, 1:13 a.m.
- Changed custom quality priority to select more appropriate formats and resolutions (less videos will be unplayable natively than before)
Version history
Feedback
Log in or sign up to leave feedback.
@felikz
Hey, thank you for shortcut, it’s amazing!
I wonder if clears cache or how do I manually clean it if something go wrong during huge download, to free space on the device?
I assume there is some directory in a-Shell or in iCloud that is used for cache purpose?
Thanks
· 1 year, 8 months ago
· 1 year, 8 months ago
@net00
Author
Cleanup of temp files is done just after you save the downloads. If there is a crash, force close or other error that prevents cleanup, the cleanup will occur the next time you want to download something. Temp files are constantly cleaned so it's no issue.
· 1 year, 8 months ago
· 1 year, 8 months ago
@kimmuhyo
I'm so glad to use this kind of shortcut. But I have a few problem with it. In my Windows laptop, speed of downloading video is almost similar between iOS, but ffmpeg is too slow in my iOS devices. In Windows, ffmpeg merging sequence is only a few seconds.
And I want to suggest that video file name is create actual youtube video name, not like "22-11-20-18-38-50".
Thanks!
· 1 year, 7 months ago
· 1 year, 7 months ago
@net00
Author
I had a previous comment here but I removed it as it was outdated info. As of right now, title saving has been added to the shortcut previously and in addition to that a-Shell has been updated with built in FFmpeg which extremely fast in comparison.
· 10 months ago
· 10 months ago
@Robnor1
Hi I have the latest version installed, works perfectly on iPad but on iPhone 12 I get a no resources notification when trying to download the same video from YouTube . I can see download progress in the Shell app
· 1 year, 7 months ago
· 1 year, 7 months ago
@net00
Author
Something must have gone wrong in the setup in your iPhone. Open the shortcut, tap on utilities, and then tap on self-troubleshooting. This will most likely correct the issue.
· 1 year, 7 months ago
· 1 year, 7 months ago
@Gandalf-c
hi, Installed it on my devices, it works on my iPad Pro, my old iPhone 7 Plus but not on my new iPhone 12 Pro Max.
I tried all, Self-troubleshooting, Erase and new install, I even reseted my iPhone.
But I get always the same result:
No Resources Found
No video or audio file was found to display,
check if your source ist compatible or try
again. If you selected a custom quality, try
using the Default.
I tried this with a small video and Default:
https://www.youtube.com/watch?v=d9pwAEYt
· 1 year, 5 months ago
· 1 year, 5 months ago
@net00
Author
This could definitely be an issue with the a-Shell app or the Shortcuts app. I can't reproduce this issue since I don't have a newer device unfortunately. If you're willing, let me know if you would like to test some commands in a-Shell to maybe find a fix for this issue.
· 1 year, 5 months ago
· 1 year, 5 months ago
@back1n7ime
I have the same issue on my iPhone 12 Pro with a-Shell mini installed. It works when I select 'Download Playlist', then I get the video. But it doesn't work with 'Download Video'. I'm willing to test some commands. Just let me know. By the way: Are there any differences in the functionality of this shortcut on a-Shell and a-Shell mini?
· 1 year, 5 months ago
· 1 year, 5 months ago
@net00
Author
You can contact me on Reddit or in the r/shortcuts discord if you'd like to help out. There is no difference between the two apps when it comes to using this shortcut. The bigger a-shell just has more more stuff dealing with compiling scripts and more libraries.
· 1 year, 5 months ago
· 1 year, 5 months ago
@Paul_tjes
Not working for me. Downloads video and audio but it does not finish merging or saving the file.
11 pro on iOS 14.3
Have tried several times to self-troubleshoot but still no solution, although self-troubleshoot finishes with no errors found.
Seems to work when selecting 'Download Playlist' and selecting either 'Download Video' or 'Download Audio'.
· 1 year, 5 months ago
· 1 year, 5 months ago
@net00
Author
I am currently looking into issues with some devices, I'll push some fixes in a few days. You can use the default quality setting to avoid most heavy processing though.
· 1 year, 5 months ago
· 1 year, 5 months ago
@Paul_tjes
Thank you, appreciate the effort.
Was able to download a few videos and audio via the 'Download Playlist' option.
· 1 year, 5 months ago
· 1 year, 5 months ago
@mobiax
Very cool & useful shortcut. But one suggestion for an improvement. For download media form facebook it would be cool if i can enter my FB login data to the shortcut. Then it would possible to download media also from private facebook groups.
· 1 year, 4 months ago
· 1 year, 4 months ago
@Thacarus
After reading the documentation, I can’t figure out where the files are stored. Are they stored upon completion? I’ve tried going to a-Shell and changing to the $SHORCUTS folder but there are no files there, just a Library folder. Am I doing it wrong?
· 1 year, 4 months ago
· 1 year, 4 months ago
@net00
Author
Sorry for not giving more details, but you need to manually save files using the preview screen. This is because youtube-dl and gallery-dl work with many types of files (mp4, mp3, webm, flv, zip, png, jpg, gif and others). Since not all file extensions are supported by any single app I had to make saving manual. I will add this to the documentation next update.
· 1 year, 4 months ago
· 1 year, 4 months ago
@back1n7ime
Hey @net00, good work, but your shortcut has a bug that only occurs on devices with other than English language settings. In your if statements where you check your dictionary entries 'isMini' and 'deleteAll' you are checking on 'Yes' which will fail in other languages, because in e.g. German you have to check on 'Ja'.
You better read the dictionary value with the 'Get dictionary value' action, you can then check this value by defining it as a bool value. This will fix it.
· 1 year, 2 months ago
· 1 year, 2 months ago
@net00
Author
I just fixed it, thanks for letting me know about this :) I thought it was the same for any language.
· 1 year, 2 months ago
· 1 year, 2 months ago
@back1n7ime
The problem still exists. You better use the 'Get dictionary value' action, this will definitely solve the issue.
· 1 year, 1 month ago
· 1 year, 1 month ago
@net00
Author
I see, I changed it to get dictionary value now and it works for me, can you check if it does work for you?
· 1 year, 1 month ago
· 1 year, 1 month ago
@back1n7ime
It works now. Thank you very much.
· 1 year, 1 month ago
· 1 year, 1 month ago
@teflocarbon
Works incredibly well. Very good.
Is there a way to automatically update? Right now I have to ping back and check.
· 1 year, 2 months ago
· 1 year, 2 months ago
@TheQL
Did the major update (3E2 - on iOS 14.5) today and now somehow nothing works. I can select the resolution but then aShell mini doesn't open. Roughly translated it says "Unknown action" and there has to be an app installed. I even went to the code part and manually granted access to aShell, to no avail. Also uninstalled and reinstalled it all. Still nothing.
EDIT: Installed a Shell instead of mini and switched config from true to false and it works. Still weird.
· 1 year, 2 months ago
· 1 year, 2 months ago
@net00
Author
Have you confirmed the setting was set to true while a-Shell mini is installed.
· 1 year, 2 months ago
· 1 year, 2 months ago
@TheQL
Multiple times! Just re-installed a-Shell mini next to a-Shell and switched the config setting. And it works now... So... Don't know what was off.
But I had tried both settings multiple times and it always yielded the error. Weird.
EDIT: Ok, after it worked I uninstalled a-Shell and the error is back. So it is apparently trying to use a-Shell regardless of the setting...
· 1 year, 2 months ago
· 1 year, 2 months ago
@darknesskill
Hello I have a question.
When I save 360~1080p, the download is finished and the preview is activated, but when I download 1440~2160p, the preview does not appear.. I can't save...
· 1 year, 1 month ago
· 1 year, 1 month ago
@net00
Author
I just resolved this issue, I tested some 1440p and 4k videos and they can be previewed.
· 1 year, 1 month ago
· 1 year, 1 month ago
@darknesskill
Thank you
· 1 year, 1 month ago
· 1 year, 1 month ago
@kurea
Hi there,
Please consider appending the name of the video to the filename.
Also, it would be good to see some details/something happening, while the merging is taking place which can take quite long. Maybe make this configurable and turn it off by default. Like a “stats for nerds” kind of thing :-)
Thank you for the great shortcut!
· 1 year, 1 month ago
· 1 year, 1 month ago
@CaptainPotassium
I'm on iOS 13.5, and I can't download a-Shell or a-Shell Mini. The app store says the app "requires iOS 14" :[
· 1 year, 1 month ago
· 1 year, 1 month ago
@net00
Author
If you have downloaded it before you can go to your purchased tab and get the latest supported version. If you haven't, then you need to use iTunes to add it to your account and then go through the purchased tab. This only works with an older iTunes version that supports downloading apps.
· 1 year, 1 month ago
· 1 year, 1 month ago
@chrunos
Hi, thanks for all your shortcuts. I want to ask what happen to YTscript shortcut. I cannot find it on routinehub. I love it very much.
· 1 year ago
· 1 year ago
@net00
Author
I choose it to discontinue it because there are dozens of other youtube shortcuts that accomplish the same thing the same way. I would rather work on shortcuts that are more unique like this one.
· 1 year ago
· 1 year ago
@chrunos
As far as I know, others rely on third-party services. I think yours works the best.
· 1 year ago
· 1 year ago
@krishna
Hey thanks for the great app and shortcut but it does not merge at all. This is huge problem for me. I’m using ipad pro 2018 version. Please help me
· 1 year ago
· 1 year ago
@net00
Author
If you could raise an issue in the github repo https://github.com/net00-1/SW-DLT with more details it would be nice. The repo is better for problem reports :)
· 1 year ago
· 1 year ago
@damnusernames
Could you show me in plaintext what the code in the “if a-shell” blocks is? aShell doesn’t work on iOS 13 — it won’t even let me download it — so I can’t see the contents of those blocks (“this action requires aShell to be installed”). I want to see what it is because I have other terminal emulators on my phone, plus python installed, plus a few other little tricks — I may be able to find an alternative that doesn’t require aShell.., I just need to know what it’s doing. Thx!
· 9 months, 3 weeks ago
· 9 months, 3 weeks ago
@net00
Author
There are 4 a-shell actions at the end of the shortcut (2 for a-shell & 2 for a-shell mini that do the same thing, so in reality they're only 2). The first one copies the SW_DLT.py python script (the one embedded in a shortcut text action, starts with "SW-DLT Script...") to the $SHORTCUTS folder in a-shell. The second one runs the script with the arguments that the user provides: "python SW_DLT.py args" is the exact command, just with whatever arguments you choose.
· 9 months, 3 weeks ago
· 9 months, 3 weeks ago
@Doblesecure
Great job mate!
Thank you for this shortcut. It is possible to add a new feature? It will be good if you can add a option to download the “watch later” videos in YT for downloading a batch of videos. Thanks in advance!
· 9 months, 1 week ago
· 9 months, 1 week ago
@net00
Author
That can definitely be done. I would need to implement authentication for youtube-dl downloads. In the current version you already can do something similar though. You can create an unlisted playlist that only you can access with the link and use that link on SW-DLT, it would not require any username and password.
· 9 months, 1 week ago
· 9 months, 1 week ago
@Doblesecure
Thanks for the replay, It works!
I have my concerns regarding privacy, but this workaround works for the moment (deleting the list after downloading it is safe enough )
I hope you can implement the authentication feature in the future. Thanks again for the good work!
· 9 months, 1 week ago
· 9 months, 1 week ago
@karl190988
The Quick Look action wasn't passed any items to preview.
Please help
· 9 months, 1 week ago
· 9 months, 1 week ago
@Doblesecure
Hi again
It is me or the downloads in the new version for IOS 15 are very very slow? It make almost imposible to use it, and I love this shortcut…
· 8 months, 2 weeks ago
· 8 months, 2 weeks ago
@net00
Author
It's not you, youtube-dl has development has slowed down and there's a throttling problem that hasn't been fixed. Please see: https://github.com/ytdl-org/youtube-dl/issues/30097
. As for using yt-dlp in place of youtube-dl, I couldn't get it to work on a-shell. So there's nothing I can do for this. Combined with the god awful state of iOS 15 shortcuts I'll wait until there's improvements from the devs to release an update.
· 8 months, 2 weeks ago
· 8 months, 2 weeks ago
@Heomotramonaton
Hi @net00,
I just playing around and a drop in replacement of yt-dlp in your SW_DLP.py works for me.
17 import yt_dlp
47 if "Package(s) not found" in subprocess.getoutput("pip show yt-dlp"):
48 subprocess.run("pip -q install --disable-pip-version-check --upgrade yt_dlp")
146 with yt_dlp.YoutubeDL(dl_options) as vid_obj:
244 with yt_dlp.YoutubeDL(dl_options) as pl_obj:
· 6 months, 1 week ago
· 6 months, 1 week ago
@TM1698
Could you explain how to do that so somebody with no skill in coding (like me) can figure out how to implement it? I’d love to get this shortcut functional again.
· 5 months, 3 weeks ago
· 5 months, 3 weeks ago
@DonTheWolf
The simplest way I can think of is to open the shortcut, then scroll near the bottom until you see "Set name of Text to SW_DLT.py".
Right above that you will see a Text box with a lot of text.
You want to do two things: -replace all the youtube-dl with yt-dlp (there are 4 of them) and -replace all the youtube_dl with yt_dlp (there are 4 here too)
· 5 months, 1 week ago
· 5 months, 1 week ago
@DonTheWolf
Nice, looks like we both did something similar.
Just a small correction, the package is yt-dlp : https://github.com/yt-dlp/yt-dlp#with-pip (yeah, I don't know why the package name isn't yt_dlp either, I guess it's like how the youtube-dl is)
48 subprocess.run("pip -q install --disable-pip-version-check --upgrade yt-dlp")
Just to keep things consistent, I also had:
88 cleanup_cmds = ("pip uninstall -q -y yt-dlp", "pip uninstall -q -y gallery-dl", "cd", "rm -f ./bin/ffmpeg.wasm",
· 5 months, 1 week ago
· 5 months, 1 week ago
@TM1698
Thank you for your help – I really appreciate people who take the time to help others learn.
Unfortunately this fix still isn't working for me. It flags as an error in the Shortcuts app and says there's an 'Exception Alert'.
· 5 months, 1 week ago
· 5 months, 1 week ago
@DonTheWolf
I think I see why. I had installed yt-dlp ahead of time on a-shell.
In the text box full of code, select all and delete. Then copy-paste the text in this link: https://raw.githubusercontent.com/thefinalwolf/SW-DLT/main/src/SW_DLT.py
· 5 months, 1 week ago
· 5 months, 1 week ago
@TM1698
Thanks for that! Sorry for being annoying, but… how do you download yt-dlp ahead of time? Even following the guides on github I can’t find any way of installing it that works on my ipad/iphone.
· 5 months, 1 week ago
· 5 months, 1 week ago
@DonTheWolf
No prob, that code will install yt-dlp (using a-shell) for you if you don't already have it. You pretty much go to the page, select all, copy. Then you want to go inside the SW-DLT shortcut and scroll near the bottom until you see the text box that has '# SW -DLT internal script'. Click inside, select all, paste. That will take what you copied from the website and overwrite everything in that textbox. Then try running the script against a youtube video 2 times. Should be good afterwards.
· 5 months, 1 week ago
· 5 months, 1 week ago
@TM1698
I don’t know where in the world you are, but I wish I could shake your hand and/or kiss you. Thanks so much for your help!
· 4 months, 4 weeks ago
· 4 months, 4 weeks ago
@DonTheWolf
No problem, glad I could help.
· 4 months, 4 weeks ago
· 4 months, 4 weeks ago
@DonTheWolf
Oh nice the shortcut was updated :D
· 4 months, 4 weeks ago
· 4 months, 4 weeks ago
@Doblesecure
All fine again!!! Thanks
· 4 months, 4 weeks ago
· 4 months, 4 weeks ago
@nicolobedendo
This is very usefull! Just a question;
for download a video from Facebook in a private group where the place for auth?
· 6 months, 1 week ago
· 6 months, 1 week ago
@DonTheWolf
Working great for me. Thanks for the update.
· 4 months, 4 weeks ago
· 4 months, 4 weeks ago
@frykauf
Would you please add language filter for Gallery-DL?
For some sites (like mangadex) the created archive is often unusable without language filter.
gallery-dl --chapter-filter "lang == 'en'"
· 4 months, 3 weeks ago
· 4 months, 3 weeks ago
@Davidvb
Ahh, fantastic update! The speed boost is incredible! But could you pleaseeee add an option to auto-save the files to the photos gallery or a Files location? Having to press the share function manually can cause several problems, like crashing shortcuts on devices where RAM ran out, or Very slow response time for the share menu to appear when you have a lot of shortcuts on your device. (For me, on an iPhone X, it can take 10 seconds for the menu to appear, or crash shortcuts.)
· 4 months, 3 weeks ago
· 4 months, 3 weeks ago
@net00
Author
The Photos app is just too limited for the types of downloads this shortcut supports. The files app is a valid option, but I'll test what's the best way to implement it.
· 4 months, 2 weeks ago
· 4 months, 2 weeks ago
@Kudan
Where do my downloads go?
· 4 months, 2 weeks ago
· 4 months, 2 weeks ago
@net00
Author
Downloads are not saved by default, you have to use the share menu during preview to save your downloads. Reason is that the files this shortcut can download and the files iOS natively supports don't always match.
· 4 months, 2 weeks ago
· 4 months, 2 weeks ago
@FreemenMuaddib
Great shortcut! But the playlist option does not work. It is forever stuck in downloading playlist in a-shell… please fix this..
· 2 months, 2 weeks ago
· 2 months, 2 weeks ago
@net00
Author
None of the playlists I tried to download were stuck. You gotta give more details
· 2 months, 2 weeks ago
· 2 months, 2 weeks ago
@FreemenMuaddib
Short playlists works. But playlists with many items (50+) are stuck after the line "Process time depends on playlist length". No percentage, no progress bar, nothing. I waited 20 minutes, no response.
· 2 months, 2 weeks ago
· 2 months, 2 weeks ago
@net00
Author
Please raise an issue in the github repo with all the details you can provide
· 2 months ago
· 2 months ago
@close2dead
I have a question, I'm not much of a coder, I only use only enough command-line in a-shell and youtube-dl to download video before, and I downloaded a ffmpeg.wasm file, put the file into a-shell's Document/bin directory, so it can merge video and audio, but since I discovered your shortcut, after I ran your shortcut, and it successfully downloaded the video, I found your shortcut deleted the "ffmpeg.wasm" file from my phone, why though?
· 1 month, 3 weeks ago
· 1 month, 3 weeks ago
@close2dead
Even though the ffmpeg.wasm is missing from "bin" ,I tried manually type command to download a youtube video, youtube-dl still managed to merge video and audio together, I'm confused.
· 1 month, 3 weeks ago
· 1 month, 3 weeks ago
@net00
Author
My shortcut deletes ffmpeg.wasm/ffprobe.wasm since these come already included in newer versions of the a-Shell app, and they are MUCH faster. See the doc for more details: https://github.com/net00-1/SW-DLT/blob/master/Docs.md
· 1 month, 3 weeks ago
· 1 month, 3 weeks ago
@close2dead
Oh, so the latest a-shell already has ffmpeg built-in, I see, I didn't know that, thanks for the clarification.
· 1 month, 3 weeks ago
· 1 month, 3 weeks ago