Compare commits

..

3 Commits

Author SHA1 Message Date
e801932783 latest 2022-11-02 08:38:49 -07:00
b89e4090ba latest 2022-11-02 07:53:24 -07:00
0844ea5d2f about to begin testing 2022-10-31 07:57:30 -07:00
8 changed files with 152 additions and 51 deletions

View File

@ -1,20 +1,25 @@
FROM ubuntu:bionic FROM ubuntu:jammy
ENV DEBIAN_FRONTEND noninteractive 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 apt install -y python3-pip ffmpeg locales curl
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 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
ENV LANG en_US.UTF-8 ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8 ENV LC_ALL en_US.UTF-8
RUN pip3 install youtube_dl RUN pip3 install yt-dlp
ADD youtube-dl.conf /etc/youtube-dl.conf ADD youtube-dl.conf /etc/youtube-dl.conf
ADD entrypoint.sh /usr/local/bin/entrypoint.sh ADD run.sh /usr/local/bin/run.sh
VOLUME /output
USER nobody:nogroup USER nobody:nogroup
WORKDIR /tmp WORKDIR /tmp
CMD /bin/bash /usr/local/bin/entrypoint.sh CMD /bin/bash /usr/local/bin/run.sh
ADD videolist.txt /etc/videolist.txt

View File

@ -1,7 +1,28 @@
default: build_image export DOCKER_HOST := ssh://root@lstor1
default: deploy
deploy:
make build_image
make stop
make run
build_image: build_image:
docker build -t sneak/youtube-dl . docker build -t sneak/ytdlp .
stop:
-docker stop sneak-ytdlp
-docker rm -f sneak-ytdlp
run: stop
docker run \
-d \
--name sneak-ytdlp \
-v /srv/lstor1/warez/youtube:/output \
--restart unless-stopped \
sneak/ytdlp
make logs
logs:
docker logs -f sneak-ytdlp
run:
docker run -t sneak/youtube-dl /bin/bash

View File

@ -1,32 +0,0 @@
#!/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

View File

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

View File

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

40
run.sh Normal file
View File

@ -0,0 +1,40 @@
#!/bin/bash
DEST="/output"
INTERVAL="3600" #1h
START_TIME="$(date +%s)"
function listChannels {
SRC="/etc/videolist.txt"
grep -Ev "^#|^$" "$SRC" | sed 's/#.*$//'
}
function timeRunning {
expr $(date +%s) - $START_TIME
}
function main {
init
curl https://ipinfo.io
while true ; do
doDownload
echo "sleeping $INTERVAL"
sleep $INTERVAL
done
}
function init {
umask 0000
cd "$DEST"
}
function doDownload {
for CHANNEL in $(listChannels); do
echo "downloading $CHANNEL"
HOME="$DEST" yt-dlp --config-location /etc/youtube-dl.conf $CHANNEL
sleep 1
done
}
main

74
videolist.txt Normal file
View File

