yt-dlp automation ideas reddit / selfhosted ---------------------------------------------------------------------- GayInThePNW · 2023-12-28 22:05 Does anyone automate the yt-dlp videos they download? When you are on your phone or other device and see a video you want to own, what process do you use to obtain it using yt-dlp? I was thinking of a static web page that you submit a URL that executes a script to download the video or perhaps there is a web-based yt-dlp docker container I'm missing. I checked out tubesync and its awesome for youtube videos but not "other" videos. Thanks, Videoless in Seattle ​ ---------------------------------------------------------------------- Legitimate_Farm_3095 · 2023-12-28 22:19 can't help with "other" videos but when it comes to youtube i just save them to certain playlists. every night yt-dlp runs and grabs anything new. maybe you can do something similar with the "other" videos if yt-dl supports it ---------------------------------------------------------------------- koriwi · 2023-12-28 22:53 ive built something similar but for youtube music playlists. just quick n dirty and the success html page is missing so i dont spam this comment section toooo much. \`\`\`ts import express from "express"; import { spawnSync } from "child\_process"; const app = express(); app.get("/", (req, res) => { res.sendFile(\_\_dirname + "/index.html"); }); app.get("/success", (req, res) => { res.sendFile(\_\_dirname + "/success.html"); }); app.get("/download/playlist", (req, res) => { const { url } = req.query; let downloadURL: URL; try { downloadURL = new URL(String(url)); } catch (error) { res.status(400).send("Invalid URL"); return; } const downloadDir = "\~/Downloads"; // run yt-dlp spawnSync("yt-dlp", \[ "--embed-metadata", "--audio-quality", "0", "--audio-format", "opus", "--output", \`${downloadDir}/%(playlist\_title)s/%(channel)s-%(title)s.%(ext)s\`, "-x", downloadURL.toString(), \]); const result = spawnSync("beet", \[ "import", "-ql", "import.log", "-m", downloadDir, \]); console.log(result.stdout.toString()); console.log(result.stderr.toString()); if (result.stderr.toString() !== "") { res.status(500).send(result.stderr.toString()); return; } res.redirect("/success"); }); app.listen(3210, () => console.log("listening on port 3210")); \`\`\` \`\`\`html YT2Beets html, body { width: 100%; height: 100%; } body { display: flex; justify-content: center; align-items: center; } .container { padding: 50px; font-family: sans-serif; color: white; border-radius: 15px; filter: drop-shadow(0 0 10px black); text-shadow: 0 0 10px black; background-color: rgb(252, 52, 52); display: flex; flex-direction: column; justify-content: center; align-items: center; } \#form-content { display: flex; flex-direction: column; justify-content: center; align-items: center; } \#playlist-label { font-size: 30px; margin: 10px; } \#playlist { width: 500px; height: 30px; border-radius: 5px; border: none; margin: 10px; padding: 5px; font-size: 20px; } \#playlist-button { border-radius: 5px; border: 1px solid white; margin: 10px; padding: 15px; font-size: 20px; background-color: rgb(252, 52, 52); color: white; cursor: pointer; } \#playlist-button:hover { background-color: white; color: rgb(252, 52, 52); } YouTube Playlist to beets converter Playlist URL: Download \`\`\` ---------------------------------------------------------------------- koriwi · 2023-12-28 22:55 just replace the beets lines with something you want to do with the file(s)/folder after you are done downloading ---------------------------------------------------------------------- brightwoof · 2023-12-28 23:27 Jeeze that's brilliant and simple. ---------------------------------------------------------------------- Legitimate_Farm_3095 · 2023-12-28 23:32 it should grab the highest quality by default. if not there is probably a switch to add to make it happen. ---------------------------------------------------------------------- brightwoof · 2023-12-28 23:32 Apparently it grabs highest quality with audio and video stitched together which is generally 720p ---------------------------------------------------------------------- Kali0z · 2023-12-29 00:49 If you want a website to enter the URL to download, then there is [https://github.com/manbearwiz/youtube-dl- server](https://github.com/manbearwiz/youtube-dl-server) \- I use it to download one-off videos ---------------------------------------------------------------------- helmut72 · 2023-12-29 01:31 This fork of youtube-dl-server supports yt-dlp and it's also a bookmark possible: [https://github.com/nbr23/youtube-dl- server](https://github.com/nbr23/youtube-dl-server) ---------------------------------------------------------------------- Square_Lawfulness_33 · 2023-12-29 05:17 I know this isn't yt-dlp but Jdownloader does this already. Also there is pyload which is a webgui for multiple scripts including yt-dlp. ---------------------------------------------------------------------- 5197799 · 2023-12-30 19:04 I'm a little late to the convo, but I do. I use [this](https://github.com/Jeeaaasus/youtube-dl) docker image to automate my videos downloads. I use four separate instances. * YouTube Channels * "Other" channels * Miscellaneous "other" videos * Experimenting on turning YouTube channels into audio for podcasts. Works....incredibly well for me. And the instructions are simple and very clear to follow.