[libbluray-devel] JRE for Android part 3
Vitor Dall'Acqua
veggav at gmail.com
Sun Jan 31 15:22:38 UTC 2021
I notice the extradata byte missing but that's not the case, I believe,
because
1. it's a different file (couldn't get Kodi to load the playlist for the
background menu video)
2. I see that this value changes from video to video.
Now that I got it to actually request the configure method to the decoder
this is the output from the logcat:
01-31 12:52:05.099 2467 2814 I OMXClient: IOmx service obtained
01-31 12:52:05.099 19053 19062 I OMXMaster:
makeComponentInstance(OMX.Nvidia.h265.encoder) in omx at 1.0-service process
01-31 12:52:05.133 3365 3365 D SurfaceFlinger: duplicate layer name:
changing SurfaceView - org.xbmc.kodi19DV/org.xbmc.kodi19DV.Main to
SurfaceView - org.xbmc.kodi19DV/org.xbmc.kodi19DV.Main#1
01-31 12:52:05.134 3365 3365 D SurfaceFlinger: duplicate layer name:
changing Background for -SurfaceView -
org.xbmc.kodi19DV/org.xbmc.kodi19DV.Main to Background for -SurfaceView -
org.xbmc.kodi19DV/org.xbmc.kodi19DV.Main#1
01-31 12:52:05.167 2467 2467 D XBMCVideoPlayView: Created
01-31 12:52:05.167 2467 2467 D XBMCVideoPlayView: Changed, format:-2,
width:1920, height:1080
01-31 12:52:05.168 2467 2654 D Kodi : 2021-01-31 12:52:05.168 T:2654
DEBUG <general>: CDVDVideoCodecAndroidMediaCodec::InjectExtraData
01-31 12:52:05.168 2467 2654 D XBMCVideoPlayView: getSurface() =
Surface(name=null)/@0x2c84213
01-31 12:52:05.171 2467 2813 D SurfaceUtils: connecting to surface
0x294e2f9010, reason connectToSurface
01-31 12:52:05.171 2467 2813 I MediaCodec: [OMX.Nvidia.h265.encoder]
setting surface generation to 2526213
01-31 12:52:05.171 2467 2813 D SurfaceUtils: disconnecting from surface
0x294e2f9010, reason connectToSurface(reconnect)
01-31 12:52:05.172 2467 2813 D SurfaceUtils: connecting to surface
0x294e2f9010, reason connectToSurface(reconnect)
01-31 12:52:05.172 19053 19062 E OMXNodeInstance:
setParameter(0x46927a80:Nvidia.h265.encoder,
ParamStandardComponentRole(0x1000017)) ERROR: UnsupportedSetting(0x80001019)
01-31 12:52:05.173 2467 2814 W ACodec : [OMX.Nvidia.h265.encoder] Failed
to set standard component role 'video_decoder.hevc'.
01-31 12:52:05.173 2467 2814 E ACodec : [OMX.Nvidia.h265.encoder]
configureCodec returning error -1010
01-31 12:52:05.173 2467 2814 E ACodec : signalError(omxError 0x80001001,
internalError -1010)
01-31 12:52:05.173 2467 2813 E MediaCodec: Codec reported err 0xfffffc0e,
actionCode 0, while in state 3
01-31 12:52:05.173 2467 2813 D SurfaceUtils: disconnecting from surface
0x294e2f9010, reason disconnectFromSurface
01-31 12:52:05.173 2467 2654 E MediaCodec: configure failed with err
0xfffffc0e, resetting...
01-31 12:52:05.176 2467 2814 I OMXClient: IOmx service obtained
01-31 12:52:05.176 19053 19062 I OMXMaster:
makeComponentInstance(OMX.Nvidia.h265.encoder) in omx at 1.0-service process
01-31 12:52:05.178 2467 2654 E Kodi : 2021-01-31 12:52:05.178 T:2654
ERROR <general>: CDVDVideoCodecAndroidMediaCodec::ConfigureMediaCodec:
configure failed
android works as a blackbox so send to the decoder, and the decoder will
play.
On Sun, Jan 31, 2021 at 12:14 PM Petri Hintukainen <
phintuka at users.sourceforge.net> wrote:
> su, 2021-01-31 kello 11:06 -0300, Vitor Dall'Acqua kirjoitti:
> > Already tested your latest commits, Petri. Much faster and the logs
> > are much cleaner. Thank you.
>
> I wrote those changes long time ago, but I didn't notice any measurable
> speedup (not even when playing .iso over SMB). I guess the difference
> is you're not using mounted filesystem, so you don't have any OS level
> caching.
>
> > I'm still working my way with the hardware rendering.
> > Sadly I can't debug this on windows with visual studio,
> > bitstreamconverter isn't used neither androidmediacodec obviously.
> > So, I'm back at changing things with a notepad, compiling and
> > testing.
> >
> >
> > Here is a log of how the m2ts stream played from a playlist should
> > work:
> > 2021-01-31 10:45:20.913 T:19521 DEBUG <general>:
> > CDVDVideoCodecAndroidMediaCodec::Open hints: Width 3840 x Height
> > 2160, Fpsrate 24000 / Fpsscale 1001, CodecID 173, Level 153, Profile
> > 2, PTS_invalid 0, Tag 1447904328, Extradata-Size: 115
> > 2021-01-31 10:45:20.913 T:19521 INFO <general>:
> > CBitstreamConverter::Open Invalid hvcC
> > 2021-01-31 10:45:20.913 T:19521 INFO <general>:
> > CDVDVideoCodecAndroidMediaCodec::Open Testing
> > codec:OMX.Nvidia.mp2.decoder
> > 2021-01-31 10:45:20.917 T:13323 INFO <general>: [WHITELIST]
> > Searching the whitelist for: width: 3840, height: 2160, fps: 23.976,
> > 3D: false
> > 2021-01-31 10:45:20.917 T:13323 DEBUG <general>: [WHITELIST] Using
> > the default whitelist because the user whitelist is empty
> > 2021-01-31 10:45:20.919 T:13323 DEBUG <general>: [WHITELIST]
> > Searching for an exact resolution with an exact refresh rate
> > 2021-01-31 10:45:20.920 T:13323 DEBUG <general>: [WHITELIST]
> > Matched an exact resolution with an exact refresh rate 3840x2160 @
> > 23.976025 - Full Screen (27)
> > 2021-01-31 10:45:20.920 T:13323 INFO <general>: Display resolution
> > ADJUST : 3840x2160 @ 23.976025 - Full Screen (27) (weight: 0.000)
> > 2021-01-31 10:45:20.924 T:19521 INFO <general>:
> > CDVDVideoCodecAndroidMediaCodec::Open Testing
> > codec:OMX.Nvidia.wma.decoder
> > 2021-01-31 10:45:20.924 T:19521 INFO <general>:
> > CDVDVideoCodecAndroidMediaCodec::Open Testing
> > codec:OMX.Nvidia.h264.decode
> > 2021-01-31 10:45:20.925 T:19521 INFO <general>:
> > CDVDVideoCodecAndroidMediaCodec::Open Testing
> > codec:OMX.Nvidia.DOVI.decode
> > 2021-01-31 10:45:20.925 T:19521 INFO <general>:
> > CDVDVideoCodecAndroidMediaCodec::Open Testing
> > codec:OMX.Nvidia.h263.decode
> > 2021-01-31 10:45:20.926 T:19521 INFO <general>:
> > CDVDVideoCodecAndroidMediaCodec::Open Testing
> > codec:OMX.Nvidia.h265.decode
> > 2021-01-31 10:45:20.927 T:13332 DEBUG <general>: Could not acquire
> > timestamp
> > 2021-01-31 10:45:21.073 T:19521 DEBUG <general>:
> > CDVDVideoCodecAndroidMediaCodec::Open
> > m_codecname(OMX.Nvidia.h265.decode), colorFormat(2135033992)
> > 2021-01-31 10:45:21.073 T:19521 DEBUG <general>:
> > CDVDVideoCodecAndroidMediaCodec::Open
> > m_codecname(OMX.Nvidia.h265.decode), colorFormat(21)
> > 2021-01-31 10:45:21.163 T:19521 DEBUG <general>:
> > CDVDVideoCodecAndroidMediaCodec::InjectExtraData
> > 2021-01-31 10:45:21.220 T:19521 DEBUG <general>:
> > CDVDVideoCodecAndroidMediaCodec:: width(3840), height(2160),
> > stride(0), slice-height(0), color-format(0)
> > 2021-01-31 10:45:21.220 T:19521 DEBUG <general>:
> > CDVDVideoCodecAndroidMediaCodec:: crop-left(0), crop-top(0), crop-
> > right(3839), crop-bottom(2159)
> > 2021-01-31 10:45:21.220 T:19521 DEBUG <general>:
> > CDVDVideoCodecAndroidMediaCodec:: Multi-Surface Rendering
> > 2021-01-31 10:45:21.220 T:19521 INFO <general>:
> > CDVDVideoCodecAndroidMediaCodec:: Open Android MediaCodec
> > OMX.Nvidia.h265.decode
> > 2021-01-31 10:45:21.220 T:19521 DEBUG <general>:
> > CDVDVideoCodecAndroidMediaCodec::UpdateFpsDuration fpsRate:24000
> > fpsscale:1001, fpsDur:41708
> > 2021-01-31 10:45:21.221 T:19521 DEBUG <general>:
> > CVideoPlayerVideo::OpenStream - open stream with codec id: 173
> >
> > and this is how it works during a menu:
> >
> >
> > 2021-01-31 10:33:58.032 T:13409 INFO <general>:
> > ffmpeg[0x2965bbd040X]: Duration: N/A, start: 600.000000, bitrate:
> > N/A
> > 2021-01-31 10:33:58.032 T:13409 INFO <general>:
> > ffmpeg[0x2965bbd040X]: Program 1
> > 2021-01-31 10:33:58.033 T:13409 INFO <general>:
> > ffmpeg[0x2965bbd040X]: Stream #0:0[0x1011]: Video: hevc (Main 10)
> > (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084),
> > 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98
> > tbc
> > 2021-01-31 10:33:58.033 T:13409 DEBUG <general>:
> > CDVDDemuxFFmpeg::AddStream ID: 0
> > 2021-01-31 10:33:58.033 T:13409 INFO <general>: Opening stream: 0
> > source: 256
> > 2021-01-31 10:33:58.033 T:13409 INFO <general>: [WHITELIST]
> > Searching the whitelist for: width: 3840, height: 2160, fps: 23.976,
> > 3D: false
> > 2021-01-31 10:33:58.033 T:13409 DEBUG <general>: [WHITELIST] Using
> > the default whitelist because the user whitelist is empty
> > 2021-01-31 10:33:58.034 T:13409 DEBUG <general>: [WHITELIST]
> > Searching for an exact resolution with an exact refresh rate
> > 2021-01-31 10:33:58.034 T:13409 DEBUG <general>: [WHITELIST]
> > Matched an exact resolution with an exact refresh rate 3840x2160 @
> > 23.976025 - Full Screen (27)
> > 2021-01-31 10:33:58.034 T:13409 INFO <general>: Display resolution
> > ADJUST : 3840x2160 @ 23.976025 - Full Screen (27) (weight: 0.000)
> > 2021-01-31 10:33:58.069 T:13409 INFO <general>: Creating video
> > codec with codec id: 173
> > 2021-01-31 10:33:58.071 T:13409 DEBUG <general>:
> > CDVDVideoCodecAndroidMediaCodec::Open hints: Width 3840 x Height
> > 2160, Fpsrate 24000 / Fpsscale 1001, CodecID 173, Level 153, Profile
> > 2, PTS_invalid 0, Tag 1447904328, Extradata-Size: 114
> > 2021-01-31 10:33:58.071 T:13409 INFO <general>:
> > CBitstreamConverter::Open Invalid hvcC
> > 2021-01-31 10:33:58.073 T:13409 ERROR <general>:
> > CDVDVideoCodecAndroidMediaCodec:: Failed to create Android MediaCodec
> > 2021-01-31 10:33:58.074 T:13409 INFO <general>:
> > CDVDVideoCodecFFmpeg::Open() Using codec: HEVC (High Efficiency Video
> > Coding)
> > 2021-01-31 10:33:58.074 T:13409 DEBUG <general>:
> > CDVDVideoCodecFFmpeg - Updated codec: ff-hevc
> > 2021-01-31 10:33:58.074 T:13409 DEBUG <general>:
> > CVideoPlayerVideo::OpenStream - open stream with codec id: 173
> >
> > It's not the exact same stream but you get the idea.
> > It is failing to use the nvidia decoder: OMX.Nvidia.h265.decode and
> > using ffmpeg as software rendering.
> >
> >
> >
> https://github.com/xbmc/xbmc/blob/c01b0f5778c7397325e29238a861d8dc62289e2b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
> >
> > removing the goto fail results in crash.
> > basically it is failing to get m_codec.
> >
> > But as you can see the invalid hvcC isn't the problem. It must be
> > something in this decoder instructions.
>
> In some of the older logs it looks like codec extradata is missing when
> opening the codec ?
> And, in this log, there is one byte difference in extradata size.
>
> Maybe you could log extradata size and few first bytes in
> InjectExtradata() ?
>
>
> _______________________________________________
> libbluray-devel mailing list
> libbluray-devel at videolan.org
> https://mailman.videolan.org/listinfo/libbluray-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libbluray-devel/attachments/20210131/4dc6e855/attachment-0001.html>
More information about the libbluray-devel
mailing list