yt-dlp is a feature-rich command-line video/audio downloader, forked from youtube-dl. It extracts media URLs from over a thousand websites using site-specific extractors, downloads via HTTP, HLS, DASH, RTMP, and other protocols, and supports extensive post-processing (FFmpeg transcoding, metadata embedding, chapter manipulation, etc.). The architecture is modular: a core engine (YoutubeDL) orchestrates extractors, downloaders, and postprocessors, all of which can be extended via a plugin system. Networking is abstracted behind a handler interface with support for requests, curl-cffi, and websockets. The codebase is well-structured, with clear patterns for authentication, geo-restriction handling, and format selection. It includes a sophisticated JavaScript challenge solver and Proof-of-Origin token system for YouTube. Despite its size, the project maintains good code organization and extensive test coverage.
SmartTube is a free, open-source Android TV YouTube client that replaces the official YouTube app with enhanced features like SponsorBlock integration, adjustable playback speed, 8K/HDR support, live chat, and no dependency on Google Services. The architecture is a modular Android application built on a heavily customized fork of ExoPlayer (v2.10.6, Amazon variant) for media playback, and AndroidX Leanback (v1.0.0) for the TV-optimized user interface. The codebase follows a presenter-view pattern with clear separation of concerns, using singleton presenters and view interfaces. Key entry points include SplashActivity, BrowseActivity, PlaybackActivity, and various settings dialogs. Data flows primarily from YouTube's unofficial API (via SABR streaming protocol) through custom ExoPlayer extensions, with additional integrations for SponsorBlock, DeArrow, remote control, and Google Drive backup. External dependencies include ExoPlayer (forked), Leanback (vendored), Glide, RxJava, WorkManager, and a few third-party UI libraries (chatkit, slidableactivity, filepicker).
HomeTube is a Streamlit-based web application for downloading and managing media from YouTube and 1800+ other platforms via yt-dlp. It provides a rich UI for URL analysis, quality profile selection (AV1/VP9/H.264), subtitle embedding, video cutting (keyframe/precise), SponsorBlock ad removal, and playlist synchronization with full diff-based state management. The architecture is a monolithic Streamlit app with heavy subprocess orchestration of yt-dlp and ffmpeg, backed by a typed configuration system, JSON-based workspace state files, and a comprehensive test suite with mocked Streamlit dependencies. Designed for homelab deployment, it includes Docker multi-arch builds, Nginx reverse proxy config, and daily automated rebuilds to stay current with yt-dlp updates. Core data flows: URLs are analyzed via yt-dlp (with client fallback chain default → ios → web), metadata is cached in url_info.json, download strategies are computed using format profile matching (codec priorities, audio language detection), and final files are moved to a configurable destination with optional hardlinking. Playlists are handled via a dedicated sync module that computes rename/archive/delete plans and applies them with dry-run support. The system emphasizes resilience through generic file naming, temporary workspace preservation, and intelligent caching that refuses to overwrite premium AV1/VP9 metadata with lower-quality data. The application is not a data research project; it is a production-ready media downloader and manager with no ML or analytical components. Its complexity lies in data integrity patterns (metadata caching, state machines, filesystem mutations) rather than data science.
Litube is an advanced Android WebView wrapper for YouTube, providing ad-free playback, native video/audio downloading, background play, Picture-in-Picture (PiP), SponsorBlock integration, and a customizable extension system. It uses a hybrid architecture where YouTube's mobile site is rendered in a WebView via `YoutubeFragment`, while video playback is handled natively using AndroidX Media3 (ExoPlayer) with custom `YoutubeHttpDataSource` for streaming. The app includes a full-featured download manager (multi-threaded chunked downloads, audio/video merging with MP4Parser), a queue system, a mini-player, and gesture controls. It reverse-engineers YouTube's streaming protocols using the NewPipe Extractor and generates PoTokens through a WebView-based mechanism to bypass bot detection. The application is structured as a single-module Gradle project with Dagger Hilt for dependency injection, MMKV for key-value storage, and Gson for serialization. It has extensive JavaScript injection (`init.js`) to manipulate the YouTube DOM for features like hiding Shorts, displaying dislikes, and injecting a custom settings page. While primarily an application, it includes data extraction components (stream catalog, delivery analysis) that could be considered a research layer for understanding YouTube's streaming infrastructure.