
Ytdl-webserver: Webserver for downloading YouTube videos - setra
https://github.com/Algram/ytdl-webserver
======
bklaasen
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}" ```

Works a treat!

[1] Termux (Terminal emulator with packages) -
[https://f-droid.org/app/com.termux](https://f-droid.org/app/com.termux),
[https://play.google.com/store/apps/details?id=com.termux](https://play.google.com/store/apps/details?id=com.termux)

~~~
marmaduke
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.

~~~
seddin
This is great! Does it also support play background music that you download as
a .m4a ?

~~~
marmaduke
VLC does yes. That said the real issue is that the download part can’t run in
background for more than 4 minutes, so you can’t download big videos.

------
frou_dh
It's not as slickly packaged, but I made a webserver that turns YouTube
channels into proper RSS subscribe-able audio podcasts:

[https://github.com/frou/yt2pod](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
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.

~~~
frou_dh
That's in fact already supported, but I didn't document it because I felt it
muddied the pitch.

[https://github.com/frou/yt2pod/blob/31b55410c38dbf655b641eee...](https://github.com/frou/yt2pod/blob/31b55410c38dbf655b641eee2b1542797d268b10/watcher.go#L55)

Add this per-podcast in the config file:

"vidya": true

I hear you about not wanting to spend too much time in the circus.

------
stingraycharles
In my experience, YouTube-dl needs to be updated quite frequently, as YouTube
changes their design.

How is this handled here? Is periodically kill / restart the container enough?

~~~
markovbot
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.

~~~
s3m4j
But it isn't actually using that in the app, it's using the
[https://github.com/przemyslawpluta/node-youtube-
dl](https://github.com/przemyslawpluta/node-youtube-dl) npm package.

~~~
yorwba
That's just a wrapper calling the youtube-dl binary indirectly:
[https://github.com/przemyslawpluta/node-youtube-
dl/blob/mast...](https://github.com/przemyslawpluta/node-youtube-
dl/blob/master/lib/youtube-dl.js#L183)

~~~
dkoeji89oe
[https://github.com/przemyslawpluta/node-youtube-
dl/blob/mast...](https://github.com/przemyslawpluta/node-youtube-
dl/blob/master/lib/downloader.js)

except for those times it downloads a youtube-dl binary.

[https://github.com/przemyslawpluta/node-youtube-
dl/blob/mast...](https://github.com/przemyslawpluta/node-youtube-
dl/blob/master/package.json#L23)

------
pishpash
The more tools built around youtube-dl to make it usable by your grandma, the
more likely it gets shut down, like Popcorn Time.

------
jimktrains2
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.

~~~
wongarsu
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.

------
kekub
Actually Apple provides a way to either download videos or audio directly on
the device through Siri Shortcuts. The integration is great: Just open the
share sheet in Safari or the YouTube app and run this shortcut:
[https://www.icloud.com/shortcuts/48d3103eafc04c7098094794e06...](https://www.icloud.com/shortcuts/48d3103eafc04c7098094794e0638ef7)
Add a convert media step if you want audio. I think I got it from this reddit
thread:
[https://www.reddit.com/r/workflow/comments/2p0vga/workflow_d...](https://www.reddit.com/r/workflow/comments/2p0vga/workflow_download_youtube_videos/)

------
sondh
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.

1: [https://github.com/wader/ydls](https://github.com/wader/ydls)

2: [https://github.com/daohoangson/android-
ydls](https://github.com/daohoangson/android-ydls)

~~~
explainplease
Save the video's audio as a local file if you want to keep using it. Any
YouTube video is bound to disappear without warning at any time.

------
superasn
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)

~~~
LMYahooTFY
...you can't watch anything at less than 1.5x?

Is this something you've trained yourself to do...? Like deliberately?

~~~
yjftsjthsd-h
It it's not uncommon to habitually listen to podcasts at that speed, and after
a while you get used to it and everything else just sounds slow. Not exactly
intentional, rather a side effect of something that made sense by itself.

~~~
anonytrary
This is fine for podcasts, lectures and books where the purpose is to take in
information. Timing in movies and TV shows is important; silences and slow
pans are placed there for a reason. I can't imagine why one would watch a
movie or TV show at 1.5x when the purpose isn't to take in information, but to
enjoy artwork.

------
damm
Meh; nodejs that uses youtube-dl frontend? why can't I just use youtube-dl?

~~~
austinpray
For instance if you run this on your desktop you could bookmark
"[http://local-desktop-ip:3000"](http://local-desktop-ip:3000") on your mobile
device and be able to download videos while on mobile.

------
Walkman
I made the same thing for command line:
[https://github.com/kissgyorgy/interactive-youtube-
dl](https://github.com/kissgyorgy/interactive-youtube-dl)

------
jnaina
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

------
tlrobinson
Does this download to the client or server? The latter would be useful on a
NAS / Plex box.

------
hgasimov
Is downloading youtube videos legal?

~~~
fapjacks
Come again? Are you implying that we do not have a Fair Use in storing a local
recording of a video broadcast for personal use?
[https://en.wikipedia.org/wiki/Sony_Corp._of_America_v._Unive...](https://en.wikipedia.org/wiki/Sony_Corp._of_America_v._Universal_City_Studios,_Inc).

~~~
Jaruzel
It's not that clear-cut outside of the US.

In the UK, it's only legal if it's for 'time-shifting' with the expectation
the recording is only watched once and then deleted:

[https://www.gov.uk/guidance/exceptions-to-copyright#time-
shi...](https://www.gov.uk/guidance/exceptions-to-copyright#time-shifting)

~~~
JCharante
Thank you for sharing. I knew the UK was a bit backward, but not to that
extent.

------
grezql
-deleted link- may be a DMCA violation

