{"id":51631953,"url":"https://github.com/ajsb85/chromecast-youtube","last_synced_at":"2026-07-13T08:31:09.230Z","repository":{"id":360487808,"uuid":"1250336435","full_name":"ajsb85/chromecast-youtube","owner":"ajsb85","description":"A lightweight CLI tool in Rust to discover Nest displays and cast YouTube videos, playlists, and channels sequentially.","archived":false,"fork":false,"pushed_at":"2026-05-26T15:56:17.000Z","size":26,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T17:18:19.234Z","etag":null,"topics":["caster","chromecast","google-cast","mdns","nest-hub","playlist","rust","youtube"],"latest_commit_sha":null,"homepage":"https://github.com/ajsb85/chromecast-youtube","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajsb85.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-26T14:30:00.000Z","updated_at":"2026-05-26T15:58:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ajsb85/chromecast-youtube","commit_stats":null,"previous_names":["ajsb85/chromecast-youtube"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ajsb85/chromecast-youtube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajsb85%2Fchromecast-youtube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajsb85%2Fchromecast-youtube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajsb85%2Fchromecast-youtube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajsb85%2Fchromecast-youtube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajsb85","download_url":"https://codeload.github.com/ajsb85/chromecast-youtube/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajsb85%2Fchromecast-youtube/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35416386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caster","chromecast","google-cast","mdns","nest-hub","playlist","rust","youtube"],"created_at":"2026-07-13T08:31:08.620Z","updated_at":"2026-07-13T08:31:09.225Z","avatar_url":"https://github.com/ajsb85.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Cast \u0026 Nest Display Caster in Rust\n\nA lightweight command-line utility written in Rust that discovers Google Cast devices (Chromecast and Nest smart displays) on your local network, extracts direct progressive media stream URLs from YouTube videos, channels, or playlists using `yt-dlp`, and casts them sequentially.\n\n## Features\n\n- 📶 **mDNS Auto-Discovery**: Scans the local network for Google Cast devices using Multicast DNS (`_googlecast._tcp.local.`).\n- 🖥️ **Smart Display Prioritization**: Intelligently parses device Friendly Names (`fn`) and Model Names (`md`) to auto-detect and target Nest Hubs and Google Home displays.\n- 🔀 **YouTube Channel \u0026 Playlist Support**: Automatically extracts all video links from channel and playlist URLs (e.g. `https://www.youtube.com/@anylist-app`) and schedules sequential casting.\n- 🔄 **Sequential Playback State Tracking**: Connects to the Cast device, listens to media status messages, and automatically resolves/casts the next video in the queue when the current one finishes.\n- 🏎️ **Optimized Progressive MP4 Streams**: Configures `yt-dlp` to extract pre-merged progressive MP4 stream formats containing both video and audio, preventing adaptive HLS playback failures on the default media receiver.\n- 🐳 **Dynamic MIME Content Types**: Automatically handles different stream container formats (like progressive `.mp4` or HLS `.m3u8` playlists) dynamically at load time.\n- 💓 **Session Heartbeat Keep-Alive**: Includes an event loop that automatically replies to Keep-Alive heartbeat PINGs, ensuring your casting sessions remain active.\n\n## Prerequisites\n\nTo cast YouTube videos, playlists, or channels, you must have `yt-dlp` (recommended) or `youtube-dl` installed and available in your `PATH`.\n\n### Installing `yt-dlp`\nOn Debian/Ubuntu:\n```bash\nsudo apt update\nsudo apt install yt-dlp\n```\nVia python pip:\n```bash\npip install -U yt-dlp\n```\n\n## Getting Started\n\n### Installation \u0026 Compilation\nClone the repository and compile the binary in release mode:\n```bash\ngit clone https://github.com/\u003cyour-username\u003e/chromecast-youtube.git\ncd chromecast-youtube\ncargo build --release\n```\nThe compiled binary will be available at `./target/release/chromecast`.\n\n### System-wide Installation\n\nYou can install the compiled utility system-wide to make the `chromecast` command available from anywhere in your shell:\n\n```bash\nsudo cp target/release/chromecast /usr/local/bin/chromecast\nsudo chmod 755 /usr/local/bin/chromecast\n```\n\nOnce installed, you can invoke the program directly as `chromecast` without prefixing it with `./target/release/` or `./`.\n\n### Command-Line Arguments \u0026 Options\n\n```\nUsage: chromecast [OPTIONS] \u003cURLS\u003e...\n```\n\n| Argument / Option | Short | Long | Type | Default | Description |\n| :--- | :--- | :--- | :--- | :--- | :--- |\n| `\u003cURLS\u003e...` | - | - | `Vec\u003cString\u003e` | *Required* | One or more space-separated YouTube videos, channels, playlists, or direct progressive stream links. |\n| Target Address | `-a` | `--address` | `String` | `None` | Optional IP address of your Cast device. Bypasses standard mDNS discovery to connect directly. |\n| Network Port | `-p` | `--port` | `u16` | `8009` | The TCP port of the Chromecast / Nest display. |\n| Discovery Timeout | `-t` | `--timeout` | `u64` | `3` | Maximum time in seconds to scan the local network for cast devices. |\n| Loop Playback | `-l` | `--loop-playlist` | `Flag` | `Disabled` | Loops the entire unified media queue infinitely. When all videos finish, casting automatically restarts from the first video. |\n| Append to Queue | `-d` | `--add` | `Flag` | `Disabled` | Connects to the currently playing casting session via a local IPC socket and appends the new URL(s) to the active playlist queue without restarting playback. |\n\n---\n\n### Usage \u0026 Examples\n\n#### 1. Cast a Single YouTube Video (Auto-Discovery)\nScans the local network, auto-detects Nest displays or Chromecasts, resolves a direct progressive stream, and starts casting:\n```bash\nchromecast https://www.youtube.com/watch?v=XShbT8oXGys\n```\n\n#### 2. Combine Multiple Playlists \u0026 Channels into a Single Queue\nPass multiple space-separated links. The caster aggregates all individual videos into a single sequential queue:\n```bash\nchromecast https://www.youtube.com/playlist?list=PLaGRwR1U7ndDySvz0tY3hJHS05iezhw9r https://www.youtube.com/@anylist-app\n```\n\n#### 3. Loop the Merged Queue Infinitely (`-l` / `--loop-playlist`)\nPlays all resolved videos from both playlists sequentially. When the final video completes, the queue instantly wraps around and restarts playback from the first item:\n```bash\nchromecast -l \"https://www.youtube.com/playlist?list=PLaGRwR1U7ndDySvz0tY3hJHS05iezhw9r\" \"https://www.youtube.com/playlist?list=PLaGRwR1U7ndCj2SwBXmOZBlzO7g9jlO1Z\"\n```\n\n#### 4. Cast to a Specific IP Address Directly (`-a` / `--address`)\nSkips mDNS discovery completely and connects directly to the specified IP address:\n```bash\nchromecast -a 192.168.68.101 https://www.youtube.com/watch?v=XShbT8oXGys\n```\n\n#### 5. Adjust mDNS Search Duration (`-t` / `--timeout`)\nAllows more or less time (in seconds) to query network devices before selecting a target display:\n```bash\nchromecast -t 6 https://www.youtube.com/watch?v=XShbT8oXGys\n```\n\n#### 6. Dynamically Append to the Running Playlist Queue (`-d` / `--add`)\nIf you already have a casting session running in another terminal, you can dynamically append new videos, channels, or playlists to the active queue without stopping or restarting playback:\n```bash\nchromecast -d https://www.youtube.com/watch?v=XShbT8oXGys\n```\nThis resolves the target URL(s) and appends them directly to the end of the active playlist. The running cast session will play them sequentially once the earlier videos in the queue are completed.\n\n---\n\n## CLI Help Interface\n\nTo view all arguments, flags, and options from the terminal:\n```bash\nchromecast --help\n```\n\n## License\n\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajsb85%2Fchromecast-youtube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajsb85%2Fchromecast-youtube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajsb85%2Fchromecast-youtube/lists"}