Skip to content
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

troubleshouting setting to ignore inputstream.adaptive #255

Merged
merged 1 commit into from May 18, 2019

Conversation

mediaminister
Copy link
Collaborator

@mediaminister mediaminister commented May 18, 2019

A troubleshouting setting that ignores inputstream.adaptive add-on on Kodi.
This causes streamservice to always select HLS streams that are played directly in Kodi player.
This setting should always be enabled unless you are troubleshooting playback problems.

When disabled, this setting also ignores "Use DRM" setting, because inputstream.adaptive is needed for (Widevine) DRM

@mediaminister mediaminister force-pushed the inputstreamoption branch 2 times, most recently from 0e61c68 to aa83693 Compare May 18, 2019 12:20
@@ -22,5 +22,6 @@
<setting label="30865" help="30866" type="action" id="refresh_favorites" action="RunPlugin(plugin://plugin.video.vrt.nu/?action=refreshfavorites)"/>
<setting label="30867" help="30868" type="action" id="clear_tokens" action="RunPlugin(plugin://plugin.video.vrt.nu/?action=clearcookies)"/>
<setting label="30869" help="30870" type="select" id="max_log_level" values="Quiet|Info|Verbose|Debug" default="Info"/>
<setting label="30871" help="30872" type="bool" id="useinputstreamadaptive" default="true"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also make this option visible only when inputstream.adaptive is installed.

I am also considering to add in this window a few text-fields that contain important debug information, e.g.
inputstream.adaptive version, inputstreamhelper version, Widevine information (if possible), etc.

ANd maybe add some section headers to group things together.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@dagwieers
Copy link
Collaborator

This is working great! Thanks!

@dagwieers dagwieers merged commit 0a5d23b into add-ons:master May 18, 2019
@dagwieers
Copy link
Collaborator

Something we have to document better. Without inputstream.adaptive I need to set Maximum bandwidth to 4096kbps to get 720p, whereas with inputstream.adaptive I get away with setting it to 3072kbps. So maybe we should indicate ranges in the settings, or increase the values in the table to cover both.

@mediaminister
Copy link
Collaborator Author

The bandwidth should not differ much. I used peak bandwidth setting in streamservice for HLS because this is a mandatory attribute in HLS manifest files.

I think inputstream uses average bandwidth for MPEG DASH.
You can consider this a bug.

I don't know what's the right choice, peak or average bandwidth.

@dagwieers
Copy link
Collaborator

Ah, good to know. It would be best if they both behave similarly.
But more importantly, we should document it as such for clarity ;-)

@pietje666 Did you give @mediaminister Wiki rights ?
Or give me admin rights on the repo so I can do it ;-)

@mediaminister mediaminister deleted the inputstreamoption branch May 19, 2019 15:41
@@ -204,7 +204,7 @@ def get_stream(self, video, retry=False, api_data=None):
drm_stream = (vudrm_token or uplynk)

# Select streaming protocol
if not drm_stream and self._kodi.has_inputstream_adaptive_installed() or drm_stream and self._can_play_drm and self._kodi.get_setting('usedrm') == 'true':
if not drm_stream and self._kodi.has_inputstream_adaptive() or drm_stream and self._can_play_drm and self._kodi.get_setting('usedrm') == 'true':
Copy link
Collaborator

@dagwieers dagwieers May 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~If I remember it right and has precedence over or which means that all of the following conditions need to be met:
Update: I was wrong.

Copy link
Collaborator

@dagwieers dagwieers May 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to rewrite it like this:

                if not drm_stream and self._kodi.has_inputstream_adaptive():
                    protocol = 'mpeg_dash'
                elif drm_stream and self._can_play_drm and self._kodi.get_setting('usedrm') == 'true':
                    protocol = 'mpeg_dash'

Still, I am not sure this is what is intended if we disable the use of inputstream.adaptive.

I am also not sure how MPEG_DASH or HLS related to inputstream.adaptive.

  • Can we play both MPEG_DASH and HLS without inputstream.adaptive ?
  • Can we play both MPEG_DASH and HLS with inputstream.adaptive ?

Would it make sense to also have an option like:

  • Preferred streaming format: HLS / MPEG_DASH

Maybe we need a matrix in the Wiki to describe working combinations wrt. DRM, inputstream.adaptive and Kodi (OMX player vs MMAL player).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. InputStream Adaptive is indispensable to play MPEG DASH (with or without Widevine DRM protection)
  2. Widevine DRM-support (for InputStream Adaptive) is not available on Kodi 17 at all.
  3. We can play HLS with Inputstream Adaptive but also with standard Kodi player
  4. In Kodi 17 different older versions of InputStream Adaptive are available with less functionality.
  5. There are 7(!) different Kodi 17 releases and it's unclear how well InputStream Adaptive works on all these versions.

So, in streamservice I made choices to limit possible streaming combinations:

  • InputStream Adaptive installed: always play MPEG-DASH
  • InputStream Adaptive is missing: always play HLS

This is a simple workflow and it guarantees video and audio will always play on every Kodi version and platform.

Making HLS or MPEG-DASH a user choice makes little sense. The useinputstreamadaptive setting basically has the same effect because of the choices I made in streamservice.

Splitting up the if statement for cosmetics is okay (both can_play_drm and has_inputstream_adaptive functions listen to the useinputstreamadaptive setting.)

Documenting stream compatibility in the wiki won't hurt but is not a priority for me.

Copy link
Collaborator

@dagwieers dagwieers May 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mediaminister Thanks for the detailed description. It may be useful to detail this in the code, and maybe even in the settings when we disable InputStream Adaptive (e.g. this forces use of HLS) in the help (which isn't shown yet, needs fixing in Kodi).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mediaminister I noticed you have been promoted to Collaborator so you can now assign things to me, or ask me to review something. Welcome :-)

@dagwieers dagwieers added the enhancement New feature or request label May 25, 2019
@dagwieers dagwieers added this to the v1.10.0 milestone May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants