This commit is contained in:
Jeffrey Paul 2019-07-21 19:48:52 -07:00
parent a486042b54
commit 91439c19fc
6 changed files with 60 additions and 3 deletions

View File

@ -4,9 +4,17 @@ ENV DEBIAN_FRONTEND noninteractive
ENV HOME /root ENV HOME /root
RUN apt update && apt -y upgrade RUN apt update && apt -y upgrade
RUN apt install -y python3-pip ffmpeg locales
RUN echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && locale-gen && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
RUN apt install -y python3-pip ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN pip3 install youtube_dl RUN pip3 install youtube_dl
ADD youtube-dl.conf /etc/youtube-dl.conf
ADD entrypoint.sh /usr/local/bin/entrypoint.sh
ADD youtube-dl.conf /root/.config/youtube-dl/config USER nobody:nogroup
WORKDIR /tmp
CMD /bin/bash /usr/local/bin/entrypoint.sh

View File

@ -2,3 +2,11 @@
inspired by https://old.reddit.com/r/DataHoarder/comments/c6fh4x/after_hoarding_over_50k_youtube_videos_here_is/ inspired by https://old.reddit.com/r/DataHoarder/comments/c6fh4x/after_hoarding_over_50k_youtube_videos_here_is/
# usage
```
docker run \
-v /storage/scratch/youtube:/output \
-e DOWNLOAD_URL=https://www.youtube.com/channel/UCsXVk37bltHxD1rDPwtNM8Q/videos \
sneak/youtube-dl
```

View File

@ -0,0 +1,32 @@
#!/bin/bash
DEST="/storage/scratch/youtube"
CHANNELS=""
CHANNELS+=" https://www.youtube.com/channel/UCm9K6rby98W8JigLoZOh6FQ/videos" # the lockpicking lawyer
CHANNELS+=" https://www.youtube.com/user/DeviantOllam/videos" # deviant ollam
CHANNELS+=" https://www.youtube.com/user/Vsauce/videos" # vsauce, michael here
CHANNELS+=" https://www.youtube.com/user/featony/videos" # this old tony
CHANNELS+=" https://www.youtube.com/channel/UCworsKCR-Sx6R6-BnIjS2MA/videos" # clickspring
CHANNELS+=" https://www.youtube.com/user/arduinoversusevil/videos" # AvE
CHANNELS+=" https://www.youtube.com/user/Abom79/videos" # Abom79
CHANNELS+=" https://www.youtube.com/user/saunixcomp/videos" # NYC CNC
CHANNELS+=" https://www.youtube.com/channel/UCZaDAUF7UEcRXIFvGZu3O9Q/videos" # dirtyUSMLE
CHANNELS+=" https://www.youtube.com/channel/UC-i2EBYXH6-GAglvuDIaufQ/videos" # Speedy Pharmacology
CHANNELS+=" https://www.youtube.com/channel/UC_yjveGdyx6mqqHkHaD-_bg/videos" # Larry Mellick
CHANNELS+=" https://www.youtube.com/channel/UC54htze_JB0zz9H6oAbMOJQ/videos" # Medskl
CHANNELS+=" https://www.youtube.com/channel/UCXAfmcfOeS0rxDz6sp0cYYg/videos" # AANS Neurosurgery
CHANNELS+=" https://www.youtube.com/channel/UC85VW73bQLEjs_taFKP7TwQ/videos" # Nucleus Medical Media
CHANNELS+=" https://www.youtube.com/channel/UC9RM-iSvTu1uPJb8X5yp3EQ/videos" # Wendover
CHANNELS+=" https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA/videos" # Veritasium
CHANNELS+=" https://www.youtube.com/channel/UCsXVk37bltHxD1rDPwtNM8Q/videos" # Kurzgesagt
CHANNELS+=" https://www.youtube.com/channel/UC88tlMjiS7kf8uhPWyBTn_A/videos" # captain joe
for CHANNEL in $CHANNELS; do
docker run \
-v $DEST:/output \
-e DOWNLOAD_URL="$CHANNEL" \
sneak/youtube-dl
done

5
bin/ytdl Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
docker run \
-v /storage/scratch/youtube:/output \
-e DOWNLOAD_URL="$1" \
sneak/youtube-dl

4
entrypoint.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
umask 0000
youtube-dl --config-location /etc/youtube-dl.conf "$DOWNLOAD_URL"

View File

@ -7,4 +7,4 @@
--match-filter "playlist_title != 'Liked videos' & playlist_title != 'Favorites'" --match-filter "playlist_title != 'Liked videos' & playlist_title != 'Favorites'"
-f "(bestvideo[vcodec^=av01][height>=1080][fps>30]/bestvideo[vcodec=vp9.2][height>=1080][fps>30]/bestvideo[vcodec=vp9][height>=1080][fps>30]/bestvideo[vcodec^=av01][height>=1080]/bestvideo[vcodec=vp9.2][height>=1080]/bestvideo[vcodec=vp9][height>=1080]/bestvideo[height>=1080]/bestvideo[vcodec^=av01][height>=720][fps>30]/bestvideo[vcodec=vp9.2][height>=720][fps>30]/bestvideo[vcodec=vp9][height>=720][fps>30]/bestvideo[vcodec^=av01][height>=720]/bestvideo[vcodec=vp9.2][height>=720]/bestvideo[vcodec=vp9][height>=720]/bestvideo[height>=720]/bestvideo)+(bestaudio[acodec=opus]/bestaudio)/best" -f "(bestvideo[vcodec^=av01][height>=1080][fps>30]/bestvideo[vcodec=vp9.2][height>=1080][fps>30]/bestvideo[vcodec=vp9][height>=1080][fps>30]/bestvideo[vcodec^=av01][height>=1080]/bestvideo[vcodec=vp9.2][height>=1080]/bestvideo[vcodec=vp9][height>=1080]/bestvideo[height>=1080]/bestvideo[vcodec^=av01][height>=720][fps>30]/bestvideo[vcodec=vp9.2][height>=720][fps>30]/bestvideo[vcodec=vp9][height>=720][fps>30]/bestvideo[vcodec^=av01][height>=720]/bestvideo[vcodec=vp9.2][height>=720]/bestvideo[vcodec=vp9][height>=720]/bestvideo[height>=720]/bestvideo)+(bestaudio[acodec=opus]/bestaudio)/best"
--merge-output-format mkv --merge-output-format mkv
-o "/output/%%(playlist_uploader)s/%%(playlist)s/%%(playlist_index)s - %%(title)s - %%(id)s.%%(ext)s" -o "/output/%(playlist_uploader)s/%(playlist)s/%(playlist_index)s - %(title)s - %(id)s.%(ext)s"