@ -0,0 +1,74 @@
https://www.youtube.com/ArchitecturalDigest/videos
https://www.youtube.com/c/%EC%82%B0%EA%B3%A8%EC%A7%9C%EA%B8%B0%EB%8F%99%EB%AC%BC%EC%B9%AD%EA%B5%AC/videos # valley cat friends
https://www.youtube.com/c/3blue1brown/videos
https://www.youtube.com/c/AnitaSadowska/videos # photographer
https://www.youtube.com/c/AppliedScience/videos
https://www.youtube.com/c/AuditTheAudit/videos
https://www.youtube.com/c/BestboyAdam/videos
https://www.youtube.com/c/Channel5YouTube/videos
https://www.youtube.com/c/ChubbyemuGames/videos
https://www.youtube.com/c/CookwithE/videos
https://www.youtube.com/c/DailyDoseOfInternet/videos
https://www.youtube.com/c/DancingBacons/videos
https://www.youtube.com/c/FindingEquilibrium/videos
https://www.youtube.com/c/GeneNagata/videos
https://www.youtube.com/c/GetHandsDirty/videos
https://www.youtube.com/c/GregGoesAllIn/videos # GGAI
https://www.youtube.com/c/H%C3%96RBERLIN/videos # hör berlin
https://www.youtube.com/c/Ididathing/videos
https://www.youtube.com/c/ImnotNorm/videos # i'm not norm
https://www.youtube.com/c/KyleHillScience/videos
https://www.youtube.com/c/MaxCoopermax/videos
https://www.youtube.com/c/MetaBallStudios/videos
https://www.youtube.com/c/MichaelReee2/videos
https://www.youtube.com/c/Mingchi/videos
https://www.youtube.com/c/NASASpaceflightVideos/videos # NSF
https://www.youtube.com/c/NileRed/videos
https://www.youtube.com/c/NileRed2/videos
https://www.youtube.com/c/NilsBerglund/videos # nils berglund simulations
https://www.youtube.com/c/NinosHome/videos
https://www.youtube.com/c/PotatoJet/videos
https://www.youtube.com/c/SlowPokerTime/videos
https://www.youtube.com/c/Techmoan/videos
https://www.youtube.com/c/TechnologyConnections/videos
https://www.youtube.com/c/The8BitGuy/videos # 8bitguy
https://www.youtube.com/c/Theb1mGoogle/videos
https://www.youtube.com/c/TravelThirstyBlog/videos
https://www.youtube.com/c/essentialcraftsman/videos
https://www.youtube.com/c/geraldundone/videos
https://www.youtube.com/c/helenrennie/videos
https://www.youtube.com/c/jessicakirsh/videos # jessica kirsh tankwatcher
https://www.youtube.com/c/mugumogu/videos
https://www.youtube.com/c/mymechanics/videos
https://www.youtube.com/c/mymechanicsinsights/videos
https://www.youtube.com/c/talksatgoogle/videos
https://www.youtube.com/c/yousuckatcooking/videos
https://www.youtube.com/channel/UC-i2EBYXH6-GAglvuDIaufQ/videos # Speedy Pharmacology
https://www.youtube.com/channel/UC2bdWYzIRMq_r6Rnidr4tdQ/videos
https://www.youtube.com/channel/UC54htze_JB0zz9H6oAbMOJQ/videos # Medskl
https://www.youtube.com/channel/UC5QLET-j2MXT8Pszbb1p8og/videos # matt studios backrooms
https://www.youtube.com/channel/UC85VW73bQLEjs_taFKP7TwQ/videos # Nucleus Medical Media
https://www.youtube.com/channel/UC88tlMjiS7kf8uhPWyBTn_A/videos # captain joe
https://www.youtube.com/channel/UC9RM-iSvTu1uPJb8X5yp3EQ/videos # Wendover
https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA/videos # Veritasium
https://www.youtube.com/channel/UCMYx_bMlI2i_9yMJj3sBgSQ/videos # norm stuff
https://www.youtube.com/channel/UCPSx50w7WavmAXmYowlhNWQ/videos # takashii from japan
https://www.youtube.com/channel/UCPphTEhqUg1ID9r6259ejuQ/videos # absolutenuts
https://www.youtube.com/channel/UCSn66bwaqLpPYe9Haty5zDw/videos # Greg's Game
https://www.youtube.com/channel/UCWOoC8wMmvfNrFqt696cApg/videos
https://www.youtube.com/channel/UCXAfmcfOeS0rxDz6sp0cYYg/videos # AANS Neurosurgery
https://www.youtube.com/channel/UCZaDAUF7UEcRXIFvGZu3O9Q/videos # dirtyUSMLE
https://www.youtube.com/channel/UC_yjveGdyx6mqqHkHaD-_bg/videos # Larry Mellick
https://www.youtube.com/channel/UCm9K6rby98W8JigLoZOh6FQ/videos # the lockpicking lawyer
https://www.youtube.com/channel/UCsXVk37bltHxD1rDPwtNM8Q/videos # Kurzgesagt
https://www.youtube.com/channel/UCtqxG9IrHFU_ID1khGvx9sA/videos # all gas no brakes
https://www.youtube.com/channel/UCworsKCR-Sx6R6-BnIjS2MA/videos # clickspring
https://www.youtube.com/playlist?list=PLRCo6A0bcdqBTBMIrObu-8qRCBsBFJxtR # my "good" playlist
https://www.youtube.com/playlist?list=PLRCo6A0bcdqDYxACt-ntgJsuWI7EHPjAv # my "bestofyoutube" playlist
https://www.youtube.com/user/Abom79/videos # Abom79
https://www.youtube.com/user/DeviantOllam/videos # deviant ollam
https://www.youtube.com/user/HomeMadeModern/videos
https://www.youtube.com/user/Vsauce/videos # vsauce, michael here
https://www.youtube.com/user/arduinoversusevil/videos # AvE
https://www.youtube.com/user/featony/videos # this old tony
https://www.youtube.com/user/saunixcomp/videos # NYC CNC

View File

@ -4,6 +4,8 @@
--all-subs --all-subs
--embed-subs --embed-subs
--embed-thumbnail --embed-thumbnail
--sponsorblock-mark all
--sponsorblock-remove sponsor,intro,outro,selfpromo,preview,filler
--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