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

Stream playing under Linux and Windows but not AndroidTV #1511

Closed
1 of 7 tasks
nirvana-7777 opened this issue Mar 20, 2024 · 11 comments · Fixed by xbmc/xbmc#24911 or #1515
Closed
1 of 7 tasks

Stream playing under Linux and Windows but not AndroidTV #1511

nirvana-7777 opened this issue Mar 20, 2024 · 11 comments · Fixed by xbmc/xbmc#24911 or #1515

Comments

@nirvana-7777
Copy link

Bug report

Describe the bug

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

The leading German Streaming Provider is putting more customers on their 2.0 platform. Unfortunately one video addon and a PVR addon have been programmed but both show the same behaviour with inputstream.adaptive. Streams are being played under Windows and Linux but not under AndroidTV. Kodi seems to do something but the screen remains black - no audio as well.
As said under Linux and Windows the streams do not show any issues at all.

Expected Behavior

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

Streams should also work under AndroidTV. Android itself is untested

Actual Behavior

Once a stream is selected Kodi tries to play it - there is no error message - but the screen remains black.

Possible Fix

No idea

To Reproduce

Steps to reproduce the behavior:

  1. Start a stream of the German Streaming Provider under AndroidTV

Debuglog

The debuglog can be found here:
https://paste.kodi.tv/ecidudaxoc.kodi

MPD/M3U8s/ISM

An example or copy of a manifest (or manifests for HLS - master and variants) can be found here:
https://svc45.main.sl.t-online.de/bpk-tv/das_erste_hd/DASH/index.mpd

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:

  • Kodi version: 21 RC

  • inputstream.adaptive version: 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.

@sunsettrack4
Copy link

error <general>: OpenStream: Codec id 27 require extradata. warning <general>: OpenStream - Unsupported stream 1001. Stream disabled.
The video stream always gets disabled - @CastagnaIT Do you know why that stream requires extra data on Android OS?

@CastagnaIT
Copy link
Collaborator

i tried download the init video file
the mp4 box show SPS/PPS fields empty, in theory this should be the cause of no extradata
immagine

but you affirm that this stream works on Windows and Linux, so this confuses me
so i dont know exactly what to think

@nirvana-7777
Copy link
Author

nirvana-7777 commented Mar 26, 2024

Yes, personally I can speak for Linux. The respective debug.log of inputstream.adaptive while playing the stream under Linux:

Debug Log

@CastagnaIT
Copy link
Collaborator

has been cutoff all kodi core debug log from that log

@nirvana-7777
Copy link
Author

True. Now included:

Log

@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Mar 27, 2024

hmm i have not clear idea on how kodi core VP works
also comparing logs apparently seem that VP use different code paths between linux/android

its clear that stuck here
https://github.com/xbmc/xbmc/blob/e70f0d83f3ae5e5026cf6b6402c8d7e05662bc8a/xbmc/cores/VideoPlayer/VideoPlayerVideo.cpp#L112-L123

i found this explanation on the web

Amendment 2 of ISO/IEC 14496-15 (AVC file format) is defining a new structure for fragmented MP4 called "avc3". The principal difference between AVC1 and AVC3 is the location of the codec initialisation data (e.g. SPS, PPS). In AVC1 this data is placed in the initial MOOV box (moov.trak.mdia.minf.stbl.stsd.avc1) but in AVC3 this data goes in the first sample of every fragment (i.e. the first sample in each mdat box). The principal reason for avc3 is to make it easier for client implementations, because it removes the requirement to insert the SPS+PPS in to the decoder pipeline every time there is a representation change

that can explain why there is no SPS PPS on the init data
and so my MP4 init data screenshot above show right things

one possibility to test should be try change on Kodi core VP (linked above), the line:
hint.codec == AV_CODEC_ID_H264 ||
with
(hint.codec == AV_CODEC_ID_H264 && hint.codec_tag != MKTAG('a','v','c','3')) ||

and on ISA side

if (CODEC::Contains(codecs, CODEC::FOURCC_AVC_, codecStr) ||
CODEC::Contains(codecs, CODEC::FOURCC_H264, codecStr))
stream.m_info.SetCodecName(CODEC::NAME_H264);

on H264 condition add the missing fourcc
stream.m_info.SetCodecFourCC(CODEC::MakeFourCC(...));

OFC is needed build Kodi and also ISA with mentioned changes in order to test

PS: or try remove only the line on kodi VP just to do a fast test to see what happens

@CastagnaIT
Copy link
Collaborator

i builded kodi apk by removing forced extradata requirement
let me know what happens

http://mirrors.kodi.tv/test-builds/android/arm/kodi-20240328-56ded866-extradata_avc3-armeabi-v7a.apk
http://mirrors.kodi.tv/test-builds/android/arm64-v8a/kodi-20240328-56ded866-extradata_avc3-arm64-v8a.apk

@nirvana-7777
Copy link
Author

Wow! Thank you. Yes, I can confirm that this Kodi Version plays the streams.

@CastagnaIT
Copy link
Collaborator

i found a sample stream avc3 but since its without DRM play without problems on android so i still cant test by myself

i will prepare the changes for kodi and ISA
when i will have both done, i will prepare a new test for you to have a confirmation that changes works

@CastagnaIT
Copy link
Collaborator

@nirvana-7777
Copy link
Author

Tested and confirmed working.

First did only the Kodi update. Does not work. Also not expected to work.
Then installed ISA from above. Works.

From my side green light. Please go ahead.
Thank you very much again for your efforts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants