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

[Android7] No audio in videwine content #775

Closed
michael112 opened this issue Aug 16, 2021 · 26 comments
Closed

[Android7] No audio in videwine content #775

michael112 opened this issue Aug 16, 2021 · 26 comments
Labels
Component: Audio Component: MPEG-DASH Issue Cleanup: Ask Reporter Ask the reporter if this issue is still occurring. Resolution: External a real bug, but not in the code of this repo

Comments

@michael112
Copy link

Hi,
since several months I have severe problem with playing DRM-encrypted materials - the video is playing properly, but there is no sound.
Usually I use Kodi 18.9 with latest InputStream Adaptive and InputStream Helper, but I tested this also with Kodi 19 - same problem.
The problem occur on two devices both operating Android 7 (system updates installed, which does not help).
I also tested this on another device with Android 5 - works fine, also on PC with Windows 10 works fine as well.
An excerpt of Kodi log which shows an error:
https://pastebin.com/MRumft7L (especially look at 3 last lines!)
May anyone help?

@matthuisman
Copy link
Contributor

matthuisman commented Aug 17, 2021

Please upload a copy of the manifest and a full debug log.

I suspect this is a duplicate of my issue here
#686

Oh wait, you say audio does work on Android 5 and windows 10 so maybe not the same issue

@michael112
Copy link
Author

@matthuisman Please give me a little bit of time, I need to make a test with an example material on my various devices.

@mtr81
Copy link

mtr81 commented Oct 3, 2021

The same problem:
Manifest -> manifest.txt
Full debug log ->kodi.log.txt

@glennguy
Copy link
Contributor

glennguy commented Oct 4, 2021

@mtr81 thanks for the logs! Looks to be the same issue as reported in OP.

Don't have time just right now to dive in but this is what the concern is:

2021-10-03 19:34:19.212 T:10008   DEBUG <general>: AddOnLog: inputstream.adaptive: GetStream(1006)
2021-10-03 19:34:19.212 T:10008   DEBUG <general>: AddOnLog: inputstream.adaptive: GetStream(1006): initalizing crypto session

1006 being the audio stream, audio streams aren't meant to use a secure path.... will have to find out why this is getting set this way.

Something to note (for me) is that all streams (audio and video) are using the same PSSH/KID

@matthuisman
Copy link
Contributor

@glennguy
another thing to note - that manifest above your last comment only has a single adaptation set which has contentType="video"

@glennguy
Copy link
Contributor

glennguy commented Oct 4, 2021

Check again, the formatting is really messed up but there looks like one adp per representation

@matthuisman
Copy link
Contributor

oops! my text editor just highlighted the top and bottom and not the rest so looked like just 1. i should have done a search.

@mtr81
Copy link

mtr81 commented Oct 4, 2021

Same device and other manifest - same result:
manifest: https://npobvn-prd.cdn.eurovisioncdn.net/live/npo/u/npo/drm/dash_cenc/bvn/0/0/0/bvn.isml/stream.mpd
kodi log ->kodi.log.txt

@michael112
Copy link
Author

michael112 commented Feb 19, 2022

Hey,
very sorry for my big delay,

Manifest: manifest.mpd.txt
Log: log.txt

By the way, I got a bit new knowledge. I suspect this:
2022-02-19 20:19:50.238 T:7143 ERROR: CDVDAudioCodecAndroidMediaCodec::ExceptionCheck: configure
which probably come from: https://github.com/xbmc/xbmc/blob/master/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp#L44
which describes a Java exception as I read on the internet.
However, this gives me absolutely no information, what is this exception, no possible cause.
If I'd like to edit this code in order to print more info about this exception, I would have to recompile all the Kodi (!).

Also, I would like to mention, this very stream plays well on the official provider application on the same device (so, the phone CAN decode DRM from audio stream) - but I prefer Kodi because it's one application combining all the streaming platforms I subscribe (consuming less space on the phone), also in Kodi I can combine TV channels from various streaming providers on one list in the IPTV manager.

Maybe together we could find out more about that?

@glennguy
Copy link
Contributor

The exception is being printed - to Android log: https://github.com/xbmc/xbmc/blob/6586a6c535b72896e00733f25fde93980d5f0cca/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.cpp#L536-L538

You should be able to see in logcat what the exception is, if you could get that and post back here it would be great, hopefully is easy enough to do on your TV.

Thankfully this stream isn't geolocked, I've tested on my pixel3/android 12 and it plays fine with sound.

@michael112
Copy link
Author

How to get the Android log?

@glennguy
Copy link
Contributor

You need to do similar to this. Also will need adb installed on whatever device you're using to remote into the tv. Like with this link I found below, just search 'how to install adb on x'

https://stackoverflow.com/questions/39834242/sony-bravia-android-tv-how-to-enable-retrieve-adb-logcat-logs

