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

Why does this stream play on Windows but fails on Linux? #1501

Closed
2 of 7 tasks
Paco8 opened this issue Mar 3, 2024 · 15 comments
Closed
2 of 7 tasks

Why does this stream play on Windows but fails on Linux? #1501

Paco8 opened this issue Mar 3, 2024 · 15 comments
Labels
Resolution: Fixed issue was resolved by a code change

Comments

@Paco8
Copy link

Paco8 commented Mar 3, 2024

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

This is probably not a bug but my mistake.
This stream plays fine on Windows (and Android TV) but fails on Linux.

Expected Behavior

Here is a clear and concise description of what was expected to happen:

The stream should play on all operating systems.

Actual Behavior

Playback fails on Linux.

Possible Fix

To Reproduce

Steps to reproduce the behavior:

Debuglog

The debuglog can be found here:

This is the log from Linux (not playing):
https://paste.kodi.tv/iguvijipub.kodi

It seems inputstream.adaptive can't decrypt the stream, but why?

This is the log from Windows:
https://paste.kodi.tv/yagavejexe.kodi

MPD/M3U8s/ISM

An example or copy of a manifest (or manifests for HLS - master and variants) can be found here:
manifest.txt

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

  • Android

  • iOS

  • tvOS

  • Linux

  • OSX

  • Windows

  • Windows UWP

  • Operating system version/name: Linux (Ubuntu 22) and Windows 11

  • Kodi version: 20.2 (Linux), 21.0-BETA3 (Windows)

  • inputstream.adaptive version: 20.3.13 and 21.4.3

note: Once the issue is made we require you to update it with new information should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@CastagnaIT
Copy link
Collaborator

looks like on 20.2 (Linux) its not able to get streams and so cannot playback idk the reasons
but seem to be not a streaming problem but an ISA old bug

i suggest to try use Kodi 21 on linux to see if playback works

@Paco8
Copy link
Author

Paco8 commented Mar 6, 2024

It doesn't work either in Kodi 21, but now there's no error, but playback never starts (spinning circle).

Log: https://paste.kodi.tv/juwewamoto.kodi

@CastagnaIT
Copy link
Collaborator

the log of k21 linux, show only a subtitle stream apparently without audio and video
please attach the manifest of this video downloaded by isa from windows and linux,
so i can see if there are differences

@Paco8
Copy link
Author

Paco8 commented Mar 7, 2024

@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Mar 8, 2024

Windows

GetCapabilities: Single decrypt possible

Linux

GetCapabilities: Single decrypt failed, secure path only

could be that the cause is that on linux its needed a higher protection level not available
if you are able try comment/remove the following line about SetSecureDecodeNeeded, and re-build isa on linux to see if there is some difference:

