I use Android and have Termux[1] installed. If you create a shell script named '~/bin/termux-url-opener' and share URLs to Termux, it'll invoke that script. Here's the contents of mine:
```
#!/bin/bash
pip install --upgrade youtube-dl
cd storage/movies
youtube-dl "${1}"
```
On iOS I’ve installed Pythonista with Stash, pip installed YouTube-dL, set up a script to take a link and download it to mp4 and share it an app (usually VLC).
This can be triggered from YouTube app by pressing Share, then Pythonista script then the custom script, wait for download then select VLC.
It’s not great for big videos but was extremely satisfying to set up.
Did you know iOS podcasts supports video podcasts? Haven’t looked at your code but maybe wouldn’t be too much work to make video work too. I’ll talk a look. Thanks!
I’ve thought that it would be a great way to avoid the algorithm addiction and only see my subs.
I don't know if it applies to the web server, but for the command-line version of youtube-dl, it has a -U option that updates itself. One could create a batch file or shell script that runs that each time, before downloading a video, or do it manually once in a while. Like someone else said, I think the creator updates the app fairly often.
Edit: I had written a post about youtube-dl describing its use a bit, and also a quick look at its code:
It looks like they're installing youtube-dl via apt, from the Ubuntu 16.04 repos (which is what the docker image uses as a base), do even rebuilding wouldn't cut it. I wonder if this will even work out of the box, because YouTube changed something that required youtube-dl to fix a month or two ago.
I was just thinking the other day of writing a small utility to download a YouTube video and metadata, stuff the metadata in a database, and be able to have a local, searchable copy of videos and channels I'd like to have for a while -- I don't trust they'll be around forever.
I was thinking it could be better if the utility would be more useful if it integrated with mythtv, but I might start as a standalone.
Having a local, searchable version of some channels would be great, especially if it can be configured to download new videos automatically. Some channels are notorious for having videos deleted (e.g. commentary channels that have to fight with contentid or educational channels that have videos involving gunpowder or uranium). Manually backing them up and organizing the videos is very cumbersome.
Just yesterday I built an Android app to cast audio-only (ogg format) from YouTube to Chromecast. Had to do it because:
1. Baby needs her white noise to sleep
2. No other sites have those "8 hours womb sounds" as good as YouTube
3. The YouTube app refuses to cast to Google Home mini
Came across ydls[1] which uses youtube-dl and ffmpeg to download then transcode media on-the-fly. It's not very effective but works great! We no longer have to turn on the TV in our baby room. Check out the source code[2] if you are also a new parent.
Is there a way to download Netflix videos too? My reason is I just can't watch anything at less than 1.5X speed nowadays and Netflix has no such option on mobile (there is a chrome extension though). Any ideas how to do either (dl or increase playback speed on mobile)
+1. The lack of 2x playback speed makes documentaries on Netflix unwatchable. Third-party Chrome extensions of unknown origin doesn't seem like a good idea.
Unfortunately, easier to stick to YouTube and VLC for documentary watching.
For instance if you run this on your desktop you could bookmark "http://local-desktop-ip:3000" on your mobile device and be able to download videos while on mobile.
built a simple MacOS Safari extension that sends the current url to my server, which then runs a simple script to download using youtube-dl. I then use my iPad to view the videos using the nPlayer which can read NFS shares. very useful for downloading and viewing videos from variety of "alternate" video sites
How could it not be? You "download" the stream every time you watch it. It's to everyone's benefit to cache it if you want to watch it more than once. That way you don't use that much bandwidth. You might be served less ads, but you shouldn't be watching them anyway.
Probably only on creative commons-licensed videos (there are some). Otherwise, it might be an unlawful replication.
And yes, there will be arguments about how you're just saving to a file what otherwise comes in via the player. I honestly don't know the definitive answer. :)
Despite all the comments pretending this is all super ok scrapers are obviously not aboveboard. Sites may try to place limits on you or your account but it is unlikely you will go to court over a TOS violation unless you're really abusive.
[+] [-] bklaasen|7 years ago|reply
``` #!/bin/bash
pip install --upgrade youtube-dl cd storage/movies youtube-dl "${1}" ```
Works a treat!
[1] Termux (Terminal emulator with packages) - https://f-droid.org/app/com.termux, https://play.google.com/store/apps/details?id=com.termux
[+] [-] marmaduke|7 years ago|reply
This can be triggered from YouTube app by pressing Share, then Pythonista script then the custom script, wait for download then select VLC.
It’s not great for big videos but was extremely satisfying to set up.
[+] [-] jwilk|7 years ago|reply
https://news.ycombinator.com/formatdoc
[+] [-] m-p-3|7 years ago|reply
To watch I use NewPipe instead of the official YouTube client.
[+] [-] cuchoi|7 years ago|reply
[+] [-] frou_dh|7 years ago|reply
https://github.com/frou/yt2pod
If you find yourself often having your phone in your pocket with the screen blazing, just to be able to listen to YT content, you might like it.
(it's on the todo list to Dockerize it)
[+] [-] ballenf|7 years ago|reply
I’ve thought that it would be a great way to avoid the algorithm addiction and only see my subs.
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] stingraycharles|7 years ago|reply
How is this handled here? Is periodically kill / restart the container enough?
[+] [-] vram22|7 years ago|reply
Edit: I had written a post about youtube-dl describing its use a bit, and also a quick look at its code:
youtube-dl, a YouTube downloader in Python:
https://jugad2.blogspot.com/2013/03/youtube-dl-yourube-downl...
Also check out: pafy - Python API for YouTube:
https://jugad2.blogspot.com/2014/06/pafy-python-api-for-yout...
Edit 2: And this might be of use:
How to download PyCon US 2013 videos for offline viewing using youtube-dl:
https://jugad2.blogspot.com/2013/04/how-to-download-pycon-us...
[+] [-] s3m4j|7 years ago|reply
https://github.com/rg3/youtube-dl/commits/master/youtube_dl/...
[+] [-] markovbot|7 years ago|reply
[+] [-] austinpray|7 years ago|reply
So if you ever run into issues you would just pull the latest container.
[+] [-] Spivak|7 years ago|reply
[+] [-] pishpash|7 years ago|reply
[+] [-] jimktrains2|7 years ago|reply
I was thinking it could be better if the utility would be more useful if it integrated with mythtv, but I might start as a standalone.
[+] [-] wongarsu|7 years ago|reply
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] kekub|7 years ago|reply
[+] [-] sondh|7 years ago|reply
1. Baby needs her white noise to sleep
2. No other sites have those "8 hours womb sounds" as good as YouTube
3. The YouTube app refuses to cast to Google Home mini
Came across ydls[1] which uses youtube-dl and ffmpeg to download then transcode media on-the-fly. It's not very effective but works great! We no longer have to turn on the TV in our baby room. Check out the source code[2] if you are also a new parent.
1: https://github.com/wader/ydls
2: https://github.com/daohoangson/android-ydls
[+] [-] explainplease|7 years ago|reply
[+] [-] superasn|7 years ago|reply
[+] [-] LMYahooTFY|7 years ago|reply
Is this something you've trained yourself to do...? Like deliberately?
[+] [-] TingPing|7 years ago|reply
[+] [-] shasheene|7 years ago|reply
Unfortunately, easier to stick to YouTube and VLC for documentary watching.
[+] [-] severine|7 years ago|reply
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] damm|7 years ago|reply
[+] [-] austinpray|7 years ago|reply
[+] [-] Walkman|7 years ago|reply
[+] [-] jnaina|7 years ago|reply
[+] [-] tlrobinson|7 years ago|reply
[+] [-] hgasimov|7 years ago|reply
[+] [-] fapjacks|7 years ago|reply
[+] [-] CraneWorm|7 years ago|reply
[+] [-] chungy|7 years ago|reply
And yes, there will be arguments about how you're just saving to a file what otherwise comes in via the player. I honestly don't know the definitive answer. :)
[+] [-] naner|7 years ago|reply
[+] [-] aaaaaaaaaab|7 years ago|reply
[+] [-] grezql|7 years ago|reply