Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
What to do when 'best' doesn't work on your script? #22574
Comments
|
You can't. |
Question
Hello there, I use youtube-dl through termux on android, using share functionality on youtube.
To do this, I have this script set up (origin: https://www.reddit.com/r/Android/comments/66kehg/twoclick_downloads_of_youtube_videos_straight/):
--no-mtime -o /data/data/com.termux/files/home/storage/shared/Youtube/%(title)s.%(ext)s -f "best[height<=720]"However, this script won't work in videos that can't be downloaded with the "best" format.
Here's an example: https://www.youtube.com/watch?v=5a0ill945vs
The "-f best" argument returns "ERROR: Did not get any data blocks"
Without arguments, youtube-dl manages to download a file, but if I download all files without the best tag, I'll get huge files and storage is limited.
How can I make my script try no arguments only if it fails with best[height<=720]?
Thanks.