-
Notifications
You must be signed in to change notification settings - Fork 182
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 (m3u8) and MPEG DASH (mpd) support? #223
Comments
HLS is supported in all Stremio clients, DASH is not widely supported, although some clients like the Android TV app may work. DRM is definitely not supported in any of the clients though. I would experiment with both DASH and DRM support, but we don't have many example streams for such experimentation. I noticed ur Reddit post also, I will comment with a link to this answer. |
I have a question (sorry if it is trivial but I haven't looked into the docs very deeply): What do you mean by stremio clients? Do you mean the actual executable that is used to run the app? My question was really focusing on Android/Android TV version of stremio (sorry If I didn't make that clear), if I understand correctly the player that is used by default in android is based on ExoPlayer from Google (which is compatible with DRM protected Dash streams) Here you can find a lots of mpd for testing purposes https://ottverse.com/free-mpeg-dash-mpd-manifest-example-test-urls/ I also have examples with Widevine encryption if you are interested. |
By clients I mean each individual app for each platform:
Each of them use different video players. The Android Mobile and Android TV apps are not the same app (although they share the same app id), we hope to release a version where we merge both of them into one app one day, but this won't happen soon. Android TV uses ExoPlayer by default, and VLC as a backup if Exo fails to play, but users can switch to VLC as the default from settings if they so wish. The Android Mobile app uses only VLC. On desktop we use MPV, and in the web app we use HTML5 For DRM, even if the video players support them, the addon sdk and the clients do not support passing the DRM keys to the video players. IMHO the best way to support DRM is by creating a local proxy that decrypts the streams, then sends the locally decrypted streams to the video player (instead of the original one) as this will add support for DRM across all clients. (except web app in the case when a streaming server is not connected) |
Thanks for the explanation! I have been looking around, it seems that the mentioned players support DASH with DRM: Exoplayer does it natively and I have been using it in the past For the web version you can use dash.js The only problem is VLC, but if the plan for the future is to move to ExpPlayer for normal android as well, I would say that the most neat solution would be to just add another field to the Stream object (https://github.com/Stremio/stremio-addon-sdk/blob/master/docs/api/responses/stream.md), this field would just need to contain the decryption key. At this point the client just needs to pass the URL and Key to the relevant player. I think mpd is a really important format, for example Kodi supports it and the addons use it all the time. |
This is far from a reality, I make no promises regarding future features or plans.
Although I didn't look into DRM decryption too much, I would presume that it needs both a secret and a key, not just a key. I could be wrong though..
But this is not trivial, it would need to be researched, implemented and tested for every single client, while a DRM stream proxy would need to be done once and it would "just work" everywhere. Not that a DRM proxy is easy to implement, it is just the better solution for support considering many clients, and possibly more clients in the future. Although I don't know much about Kodi or ever looked into it much, I did check their Netflix / HBO Go / etc project, which I believe also uses a local proxy for DRM. (yet again, I could be wrong, I looked into it a few years back) |
Is there a starting point if I wanted to make modification to stremio itself? I would like to try few things so I could learn more. If you could link a guide or give some instructions on how to build the app from source for desktop it would be great! |
I did add shakaplayer to my own implementation, its not cleaned up though as i use it for my own stuff and dont really care but plays Dash, HLS and DRM (depends on browsers available DRM decoders). Also works in the QT5 app but you will likely need to have chrome installed as QT5 looks in that directory for widevine.dll or if you rebuild stremio-shell it you can point it to a custom location |
@AltFreq07 player.configure({
drm: {
servers: {
'com.widevine.alpha': 'YOUR_LICENSE_SERVER_URL'
},
advanced: {
'com.widevine.alpha': {
serverURL: 'YOUR_LICENSE_SERVER_URL',
// Include the preauthorization token
customData: {
'Authorization': 'Bearer YOUR_PREAUTH_TOKEN'
}
}
}
}
}); |
I will implement something like this when i get to my next addon which will likely need this. |
Any plans on adding mpd support? |
@mhdzumair a current workaround is to use an external player such as mpv or just player |
I'm expecting native stremio support :) |
Is it possible to use an external player like mpv to play a .mpd stream on AndroidTV? How would I create an addon that passes the stream and keys to the mpv player? |
Implemented a solution to play MPEG DRM/non-DRM DASH stream in any player specially for stremio add-on https://github.com/mhdzumair/mediaflow-proxy, @jsolferreira you can implement the Stremio Addon to return the stream link of MPD stream with MediaFlow Proxy. Currently, this support Clear Key DRM and non DRM MPD with Live stream as well VOD static stream. I will add similar MPD dash implementation support to stremio server if they okay with my implementation. CC: @jaruba |
Hello, I'm very keen to implement a stremio addon but i have a question about supported video formats. In theory ExoPlayer supports both HLS (m3u8) and MPEG DASH (mpd) with DRM (e.g. widevine). I can easily write a scraper that returns a DASH stream and its widevine keys. I have been implementing a stremio-like app in the past. My question is: are these formats supported by Stremio?
I don't see from this page what formats are precisely supported but maybe i'm just looking in the wrong place.
Sorry if this is a stupid question, i'm just starting to learn about stremio capabilities!
The text was updated successfully, but these errors were encountered: