gabrielmagno / crab-dlna

A minimal UPnP/DLNA media streamer written in Rust
Other
63 stars 4 forks source link

Play online video #17

Open 834772509 opened 11 months ago

834772509 commented 11 months ago

Is it possible to push DLNA network video links?

flokli commented 10 months ago

I think it's not possible currently. MediaStreamingServer::new asks for a (local) &std::path::Path to a video file and fails if it doesn't exits.

It'd be nice if it'd be possible to pass in something implementing AsyncRead and AsyncSeek, as well as support for extracting subtitles from the video file itself (think about .mkv files with subtitles included).

gabrielmagno commented 10 months ago

This is an interesting idea @834772509 , I will try to implement it sometime in the future. Not sure how easy that would be tough.

gabrielmagno commented 10 months ago

I think it's not possible currently. MediaStreamingServer::new asks for a (local) &std::path::Path to a video file and fails if it doesn't exits.

Maybe it is possible to directly refer to the DLNA link as an string.

It'd be nice if it'd be possible to pass in something implementing AsyncRead and AsyncSeek, as well as support for extracting subtitles from the video file itself (think about .mkv files with subtitles included).

AFAIK, when the subtitle is embedded in the video file, the DLNA doesn't have to do anything. Most players/renderers are able to identify it from the video metadata file, and properly list and show the subtitle.