mafintosh / playback

Video player built using electron and node.js
https://mafintosh.github.io/playback/
MIT License
2.01k stars 237 forks source link

Are the plans for UPnP/DLNA support? #20

Open yfr opened 9 years ago

yfr commented 9 years ago

I would love an easy to use obvious way to use our local network streaming. Any plans anyone?

mafintosh commented 9 years ago

are there any good node modules available for adding this?

yfr commented 9 years ago

I don't really know. Just popped in mind that this would be cool. Will have a look, but i'm not sure if i can be a helping hand at this. It's more like a feature request.

SchizoDuckie commented 9 years ago

There are some upnp/dlna modules in the popcorntime repos that may help you.

freeall commented 9 years ago

@SchizoDuckie nice. Do you have a link?

thibauts commented 9 years ago

I was thinking about it just this morning :) I have this https://github.com/thibauts/node-upnp-mediarenderer-client

As far as I know popcorntime uses my module. I can't (obviously) test it on many TVs but it seems to work with a good deal of brands.

thibauts commented 9 years ago

What's missing :

Regarding external subtitles support :

I think that's pretty much it.

It has to be noted that good feedback seems to be difficult to collect, given the large variety of brands and embedded UPnP engines. I've seen the popcorn time dev struggle with this, as users tended to mistake formats unspported by their TV with a bug. There's a function here that should help detect unsupported formats before trying to play them.

thibauts commented 9 years ago

Currently working on the eventing part.

SchizoDuckie commented 9 years ago

This would be awesome if i could integrate with DuckieTV.

I've been putting off chromecast development to await vlc's implementation, but if your project also starts working on Linux/windows and can support launching via a custom url protocol it would be a match made in heaven On 14 Apr 2015 23:20, "Thibaut Séguy" notifications@github.com wrote:

Currently working on the eventing part.

— Reply to this email directly or view it on GitHub https://github.com/mafintosh/playback/issues/20#issuecomment-93066203.

thibauts commented 9 years ago

I just finished implementing eventing in upnp-device-client and added debug traces. I'll try to find some time to work on media events in upnp-mediarenderer-client next week.

thibauts commented 9 years ago

Looks like it wasn't THAT much work :) media events implemented in upnp-mediarenderer-client.

xat commented 9 years ago

@thibauts amazing work! Playing around with it right now :D

thibauts commented 9 years ago

Just updated upnp-mediarenderer-client with DIDL-Lite subtitles support. Some TVs don't support external subtitles at all, though (mine included). So testers welcome !

thibauts commented 9 years ago

So what we need now is some module for discovery. node-ssdp would do the trick but I don't feel it, I don't really know why. If someone is interested in this feature, let me know what you think.

Glavin001 commented 9 years ago

I would really love this feature! Is there any development on this lately?

Some TVs don't support external subtitles at all,

Maybe we could hardcode the subtitles into the video stream? I found https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo

thibauts commented 9 years ago

I left this aside as there doesn't seem to be much interest in this feature. Though the UPnP module works and is ready to be integrated.

As for subtitles, I'm not sure it would be that easy with streams :/

Glavin001 commented 9 years ago

I'd love to help this weekend / next week and get this integrated!

Looking at the usage

// Instanciate a client with a device description URL (discovered by SSDP)
var client = new MediaRendererClient('http://192.168.1.50:4873/foo.xml');

Is there an example of what foo.xml is?

I've found this package that uses your library and the section of code that generates their XML: https://github.com/gyzerok/nodecast-js/blob/master/src/Browser.js#L10-L29 It'd be nice to have a clear example though.

thibauts commented 9 years ago

Yeah what's provided to MRC is the URL that's in the Location header of the SSDP reply.

Having an example would be nice, sure. I didn't do it so far as I wasn't very satisfied with the available options regarding SSDP modules.

thibauts commented 9 years ago

foo.xml is the root URL of the UPnP device. It's the entry point from which you can introspect the device and find services / capabilities. As said above it's also the URL that the device announces on the local network through SSDP.