)
It could probably be done with a service on a different server that reloads the latest copy of youtube-dl every day or so and accepts requests from the app.
But there are problems:
- Some videos will be unfetchable, since their DASH manifest will show that they have only incompatible codecs available for download, or since they are simply too large to pass validation
- Of the videos that are not fetchable, a subset might be perfectly feasible to fetch at a lower resolution, but automatic format selection could transparently degrade the video quality instead of rejecting a lossy conversion
- If the user is forced to explicitly pick an (audio,video[,sub]) format tuple, they may not know precisely what they're getting