New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HLS support #16
Comments
It is so nice to hear that someone finds it useful 😄. If you have any special needs regarding API just let me know. Yes, HLS (or DASH) is not supported.. but I can look into it and check what could be done. Could you please provide me (as an example) a URL to some content? It could be something from svtplay.se. |
BTW, Maybe you have already noticed it but also Kodimote exposes DBus API. For instance Quickddit uses it to share Youtube links. |
I had actually missed that aspect of kodimote, and that it wasn't openrepos-only. I'll check on it too. Also, I'm not asking for HLS termination in the app itself, just relaying the URL to the renderer... Here is what i did to hackishly play stuff on my renderer (URL made to be variable, $1, not what i ran with though):
Method from here: http://www.accella.net/knowledgebase/sending-a-video-content-to-a-dlnaupnp-softwaredevice-using-curl/ |
Actually, Jupii does more than just passing URL. To provide as wide as possible compatibility with different renderers I've decided to proxy every HTTP stream. It enables me to implement additional features like removing in-stream meta data that "confuses" some devices. In current implementation when you add m3u URL Jupii tries to discover direct stream (direct URL to media resource) and than it downloads small portion of the data to find out what a media type and meta data of the stream is. Unfortunately this mechanism doesn't work well with HLS playlist... Anyway, I will fix it by adding detection if m3u playlist is a HLS playlist instead regular one. Thanks to URL you provided I've already tested it and the fix seems to work fine with Kodi. I'm not sure how this test is representative because from my experience Kodi is extremely liberal in terms of accepting different variants of protocols, codecs and URLs. It literally can play anything! The fix will be included in the next beta release (possibly in 2-3 days). |
I realize that, and it is a very valuable feature, one that i could certainly not find the time to replicate. However, in this particular case it would be a good feature and perhaps sensible default option (not Jupii-global, but rather my use of it) to not proxy the stream and thereby drain the battery. Regardless of the outcome, thanks for your attention and dedication :) BTW... there are really cheap ~$12 DLNA renderers on eBay etc "Mirascreen", i got a "V2" for testing this, since my TV is the wrong class of device. I will at least test with that. |
In 7e35a99 I've added fix to detect HLS playlist and apply proxy-less handling. It is just "workaround" rather than final solution. As you suggested, I have to re-think this "proxy everything" concept and introduce less radical approach. I would be grateful if you could test Jupii recent 2.2.0 release (it is available via OpenRepos). |
Thanks for that! Proxying everything in the spirit of compatibility is a fair first version, nothing wrong with that... but optimizations/improvements are nice :) I need to fix my reading comprehension... I built my own from source, but that should be equivalent i guess. One thing with running in proxy mode is that the automatic bitrate selection was using a quite low setting, delegating it worked better (for me, this time). I'm already planning to limit the bitrate choices on my end with the stupid and specific method i described previously. A generic implementation suitable for Jupii might be harder. Btw, may i steal your icon-m-device.png for using as an icon for invoking Jupii from my app? |
Didn't have time to start hacking until now in the evening, but POC is coming along nicely (i.e. i can add streams to Jupii from my app). |
I threw in a "MimeType=x-scheme-handler/jupii;" to the harbour-jupii.desktop file. xdg-open jupii:// does launch the app, but a new instance of it, but Qt.openUrlExternally("jupii://") in my app does nothing. Oh, and adding the same url again does just that... it will appear multiple times in the list in the list. Any interface where i could avoid this would be much appreciated. |
Very briefly, everything is doable. For instance I can add new methods to DBus API like: addUrlOnce and addUrlOnceAndPlay... Right now I'm not available for few days but when get back I will go through all your questions/ideas. |
Hello.. I'm back
Definitely they are. Just tap on bottom panel. It will expand and other controls will be visible. Like on this screenshot.
Sure, no problem. I will be delighted. Raw SVG files are here.
You right it is useless in the current form. In df61f30 I've added new methods: addUrlOnce and addUrlOnceAndPlay. Description and API details are in org.jupii.xml. Hopefully It will address all your use cases. If not just let me know. |
Thanks, awesome work! It happens during this log snippet anyway: BTW... Jupii hangs for me if i power off the DLNA renderer. Should i open a separate issue? |
Another thought and possible feature request related to this... it would be neat if one could raise/front/activate/... Jupii from the invoking app, either explicitly or as part of addUrlOnceAndPlay. Currently i do Qt.openUrlExternally(Qt.resolvedUrl("/usr/share/applications/harbour-jupii.desktop")) One example of what i was thinking is perhaps: |
It is weird but your device reports that only I've notice that you enabled "Redirection mode". Please try to use "Proxy" instead. In Proxy mode Jupii adds extra HTTP header Additionally, could you please check if you can play video/audio files stored on your phone and control panel is visible?
Yes. I'm aware of that. I'm going to fix it but is has low priority right now. |
Yes, quite weird... Volume does work, and that's a pretty worthless feature compared to play/pause. |
I can confirm that it can at least pause, reporting could still be haywire of course. I took my curl example above replaced Play with Pause throughout. Didn't even have to take out the speed entry. Tested with both a file that was local to the phone, and a redirected stream. |
Yes. Volume control is a part of completely different UPnP service (RenderingControl) and they are handled separately. Support for Play/Pause/Stop/Seek can be retrieved with In 3b49b74 I've added workaround to ignore |
That made controls work. :)
I'll see if I can't poke around the querying a bit. |
Output of GetCurrentTransportActions
Playing:
And did I mention seeking works? |
It is very very weird.. but it's funny as well. It seems that The only solution I see right now is to add extra switch (in the Settings) to assume that all control actions are always supported. |
Yes indeed. I suspect there may be a language barrier between the spec and the implementers. |
Just to sum up. Extra configuration option (switch in the Settings) could be too much confusing so I've resolved it differently. From 8f87a27 supported actions retrieved with |
Any chance of a release in Harbour? |
Yes, Jupii is now ready for the release. Actually, it awaits to be approved by Harbour reviewer.
Looks awesome. Additionally you could also use |
Great news :) |
Meh, it's not reliable for me... so doing a compromise |
Just an info => Jupii 2.2.2 release is now available in Harbour |
Any chance you could add bringing Jupii to front/focus when the addUrlOnceAndPlay method is invoked? |
Done in a7d9b15. |
Thanks, works great! |
It is not HLS already supported? |
I would not say that HLS is 100% supported. There is a workaround. When URL points to HLS playlist (special kind of M3U playlist) Jupii pass this playlist without any change to UPnP device. It might work for some devices (Kodi for instance) but for most it will not work because devices don't understand HLS. The ideal implementation would be to convert on-the-fly HLS to "normal" single bit-rate stream and then pass this stream to UPnP device. It is possible but hard to implement. |
I know that you can implement HLS 100%. ; ) |
Closing this old issue report. HLS (but only for audio) is supported from version 2.14. |
What an amazing idea with a Dbus API! This basically solves the issue of all other developers having to do their own DLNA integration. (I arrived here from working on a a svtplay.se app for SFOS) However, I can't seem to add a HLS (http://x.y/z.m3u8) stream as an URL. Could you please look in to if that can be made possible?
I have separately verified that the renderer can play it when given the same url i tested with.
The text was updated successfully, but these errors were encountered: