Ytdltt
@yt-dlp meets @homeassistant, @magic-wormhole | @telegram and @mqtt
Install / Use
/learn @entropie/YtdlttREADME
YTDLTT – MQTT-Controlled YouTube Downloader
ytdltt listens to the yt/dl MQTT topic and downloads YouTube videos
or audio sequentially using yt-dlp.
The intended usecase is that this apps runs as systemd service. It
watches a mqtt topic for a JSON string of paramters, downloads the
content and uses (optionally) telegram/message mqtt topic to reply a
wormhole code to the sender who will be able to use that code to
download directly.
Features
- Audio or video download via URL prefix:
A---https://...V---https://...→ video (MP4)
- Optional: Magic Wormhole one-time download code via telegram
Workflow
It should work well with node-red and telegram:
- node-red watches telegram bot for incoming message (a youtuble url, maybe prefixed)
- check in node if sender is authorized
- optionally we may apply params, depending on senderID
- submits hash to
yt/dltopic - which is processed by
ytdltt ytdlttsends wormhole code if applicable viamessage/telegram(which is further handled by node red)
Example node-red function node

Requirements
yt-dlpandffmpegin$PATH- MQTT broker
- Ruby with
Trompiewhich enables seamless communication with mqtt broker - Optional:
magic-wormhole
Example MQTT Payload
url: mandatory; prefix says if audio (A---) only or complete video (V---), prefix defaults toconfig[:variant]senderid: optional; could be used (is not) except for telegram replymid: optional; telegrams conversation id,paramters: optional; expand yt-dlp argument list, also add different output path (["-P", "/tmp/foo"])
{
"url": "A---https://youtu.be/xyz123",
"senderid": 4936578,
"mid": 2834,
"parameters": ["-P", "/home/media/mom/incoming"]
}
Nix systemd service definition, should be easy to adapt
systemd.services.ytdltt = {
description = "Run ytdltt Ruby script";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = "mit";
ExecStart = "${pkgs.ruby_3_2}/bin/ruby /etc/nixos/res/gems/ytdltt/bin/ytdltt";
WorkingDirectory = "/etc/nixos/res/gems/ytdltt";
Environment = [
"PATH=${lib.makeBinPath [
pkgs.ruby_3_2
pkgs.ffmpeg
pkgs.yt-dlp
pkgs.magic-wormhole
]}:/etc/profiles/ruby-gems/bin"
"YTDLTT_SLEEP=1"
];
Restart = "on-failure";
RestartSec = "60s";
StartLimitBurst = 5;
};
};
Related Skills
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.7kCommit, push, and open a PR
