ksvc / KSYMediaPlayer_Android

金山云Android播放SDK(KSYUN Live Streaming player SDK),支持RTMP HTTP-FLV HLS 协议(supporting RTMP HTTP-FLV HLS protocol),直播延时2-3秒(Living delay 2 or 3 seconds),supporting jitter control,software&hardware decode
http://v.ksyun.com/
Apache License 2.0
856 stars 247 forks source link

硬解的问题求助 #310

Open dhf2017 opened 5 years ago

dhf2017 commented 5 years ago

播放RTMP格式的直播流,视频是H264 音频为aac。手机为华为P20,还有海美迪的Q16 Plus 装别的播放器如MXPlayer,播放源视频都能正常硬解接码。 在使用金山云SDK时,设置了HardDecode硬解方式时, if (KSYHardwareDecodeWhiteList.getInstance().getCurrentStatus() == KSYHardwareDecodeWhiteList.KSY_STATUS_OK) { if (KSYHardwareDecodeWhiteList.getInstance().supportHardwareDecodeH264() || KSYHardwareDecodeWhiteList.getInstance().supportHardwareDecodeH265()) { Log.i("KSYHardware", "DecodeWhiteList supportHardwareDecode"); Toast.makeText(this, "KSYHardwareDecodeWhiteList supportHardwareDecode", Toast.LENGTH_SHORT).show(); FloatingPlayer.getInstance().getKSYTextureView().setDecodeMode(KSYMediaPlayer.KSYDecodeMode.KSY_DECODE_MODE_AUTO); } } 这里也成功设置了硬解或者自动选择方式,但是实际播放后出现接码失败变成软解了。

