All Projects → 0xpr03 → yayd

0xpr03 / yayd

Licence: BSD-3-Clause License
youtube-dl backend in Rust, aka youtube & co downloader

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to yayd

JukeBot
Discord music bot written in Python 3
Stars: ✭ 23 (-28.12%)
Mutual labels:  youtube-dl, yt-dlp
youtube-dl-wpf
A simple GUI wrapper for youtube-dl and yt-dlp.
Stars: ✭ 358 (+1018.75%)
Mutual labels:  youtube-dl, yt-dlp
YDL
A Simple GUI wrapper around yt-dlp for Windows using AHK
Stars: ✭ 18 (-43.75%)
Mutual labels:  youtube-dl, yt-dlp
Candy
🍭 Cross-platform YouTube-downloader with playlist and channel support as well as build-in audio / video converter.
Stars: ✭ 229 (+615.63%)
Mutual labels:  ffmpeg, youtube-dl
youtube-play
🎵 A command-line utility which streams music from YouTube
Stars: ✭ 47 (+46.88%)
Mutual labels:  ffmpeg, youtube-dl
Savify
Download Spotify songs to mp3 with full metadata and cover art!
Stars: ✭ 227 (+609.38%)
Mutual labels:  ffmpeg, youtube-dl
Vividl
Modern Windows GUI for youtube-dl/ yt-dlp
Stars: ✭ 189 (+490.63%)
Mutual labels:  youtube-dl, yt-dlp
Ytmdl
A simple app to get songs from YouTube in mp3 format with artist name, album name etc from sources like iTunes, Spotify, LastFM, Deezer, Gaana etc.
Stars: ✭ 2,070 (+6368.75%)
Mutual labels:  ffmpeg, youtube-dl
YoutubeDLSharp
A simple .NET wrapper library for youtube-dl/ yt-dlp
Stars: ✭ 51 (+59.38%)
Mutual labels:  youtube-dl, yt-dlp
Gui-Youtube-dl
A cross platform GUI for youtube-dl written entirely in python using the WX library.
Stars: ✭ 60 (+87.5%)
Mutual labels:  ffmpeg, youtube-dl
Video Downloader Deploy
Video Downloaders (you-get, youtube-dl, annie) One-Click Deployment Batch. || 视频下载器 (you-get, youtube-dl, annie) 一键配置脚本。
Stars: ✭ 178 (+456.25%)
Mutual labels:  ffmpeg, youtube-dl
JJMumbleBot
A plugin-based All-In-One mumble bot solution in python 3.7+ with extensive features and support for custom plugins.
Stars: ✭ 40 (+25%)
Mutual labels:  ffmpeg, youtube-dl
Downline
Free cross-platform desktop app to download videos and music from YouTube and many other sites
Stars: ✭ 146 (+356.25%)
Mutual labels:  ffmpeg, youtube-dl
gropple
Server and bookmarklet to download files via youtube-dl directly from your browser. Cross platform single binary installation, web browser configurable.
Stars: ✭ 33 (+3.13%)
Mutual labels:  youtube-dl, yt-dlp
Vidgear
A High-performance cross-platform Video Processing Python framework powerpacked with unique trailblazing features 🔥
Stars: ✭ 2,048 (+6300%)
Mutual labels:  ffmpeg, yt-dlp
YT-DLP-SCRIPTS
...Just a place for me to share my various YT-DLP & related bash scripts.
Stars: ✭ 70 (+118.75%)
Mutual labels:  youtube-dl, yt-dlp
Youtube Api
A way to host your own API that converts youtube video's to mp3/mp4 and returns a download/stream link and information.
Stars: ✭ 76 (+137.5%)
Mutual labels:  ffmpeg, youtube-dl
Live Dl
Download live streams from YouTube
Stars: ✭ 82 (+156.25%)
Mutual labels:  ffmpeg, youtube-dl
SponSkrub
Strip advertisements from downloaded YouTube videos
Stars: ✭ 156 (+387.5%)
Mutual labels:  ffmpeg, youtube-dl
yt-interval
Flask app to download YT videos in intervals. Eg. from start to 30 seconds: start-30
Stars: ✭ 47 (+46.88%)
Mutual labels:  ffmpeg, youtube-dl

yayd Build

About:

YAYD is intended as backend for yt-dlp. It's purpose is processing download jobs which are fetched from a Database. You probably want to let it run over a webserver, using it as online service. It was born out of ISP related problems and has multi-user support, can delete stored files from jobs after a time and supports proxies. Currently there are only modules for youtube, twitch and soundcloud, feel free to extend them. (See Hacking Yayd)

Installation

Required:

  1. Use a release build or build yayd from source with rust: cargo build --release
  2. Use and run setup.sql to create the tables according to your requirements.
  3. Run yayd for a first time, edit the config file, see Config
  4. Create your own logging configuration
    yayd doesn't provide any sort of UI, being a backend, see down below for an example.

GUI / Frontend for yayd

A frontend example is vailable under yayd-frontend and looks like this

Hacking Yayd

Every supported site has it's own handler module inside src/handler
All library stuff, including yt-dlp and ffmpeg bindings are inside src/lib
The Request struct used by every handler is inside lib/mod.rs. In general every request has an URL, quality code and information about whether it's an playlist request or not. (A youtube URL for a single video can include a playlist tag.)

Handlers are consisting of a function called at program startup to register which URLs it's capable of handling and a function that does the actual work. Handlers can register multiple modules, for example for split up playlist and file handling.

For an example see youtube.rs

Testing

As yayd heavily relies on it's db connection, nearly all tests require an empty test DB to which yayd can connect. (Using temporary tables) You can specify the connection parameters adapting the following command during tests:

db_test=true ip="127.0.0.1" port="3306" user=root pass="" db=ytdownl download_dir="/tmp" temp_dir="/tmp" RUST_BACKTRACE=1 mbps=100 ffmpeg_dir="/tmp/ffmpeg-3.0.2-64bit-static/" cargo test

DB System and quality codes

The DB scheme can be seen in this picture.

Status codes from yayd

code in querydetails, status although misleading is for step updates ("2|3")

Code Meaning
-1 waiting
0 started
1 running
2 finished
3 finished, warnings
10 internal error
11 wrong quality
12 source unavailable

Quality Codes

These are the current quality codes per module: column quality in queries

Youtube Module

Code explanation see itag.
Audio and video files have to be cut together, thus FFMPEG is required.

Code/iTag Description
-1 mp3 converted from source
-2 AAC MQ general
-3 AAC HQ general
133 240p
134 360p
135 480p
136 720p
137 1080p
298 720p, 60 fps
303 1080p, 60 fps

iTag explanation (code > 0):
Youtube-Videos are consisting of two DASH-Files. One is only Video, (in the quality you want). The other one is a bad resolution video, but audio containing DASH-File.
These two are merged by yayd and thus if you specify the wanted quality itag in you query (queries.quality) yayd will merge this with an audio file as specified in the config.
For a personal list of recommended quality itags to be used for the quality column see down below. As youtube changes the available codecs it is recommended to verify your setup from time to time. For example the current 1080p@60fps, mp4 (itag 299) is pixelated in certain circumstances, while the recently added WebM (303) doesn't have this problem.

(WebM is using VP9 as codec, MP4 h264)

Twitch

Code Desciption
-10 Mobile
-11 Low
-12 Medium
-13 High
-14 Source

Notes

There is currently no multithreading support, meaning one job at a time. This is intentional and prevents DOS-Blocks (captcha requests) by some sites.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].