{"id":21659767,"url":"https://github.com/gabrielmagno/crab-dlna","last_synced_at":"2025-08-07T02:00:05.608Z","repository":{"id":54633003,"uuid":"488314136","full_name":"gabrielmagno/crab-dlna","owner":"gabrielmagno","description":"A minimal UPnP/DLNA media streamer written in Rust","archived":false,"fork":false,"pushed_at":"2024-09-04T13:11:54.000Z","size":89,"stargazers_count":82,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-18T00:36:55.581Z","etag":null,"topics":["cli","dlna","play","rust","streaming","streaming-video","upnp","video"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabrielmagno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2022-05-03T18:05:50.000Z","updated_at":"2025-07-15T17:38:45.000Z","dependencies_parsed_at":"2024-11-25T09:44:19.724Z","dependency_job_id":null,"html_url":"https://github.com/gabrielmagno/crab-dlna","commit_stats":{"total_commits":79,"total_committers":1,"mean_commits":79.0,"dds":0.0,"last_synced_commit":"ec215630eaa54f90839c83276663ad8d29e25605"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gabrielmagno/crab-dlna","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielmagno%2Fcrab-dlna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielmagno%2Fcrab-dlna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielmagno%2Fcrab-dlna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielmagno%2Fcrab-dlna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabrielmagno","download_url":"https://codeload.github.com/gabrielmagno/crab-dlna/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielmagno%2Fcrab-dlna/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269185738,"owners_count":24374634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"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":["cli","dlna","play","rust","streaming","streaming-video","upnp","video"],"created_at":"2024-11-25T09:31:31.248Z","updated_at":"2025-08-07T02:00:05.569Z","avatar_url":"https://github.com/gabrielmagno.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# crab-dlna\n[![CICD](https://github.com/gabrielmagno/crab-dlna/actions/workflows/CICD.yml/badge.svg)](https://github.com/gabrielmagno/crab-dlna/actions/workflows/CICD.yml)\n[![Version info](https://img.shields.io/crates/v/crab-dlna.svg)](https://crates.io/crates/crab-dlna)\n\ncrab-dlna is a minimal UPnP/DLNA media streamer, available both as a standlone CLI (command line interface) application and a Rust library.\n\nIt allows you to play a local video file in your TV (or any other DLNA compatible device).\n\n## Features\n - Searching available DLNA devices in the local network\n - Streaming audio\n - Streaming video, with subtitle support\n\n## Installation\n\nIn the GitHub Releases of this repository we provide [archives of precompiled binaries](https://github.com/gabrielmagno/crab-dlna/releases) of crab-dlna, available for **Linux**, **Windows**, and **macOS**.\n\n### cargo\n\nInstallation via cargo is done by installing the `crab-dlna` crate:\n```bash\n# If required, update Rust on the stable channel\nrustup update stable\n\ncargo install crab-dlna\n\n# Alternatively, --locked may be required due to how cargo install works\ncargo install crab-dlna --locked\n```\n\n## Usage (CLI)\n\nYou can list all the CLI commands by running:\n```\ncrab-dlna --help\n```\n\n### List\n\nScan compatible devices and list the available ones:\n```bash\ncrab-dlna list\n```\n\nIf your device is not being listed, you might need to increase the search timeout:\n```bash\ncrab-dlna -t 20 list\n```\n\n### Play\n\nPlay a video, automatically loading the subtitles if available, selecting a random device:\n```bash\ncrab-dlna play That.Movie.mkv\n```\n\nPlay a video, specifying the device through query (scan devices before playing):\n```bash\ncrab-dlna play That.Movie.mkv -q \"osmc\"\n```\n\nPlay a video, specifying the device through its exact location (no scan, faster):\n```bash\ncrab-dlna play That.Movie.mkv -d \"http://192.168.1.13:1082/\"\n```\n\n## Usage (library)\n\nAdd `crab-dlna` and `tokio` to your dependencies:\n```toml\n[dependencies] \ntokio = { version = \"1\", features = [\"full\"] }\ncrab-dlna = \"0.2\"\n```\n\n### Example: discover and list devices\n\ncrab-dlna provides a function to discover a list devices in the network.\n\n```rust\nuse crab_dlna::Render;\n\n#[tokio::main]\nasync fn main() {\n    let discover_timeout_secs = 5;\n    let renders_discovered = Render::discover(discover_timeout_secs).await.unwrap();\n    for render in renders_discovered {\n        println!(\"{}\", render);\n    }\n}\n```\n\n### Example: play a video in a device\n\nWe can specify a DLNA device render trough a query string, \nand then play a certain video in it, automatically detecting \nthe subtitle file.\n\n```rust\nuse std::path::PathBuf;\nuse crab_dlna::{\n    Render,\n    RenderSpec,\n    MediaStreamingServer,\n    STREAMING_PORT_DEFAULT,\n    get_local_ip,\n    infer_subtitle_from_video,\n    Error,\n    play,\n};\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Error\u003e {\n    let discover_timeout_secs = 5;\n    let render_spec = RenderSpec::Query(discover_timeout_secs, \"Kodi\".to_string());\n    let render = Render::new(render_spec).await?;\n    let host_ip = get_local_ip().await?;\n    let host_port = STREAMING_PORT_DEFAULT;\n    let video_path = PathBuf::from(\"/home/crab/Videos/my_video.mp4\");\n    let inferred_subtitle_path = infer_subtitle_from_video(\u0026video_path);\n    let media_streaming_server = MediaStreamingServer::new(\n        \u0026video_path,\n        \u0026inferred_subtitle_path,\n        \u0026host_ip,\n        \u0026host_port,\n    )?;\n    play(render, media_streaming_server).await\n}\n```\n\nYou can access the full [documentation](https://docs.rs/crab-dlna/) to see more details about the library.\n\n## License\n\nCopyright (c) 2022 Gabriel Magno.\n\n`crab-dlna` is made available under the terms of either the MIT License or the Apache License 2.0, at your option.\n\nSee the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) files for license details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielmagno%2Fcrab-dlna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielmagno%2Fcrab-dlna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielmagno%2Fcrab-dlna/lists"}