2019-08-16 17:19:13.469 5122-5122/com.ksyun.player.demo I/buffer: 视频加载开始了 2019-08-16 17:19:13.471 5122-5122/com.ksyun.player.demo I/KSYHardware: DecodeWhiteList KSY_STATUS_OK 2019-08-16 17:19:13.479 5122-5122/com.ksyun.player.demo I/KSYHardware: DecodeWhiteList supportHardwareDecode 2019-08-16 17:19:13.489 5122-5122/com.ksyun.player.demo E/libc: Access denied finding property "ro.serialno" 2019-08-16 17:19:13.493 5122-5122/com.ksyun.player.demo D/ActivityThread: add activity client record, r= ActivityRecord{fad9fb7 token=android.os.BinderProxy@e91a33d {com.ksyun.player.demo/com.ksyun.player.now.activity.LiveDisplayActivity}} token= android.os.BinderProxy@e91a33d 2019-08-16 17:19:13.495 5122-5122/com.ksyun.player.demo D/ZrHung.AppEyeUiProbe: notify runnable to start. 2019-08-16 17:19:13.495 5122-5122/com.ksyun.player.demo D/CrashReport: >>> com.ksyun.player.now.activity.LiveDisplayActivity onResumed <<< 2019-08-16 17:19:13.496 5122-5122/com.ksyun.player.demo I/CrashReport-Native: Set native info: isAppForeground(true) 2019-08-16 17:19:13.505 5122-5187/com.ksyun.player.demo D/OpenGLRenderer: HWUI Binary is enabled 2019-08-16 17:19:13.505 5122-5187/com.ksyun.player.demo D/OpenGLRenderer: disableOutlineDraw is true 2019-08-16 17:19:13.514 5122-5187/com.ksyun.player.demo D/OpenGLRenderer: HWUI Binary is enabled 2019-08-16 17:19:13.514 5122-5187/com.ksyun.player.demo D/OpenGLRenderer: disableOutlineDraw is true 2019-08-16 17:19:13.524 5122-5187/com.ksyun.player.demo D/OpenGLRenderer: HWUI Binary is enabled 2019-08-16 17:19:13.524 5122-5187/com.ksyun.player.demo D/OpenGLRenderer: disableOutlineDraw is true 2019-08-16 17:19:13.540 5122-5556/com.ksyun.player.demo I/HiTouch_HiTouchSensor: enabledInPad = false,isPcCastMode = false 2019-08-16 17:19:13.540 5122-5556/com.ksyun.player.demo D/HiTouch_PressGestureDetector: onAttached, package=com.ksyun.player.demo, windowType=1, mHiTouchRestricted=false 2019-08-16 17:19:13.557 5122-5187/com.ksyun.player.demo D/mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface , EGLBoolean) returns 0x3000 2019-08-16 17:19:13.565 5122-5187/com.ksyun.player.demo D/mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface , EGLBoolean) returns 0x3000 2019-08-16 17:19:13.566 5122-5187/com.ksyun.player.demo D/OpenGLRenderer: HWUI Binary is enabled 2019-08-16 17:19:13.566 5122-5187/com.ksyun.player.demo D/OpenGLRenderer: disableOutlineDraw is true 2019-08-16 17:19:13.568 5122-5122/com.ksyun.player.demo W/InputMethodManager: startInputReason = 1 2019-08-16 17:19:14.184 5122-5554/com.ksyun.player.demo I/KSYMediaPlayer: SDL_Android_AudioTrack: CHANNEL_OUT_STEREO 2019-08-16 17:19:14.184 5122-5554/com.ksyun.player.demo I/KSYMediaPlayer: SDL_Android_AudioTrack: ENCODING_PCM_16BIT 2019-08-16 17:19:14.185 5122-5554/com.ksyun.player.demo E/AudioTrack: StreamType not music do not upload bigdata 2019-08-16 17:19:14.190 5122-5554/com.ksyun.player.demo I/KSYMediaPlayer: [zzy][a]SDL_Android_AudioTrack_new_from_spec: audio track buffer size:14176 2019-08-16 17:19:14.190 5122-5554/com.ksyun.player.demo I/KSYMediaPlayer: SDL_Android_AudioTrack_new_from_spec: init volume as 1.000000/(1.000000,0.000000) 2019-08-16 17:19:14.190 5122-5554/com.ksyun.player.demo I/PlayerBase: isRestricted: falseLeftvolume: 1.0 Rightvolume: 1.0mPanMultiplierL: 1.0mPanMultiplierR: 1.0 2019-08-16 17:19:14.190 5122-5554/com.ksyun.player.demo I/KSYMediaPlayer: [zzy][a]aout_open_audio_n, buffer_size:14176 2019-08-16 17:19:14.190 5122-5554/com.ksyun.player.demo I/KSYMediaPlayer: audio_session_id = 12473 2019-08-16 17:19:14.190 5122-5578/com.ksyun.player.demo V/PlayerBase: baseStart() piid=10047 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo D/KSYMediaPlayer: ffpipenode_create_video_decoder_from_android_mediacodec() 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo I/KSYMediaPlayer: ffpipenode_create_video_decoder_from_android_mediacodec: MediaCodec: H264_MAIN: enabled 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo I/KSYMediaPlayer: AMediaFormat: video/avc, 1920x1080 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo D/KSYMediaPlayer: SDL_AMediaFormatJava_createVideoFormat 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: 00000001 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: 674d4028 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: 95a01e00 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: 89f97011 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: 00000303 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: e80000c3 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: 50e00000 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: 1c9c3000 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: 02625a2e 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: f2e0fa55 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: 00000001 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: csd-0[48]: 68ee3c80 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo I/KSYMediaPlayer: amc: rotate notify: 0 2019-08-16 17:19:14.195 5122-5554/com.ksyun.player.demo D/KSYMediaPlayer: ffpipeline_select_mediacodec_l 2019-08-16 17:19:14.196 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: mediacodec_select_callback: onSelectCodec failed 2019-08-16 17:19:14.196 5122-5554/com.ksyun.player.demo E/KSYMediaPlayer: amc: no suitable codec 2019-08-16 17:19:14.201 5122-5578/com.ksyun.player.demo D/android.media.AudioTrack: [HSM] AudioTrace play() uid: 10385, pid: 5122 2019-08-16 17:19:14.202 5122-5578/com.ksyun.player.demo I/PlayerBase: isRestricted: falseLeftvolume: 1.0 Rightvolume: 1.0mPanMultiplierL: 1.0mPanMultiplierR: 1.0 2019-08-16 17:19:14.204 5122-5122/com.ksyun.player.demo D/com.ksyun.media.player.KSYMediaPlayer: KSYMediaPlayer Use Software Decode and SDK Version is:2.2.2, BufferTimeMax:2.0 2019-08-16 17:19:14.210 5122-5122/com.ksyun.player.demo I/System.out: 460019106202857 请问这是什么原因,怎么解决硬解的问题呢?机型肯定是支持该视频的硬解功能的