diff --git a/src/parser/SmoothTree.cpp b/src/parser/SmoothTree.cpp
index d113b4b5..6bf34cf0 100644
--- a/src/parser/SmoothTree.cpp
+++ b/src/parser/SmoothTree.cpp
@@ -95,7 +95,7 @@ bool adaptive::CSmoothTree::ParseManifest(const std::string& data)
   if (nodeProt)
   {
     period->SetEncryptionState(EncryptionState::ENCRYPTED);
-    period->SetSecureDecodeNeeded(true);
+    //period->SetSecureDecodeNeeded(true);

     pugi::xml_node nodeProtHead = nodeProt.child("ProtectionHeader");
     if (nodeProtHead)

@Paco8
Copy link
Author

Paco8 commented Mar 8, 2024

Unfortunately the latest version fails to build in my system (Ubuntu 22).
I can build the version for Kodi 19, but that version doesn't have that line.

@Paco8
Copy link
Author

Paco8 commented Mar 9, 2024

The stream also fails on a Smartphone with Android 12.
Log: https://paste.kodi.tv/uqewekahab.kodi

The stream does play in all operating systems if I use a manifest in mpd format.
manifest_mpd.txt

Any ideas?

@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Mar 10, 2024

there is a difference between the SmoothStreaming and the MPD
the SS provide the PlayReady DRM (A04F079-9840-4286-AB92-E65BE0885F95)
the MPD provide the Widevine DRM (edef8ba9-79d6-4ace-a3c8-27dcd51d21ed)

the MPD with Widevine its right that works
the SS PlayReady should work on android (we dont have support for PlayReady on other OS's), maybe this is the case to have a L1 device, or else try "disable secure" from ISA expert settings

i noticed that with the SS manifest we convert the protection to make work with widevine, this is probably the reason for the decrypting problem on linux, idk how can works on windows perhaps just a case idk...

maybe glennguy is able to give you a better answer

@CastagnaIT CastagnaIT closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
zuzia-dev added a commit to zuzia-dev/Kodi-Omega-addons-for-Linux that referenced this issue Sep 5, 2024
zuzia-dev added a commit to zuzia-dev/Kodi-Piers-addons-for-Linux that referenced this issue Sep 6, 2024
@zuzia-dev
Copy link

Windows

GetCapabilities: Single decrypt possible

Linux

GetCapabilities: Single decrypt failed, secure path only

could be that the cause is that on linux its needed a higher protection level not available if you are able try comment/remove the following line about SetSecureDecodeNeeded, and re-build isa on linux to see if there is some difference:

diff --git a/src/parser/SmoothTree.cpp b/src/parser/SmoothTree.cpp
index d113b4b5..6bf34cf0 100644
--- a/src/parser/SmoothTree.cpp
+++ b/src/parser/SmoothTree.cpp
@@ -95,7 +95,7 @@ bool adaptive::CSmoothTree::ParseManifest(const std::string& data)
   if (nodeProt)
   {
     period->SetEncryptionState(EncryptionState::ENCRYPTED);
-    period->SetSecureDecodeNeeded(true);
+    //period->SetSecureDecodeNeeded(true);

     pugi::xml_node nodeProtHead = nodeProt.child("ProtectionHeader");
     if (nodeProtHead)

@CastagnaIT
Can you add this patch to the official versions? I confirm that it works with another service.

@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Sep 6, 2024

yeah thanks i can do it
but storm caused power surge completely burned out my computer despite it is also line protected
currently i have no computer to develop... i need to buy a new computer next week
so you need to wait

@CastagnaIT CastagnaIT reopened this Sep 6, 2024
@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Sep 19, 2024

@Paco8 can you provide a new debug log when fails on linux? all logs you have previously linked are expired

@zuzia-dev the code change that i posted above, could works for android L1 only, this because SSD_SECURE_DECODER is not set on all others operative systems (like linux or windows)

I confirm that it works with another service.

so you tested on android or what?

@Paco8
Copy link
Author

Paco8 commented Sep 20, 2024

Manifest:
manifest_high.txt
Log:
https://paste.kodi.tv/uyejuxoqah.kodi

By that way, I realized that this manifest fails on Kodi 21 too but works on kodi 19:
manifest_medium.txt

Log kodi 21: https://paste.kodi.tv/yapapuqiya.kodi
Log kodi 19: https://paste.kodi.tv/evadalahec.kodi

@CastagnaIT
Copy link
Collaborator

@Paco8 you are using an old ISA version on Kodi 21 that has some known bugs
you must before update to last version 21.5.4 because has been fixed diffirent things,
after updated test again and make a new log if nothing changed

@Paco8
Copy link
Author

Paco8 commented Sep 21, 2024

After updating to 21.5.4 the problem with manifest_medium.txt is fixed.
This is the log for manifest_high.txt:
https://paste.kodi.tv/ixaqiceqaw.kodi

@CastagnaIT
Copy link
Collaborator

the "manifest_high" is different, there is a "bad" status of widevine cdm,
this line should have status 0 and syscode 0, but:
OnSessionKeysChange: Sessionkey DBBA3BCE837CB7B2C7EC9AB957271332 status: 3 syscode: 49

the session key status 3 is kOutputRestricted
this means that the license has an HDCP requirement that dont met the current display, and the stream usually cant be played, in some cases you can try fallback to SD, but SD streams must have a different key, and i suspect that this is not the case

now i have no idea how the website play this movie on the linux browser, if it can be played on linux browser should be debugged the browser to try understand if something could be done, there is no way for us investigate by looking at logs

however here we are OT on this issue, the problem where the issue has been opened is different

@CastagnaIT CastagnaIT added the Resolution: Fixed issue was resolved by a code change label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Fixed issue was resolved by a code change
Projects
None yet
Development

No branches or pull requests

3 participants