gabrielmagno / crab-dlna Goto Github PK
View Code? Open in Web Editor NEWA minimal UPnP/DLNA media streamer written in Rust
License: Other
A minimal UPnP/DLNA media streamer written in Rust
License: Other
This is great app. I really like the idea.
list
function works as expected. However, while trying to play video I got this:
crab-dlna play "test_video.mkv" -d "http://192.168.1.105:1135/"
INFO crab_dlna::cli > Selecting render
INFO crab_dlna::devices > Render specified by location: http://192.168.1.105:1135/
INFO crab_dlna::cli > Building media streaming server
ERROR crab_dlna > Failed to connect to remote render '192.168.1.105:0': Can't assign requested address (os error 49)
It reproduces on both macOS (M1) and GNU Linux (x86_64). My TV runs WebOS.
How to play multiple media files Or specify a directory
During the upnp discover stage, running failed if there are several devices on net, and one of them (lets say 1st) have issues. such as:
INFO crab_dlna::cli > List devices
INFO crab_dlna::devices > Discovering devices in the network, waiting 5 seconds...
ERROR crab_dlna > Failed to get next device: The control point responded with status code 404 Not Found
so I suggest that modify devices.rs at line 83, from:
while let Some(device) = devices
.try_next()
.await
.map_err(Error::DevicesNextDeviceError)?
{
debug!("Found device: {}", format_device!(device));
match Self::from_device(device).await {
Some(render) => {
renders.push(render);
}
None => {}
};
}
to
while let Some(result) = devices
.next() // changed from try_next
.await
//.map_err(Error::DevicesNextDeviceError)? no need
{
if let Ok(device) = result {
debug!("Found device: {}", format_device!(device));
match Self::from_device(device).await {
Some(render) => {
renders.push(render);
}
None => {}
};
}
}
I have a laptop with Kodi, and a mobile phone with BubbleUPnP, both support DLNA and can find each other inside the local network. And then I run crab_dlna example code as below in the laptop which hosts Kodi:
use crab_dlna::Render;
#[tokio::main]
async fn main() {
let discover_timeout_secs = 5;
let renders_discovered = Render::discover(discover_timeout_secs).await.unwrap();
for render in renders_discovered {
println!("{}", render);
}
}
However, the results show none of them. Any idea for this problem? Thanks.
Is it possible to push DLNA network video links?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.