@michael112
Copy link
Author

michael112 commented Feb 20, 2022

My device is just a phone, not a smart tv.

Wait a few minutes (maybe little more than few). Probably I've found a solution (to get Android log).
I've downloaded Android Studio (portable) and the wizard after first opening tutored me to download Android SDK.
Also, i've found a tutorial - even in my native language(!) ;) which has guided me step-by-step to set the connection between my computer and phone. ADB was included in Android SDK.

According to what I've read all I need to get the log is to type adb logcat in the console when it is set in the folder {sdk-directory}/platform-tools.

@michael112
Copy link
Author

michael112 commented Feb 20, 2022

That may probably be this: android-log.txt
(I need to be careful not to publish something private in the log.)

02-20 13:01:57.951 14193 15090 W System.err: android.media.MediaCodec$CodecException: Error 0x80000002
02-20 13:01:57.957 14193 15090 W System.err: 	at android.media.MediaCodec.native_configure(Native Method)
02-20 13:01:57.957 14193 15090 W System.err: 	at android.media.MediaCodec.configure(MediaCodec.java:1895)

@glennguy
Copy link
Contributor

I'd say the problem is lack of support in your OS, can't be sure but I'm nearly 100% sure that it isn't to do with this add-on sorry

@kszaq
Copy link
Contributor

kszaq commented Feb 22, 2022

@michael112 You can try to enable "Don't use secure decoder if possible" in Inputstream Adaptive settings to see if it helps.

@CastagnaIT
Copy link
Collaborator

from the logcat seem we are providing an audio stream of 0 channels in the configuration

02-20 13:01:57.914   251  1015 D MtkOmxRawDec: RAW mRawParamForInput.nChannels is 0
02-20 13:01:57.914   251  1015 E MtkOmxRawDec: input parameters is invailed !
02-20 13:01:57.920 14193 15119 E ACodec  : unsupported PCM port: 0 channels interleaved, 16-bit
02-20 13:01:57.920 14193 15119 E ACodec  : [OMX.MTK.AUDIO.DECODER.RAW] configureCodec returning error 80000002

perhaps in the android versions > 7 are able to ignore the wrong value and the problem is hidden
maybe we should try before check if audio parameters are correctly parsed from the mpd

@michael112 are you still around here? can you try also with kodi v20, just to be sure that the problem still exists?

@CastagnaIT CastagnaIT added the Issue Cleanup: Ask Reporter Ask the reporter if this issue is still occurring. label Feb 9, 2023
@michael112
Copy link
Author

michael112 commented Feb 15, 2023

@michael112 are you still around here? can you try also with kodi v20, just to be sure that the problem still exists?

Hey. I've just tried with K20 on that tablet and audio is still not working.

(Also, because of tablet touch interface, I've wrongly closed the issue and then reopened. The problem still occurs.)

If you need a debug log, please wait a bit. It's 3 at night in my time zone.

@CastagnaIT
Copy link
Collaborator

@joseluismarti can you give some hints or (maybe) a kind of solution to this android problem?

looks like we are sending 0 channels to android audio configuration from kodi core (see comments above), is possible?
@michael112 affirm that this problem happens only to android v7 (android 5 works good)

i have no idea what we could try to do

@CastagnaIT
Copy link
Collaborator

@michael112 i found something but im not sure if can help for your case

try install this InputStream test build to kodi 20:
https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1145/1/artifacts
and let me know

@joseluismarti
Copy link
Contributor

Is it possible to build inputstream.adaptive for x86 ABI to test on an Android 7 x86 image?
I've tried to reproduce the issue with an arm image but it's too slow

@CastagnaIT
Copy link
Collaborator

maybe this old script could give you some hint https://github.com/CastagnaIT/inputstream.adaptive/blob/Matrix/build_scripts/build-isa.sh

@CastagnaIT
Copy link
Collaborator

hi @michael112 i dont know if you have time
but if so please do a last test with the test build for Kodi 20
see my comment above where there is the link for download it #775 (comment) might be enough to fix the problem

@CastagnaIT CastagnaIT closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2023
@CastagnaIT CastagnaIT added the Resolution: External a real bug, but not in the code of this repo label Jun 26, 2023
@CastagnaIT
Copy link
Collaborator

just to inform that in the next Kodi 20 Nexus and 21 Omega releases has been add a fix
that potentially can fix also your audio problems

@mtr81
Copy link

mtr81 commented Jul 15, 2023

I confirm - works fine on K20.2 + IS 20.3.9. Thanks!

@michael112
Copy link
Author

Thanks, working also for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Audio Component: MPEG-DASH Issue Cleanup: Ask Reporter Ask the reporter if this issue is still occurring. Resolution: External a real bug, but not in the code of this repo
Projects
None yet
Development

No branches or pull requests

7 participants