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

播放未缓存完的缓存视频出现的问题 #3118

Closed
aglszz opened this issue Jan 27, 2021 · 10 comments
Closed

播放未缓存完的缓存视频出现的问题 #3118

aglszz opened this issue Jan 27, 2021 · 10 comments

Comments

@aglszz
Copy link

aglszz commented Jan 27, 2021

(!!!!请务必务必按照issue模板,修改 后提交问题!!!!,不按模板提Isuue删除处理)

(ps 首页问题集锦和demo请先了解一下!)

提问前建议先看看: https://mp.weixin.qq.com/s/HjSdmAsHuvixCH_EWdvk3Q

问题描述:

更新到最新版本 播放缓存文件还是不行 可以到视频窗口 只显示 播放按钮 点击播放按钮 闪屏一下加载界面又回到 显示播放按钮的界面 一直是黑屏

问题机型/系统:

3288A

GSY依赖版本

implementation 'com.shuyu:gsyVideoPlayer:8.0.0'

Demo中的复现步骤

问题代码:(如果有)
videoPlayer = findViewById(R.id.video_player);
CacheFactory.setCacheManager(ProxyCacheManager.class);
videoPlayer.setUp(url, true, new File(Constants.VIDEO_PATH),title);
//增加封面
ImageView imageView = new ImageView(this);
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
Glide.with(imageView.getContext()).load(cover).into(imageView);
videoPlayer.setThumbImageView(imageView);
//增加title
videoPlayer.getTitleTextView().setVisibility(View.VISIBLE);
//设置返回键
videoPlayer.getBackButton().setVisibility(View.VISIBLE);
//设置旋转
orientationUtils = new OrientationUtils(this, videoPlayer);

    //设置全屏按键功能,这是使用的是选择屏幕,而不是全屏
    videoPlayer.getFullscreenButton().setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            orientationUtils.resolveByClick();
        }
    });
    videoPlayer.getFullscreenButton().setVisibility(View.GONE);
    //是否可以滑动调整
    videoPlayer.setIsTouchWiget(true);
    //设置返回按键功能
    videoPlayer.getBackButton().setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            onBackPressed();
        }
    });
    videoPlayer.startPlayLogic();

问题log(如果有)

01-27 14:20:38.475 503-578/system_process W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client
01-27 14:20:38.477 21252-21556/com.welsee.classcard E/HttpProxyCacheDebuger: ****** injectCustomHeaders ****** :0
01-27 14:20:38.481 21252-21655/com.welsee.classcard I/HttpProxyCacheDebuger: Opened connections: 0
01-27 14:20:38.481 21252-21556/com.welsee.classcard I/HttpProxyCacheDebuger: Ping response: ping ok, pinged? true
01-27 14:20:38.482 503-524/system_process I/MediaFocusControl: AudioFocus abandonAudioFocus() from android.media.AudioManager@37f9cd99com.shuyu.gsyvideoplayer.video.base.GSYVideoView$1@340db76a
01-27 14:20:38.483 503-906/system_process I/MediaFocusControl: AudioFocus abandonAudioFocus() from android.media.AudioManager@37f9cd99com.shuyu.gsyvideoplayer.video.base.GSYVideoView$1@340db76a
01-27 14:20:38.484 503-4280/system_process I/MediaFocusControl: AudioFocus requestAudioFocus() from android.media.AudioManager@37f9cd99com.shuyu.gsyvideoplayer.video.base.GSYVideoView$1@340db76a req=2flags=0x0
01-27 14:20:38.488 21252-21252/com.welsee.classcard D/ViewRootImpl: 1920<<<<<< BACK FROM relayoutWM.LayoutParams{(0,0)(fillxfill)mPosX=0mPosY=0mHScale=1.0mVScale=1.0 align=UNDEFINE taskId=47 sim=#20 ty=1 fl=#81810180 wanim=0x1030469 surfaceInsets=Rect(0, 0 - 0, 0) needsMenuKey=2packageName=com.welsee.classcardtoken=android.os.BinderProxy@b228b10}
01-27 14:20:38.490 21252-21252/com.welsee.classcard D/IJKMEDIA: IjkMediaPlayer_native_setup
01-27 14:20:38.490 21252-21252/com.welsee.classcard I/IJKMEDIA: av_version_info: ff4.0--ijk0.8.8--20201130--001
01-27 14:20:38.490 21252-21252/com.welsee.classcard I/IJKMEDIA: ijk_version_info: k0.8.8-28-ga71b26bf
01-27 14:20:38.491 21252-21252/com.welsee.classcard D/IJKMEDIA: ffpipeline_create_from_android()
01-27 14:20:38.491 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_set_inject_opaque(0x6be)
01-27 14:20:38.491 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_set_inject_opaque()=void
01-27 14:20:38.491 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_set_ijkio_inject_opaque(0x6be)
01-27 14:20:38.492 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_set_ijkio_inject_opaque()=void
01-27 14:20:38.492 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_android_set_mediacodec_select_callback()
01-27 14:20:38.492 21252-21252/com.welsee.classcard D/IJKMEDIA: ffpipeline_set_mediacodec_select_callback
01-27 14:20:38.492 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_android_set_mediacodec_select_callback()=void
01-27 14:20:38.494 21252-21556/com.welsee.classcard E/HttpProxyCacheDebuger: ****** injectCustomHeaders ****** :0
01-27 14:20:38.496 21252-21783/com.welsee.classcard I/HttpProxyCacheDebuger: Opened connections: 0
01-27 14:20:38.496 21252-21556/com.welsee.classcard I/HttpProxyCacheDebuger: Ping response: ping ok, pinged? true
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/tv.danmaku.ijk.media.player.IjkMediaPlayer: Couldn't open file on client side, trying server side
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: IjkMediaPlayer_setDataSourceAndHeaders
01-27 14:20:38.497 21252-21252/com.welsee.classcard V/IJKMEDIA: setDataSource: path http://127.0.0.1:40056/http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_set_data_source(url="http://127.0.0.1:40056/http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4")
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_set_data_source(url="http://127.0.0.1:40056/http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4")=0
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: IjkMediaPlayer_setOptionLong
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: IjkMediaPlayer_setLoopCount
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: IjkMediaPlayer_native_setLogLevel(1)
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: moncleanup
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: IjkMediaPlayer_setVolume
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_android_set_volume(1.000000, 1.000000)
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: ffpipeline_set_volume
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_android_set_volume(1.000000, 1.000000)=void
01-27 14:20:38.497 21252-21252/com.welsee.classcard W/tv.danmaku.ijk.media.player.IjkMediaPlayer: setScreenOnWhilePlaying(true) is ineffective without a SurfaceHolder
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: IjkMediaPlayer_prepareAsync
01-27 14:20:38.497 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_prepare_async()
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: ===== versions =====
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: ijkplayer : k0.8.8-28-ga71b26bf
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: FFmpeg : ff4.0--ijk0.8.8--20201130--001
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: libavutil : 56.14.100
01-27 14:20:38.497 21252-22074/com.welsee.classcard I/IJKMEDIA: SDL_RunThread: [22074] ff_msg_loop
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: libavcodec : 58.18.100
01-27 14:20:38.497 21252-22074/com.welsee.classcard D/IJKMEDIA: message_loop
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: libavformat : 58.12.100
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: libswscale : 5.1.100
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: libswresample: 3.1.100
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: ===== options =====
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: player-opts : loop = 1
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: format-opts : ijkapplication = -1192478752
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: format-opts : ijkiomanager = -1193544048
01-27 14:20:38.497 21252-21252/com.welsee.classcard I/IJKMEDIA: ===================
01-27 14:20:38.498 21252-22074/com.welsee.classcard D/IJKMEDIA: FFP_MSG_FLUSH:
01-27 14:20:38.498 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_prepare_async()=0
01-27 14:20:38.499 21252-22076/com.welsee.classcard I/IJKMEDIA: SDL_RunThread: [22076] ff_read
01-27 14:20:38.499 21252-22075/com.welsee.classcard I/IJKMEDIA: SDL_RunThread: [22075] ff_vout
01-27 14:20:38.500 21252-22076/com.welsee.classcard D/IJKMEDIA: Opening 'http://127.0.0.1:40056/http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4' for reading
01-27 14:20:38.500 21252-22076/com.welsee.classcard D/IJKMEDIA: Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
01-27 14:20:38.500 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 1
01-27 14:20:38.501 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131073
01-27 14:20:38.501 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131074
01-27 14:20:38.501 21252-22076/com.welsee.classcard I/IJKMEDIA: tcp did open uri = tcp://127.0.0.1:40056, ip = 127.0.0.1
01-27 14:20:38.502 21252-22076/com.welsee.classcard D/IJKMEDIA: request: GET /http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4 HTTP/1.1
User-Agent: Lavf/58.12.100
Accept: /
Range: bytes=0-
Connection: close
Host: 127.0.0.1:40056
Icy-MetaData: 1
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: header='HTTP/1.1 206 PARTIAL CONTENT'
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: http_code=206
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Accept-Ranges: bytes'
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Length: 674815837'
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Range: bytes 0-674815836/674815837'
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Type: video/mp4'
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: header=''
01-27 14:20:38.505 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 2
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: Probing mov,mp4,m4a,3gp,3g2,mj2 score:100 size:2048
01-27 14:20:38.505 21252-22076/com.welsee.classcard D/IJKMEDIA: Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: type:'ftyp' parent:'root' sz: 32 8 674815837
01-27 14:20:38.505 21252-22076/com.welsee.classcard D/IJKMEDIA: ISO: File Type Major Brand: isom
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: type:'free' parent:'root' sz: 8 40 674815837
01-27 14:20:38.505 21252-22076/com.welsee.classcard V/IJKMEDIA: type:'mdat' parent:'root' sz: 671679822 48 674815837
01-27 14:20:38.505 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 3
01-27 14:20:38.506 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131073
01-27 14:20:38.507 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131074
01-27 14:20:38.507 21252-22076/com.welsee.classcard I/IJKMEDIA: tcp did open uri = tcp://127.0.0.1:40056, ip = 127.0.0.1
01-27 14:20:38.507 21252-22076/com.welsee.classcard D/IJKMEDIA: request: GET /http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4 HTTP/1.1
User-Agent: Lavf/58.12.100
Accept: /
Range: bytes=671679862-
Connection: close
Host: 127.0.0.1:40056
Icy-MetaData: 1
01-27 14:20:38.510 21252-21787/com.welsee.classcard E/HttpProxyCacheDebuger: ****** injectCustomHeaders ****** :0
01-27 14:20:38.522 21252-21787/com.welsee.classcard E/HttpProxyCacheServer error: Error processing request. Version: 8.0.0
01-27 14:20:38.523 21252-21787/com.welsee.classcard I/HttpProxyCacheDebuger: Opened connections: 1
01-27 14:20:38.523 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 4
01-27 14:20:38.523 21252-22076/com.welsee.classcard V/IJKMEDIA: type:'[6][5][8]t' parent:'root' sz: 12 671679870 674815837
01-27 14:20:38.523 21252-22076/com.welsee.classcard V/IJKMEDIA: type:'[0][0]R0' parent:'root' sz: 1684369280 671679882 674815837
01-27 14:20:38.523 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 3
01-27 14:20:38.523 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131073
01-27 14:20:38.525 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131074
01-27 14:20:38.525 21252-22076/com.welsee.classcard I/IJKMEDIA: tcp did open uri = tcp://127.0.0.1:40056, ip = 127.0.0.1
01-27 14:20:38.525 21252-22076/com.welsee.classcard D/IJKMEDIA: request: GET /http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4 HTTP/1.1
User-Agent: Lavf/58.12.100
Accept: /
Range: bytes=3136023-
Connection: close
Host: 127.0.0.1:40056
Icy-MetaData: 1
01-27 14:20:38.528 21252-22076/com.welsee.classcard V/IJKMEDIA: header='HTTP/1.1 206 PARTIAL CONTENT'
01-27 14:20:38.528 21252-22076/com.welsee.classcard V/IJKMEDIA: http_code=206
01-27 14:20:38.528 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Accept-Ranges: bytes'
01-27 14:20:38.528 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Length: 671679814'
01-27 14:20:38.528 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Range: bytes 3136023-674815836/674815837'
01-27 14:20:38.528 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Type: video/mp4'
01-27 14:20:38.528 21252-22076/com.welsee.classcard V/IJKMEDIA: header=''
01-27 14:20:38.528 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 4
01-27 14:20:38.528 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 3
01-27 14:20:38.529 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131073
01-27 14:20:38.529 21252-21558/com.welsee.classcard W/Failed to close socket on proxy side: {}. It seems client have already closed connection.: shutdown failed: ENOTCONN (Transport endpoint is not connected)
01-27 14:20:38.530 21252-21558/com.welsee.classcard I/HttpProxyCacheDebuger: Opened connections: 1
01-27 14:20:38.531 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131074
01-27 14:20:38.531 21252-22076/com.welsee.classcard I/IJKMEDIA: tcp did open uri = tcp://127.0.0.1:40056, ip = 127.0.0.1
01-27 14:20:38.531 21252-22076/com.welsee.classcard D/IJKMEDIA: request: GET /http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4 HTTP/1.1
User-Agent: Lavf/58.12.100
Accept: /
Range: bytes=0-
Connection: close
Host: 127.0.0.1:40056
Icy-MetaData: 1
01-27 14:20:38.534 21252-22076/com.welsee.classcard V/IJKMEDIA: header='HTTP/1.1 206 PARTIAL CONTENT'
01-27 14:20:38.534 21252-22076/com.welsee.classcard V/IJKMEDIA: http_code=206
01-27 14:20:38.534 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Accept-Ranges: bytes'
01-27 14:20:38.534 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Length: 674815837'
01-27 14:20:38.534 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Range: bytes 0-674815836/674815837'
01-27 14:20:38.534 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Type: video/mp4'
01-27 14:20:38.534 21252-22076/com.welsee.classcard V/IJKMEDIA: header=''
01-27 14:20:38.534 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 4
01-27 14:20:38.535 21252-22076/com.welsee.classcard V/IJKMEDIA: type:'ftyp' parent:'root' sz: 32 8 674815837
01-27 14:20:38.535 21252-22076/com.welsee.classcard D/IJKMEDIA: ISO: File Type Major Brand: isom
01-27 14:20:38.535 21252-22076/com.welsee.classcard V/IJKMEDIA: type:'free' parent:'root' sz: 8 40 674815837
01-27 14:20:38.535 21252-22076/com.welsee.classcard V/IJKMEDIA: type:'mdat' parent:'root' sz: 671679822 48 674815837
01-27 14:20:38.535 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 3
01-27 14:20:38.535 21252-21559/com.welsee.classcard W/Failed to close socket on proxy side: {}. It seems client have already closed connection.: shutdown failed: ENOTCONN (Transport endpoint is not connected)
01-27 14:20:38.535 21252-21559/com.welsee.classcard I/HttpProxyCacheDebuger: Opened connections: 1
01-27 14:20:38.535 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131073
01-27 14:20:38.536 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131074
01-27 14:20:38.536 21252-22076/com.welsee.classcard I/IJKMEDIA: tcp did open uri = tcp://127.0.0.1:40056, ip = 127.0.0.1
01-27 14:20:38.536 21252-22076/com.welsee.classcard D/IJKMEDIA: request: GET /http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4 HTTP/1.1
User-Agent: Lavf/58.12.100
Accept: /
Range: bytes=671679862-
Connection: close
Host: 127.0.0.1:40056
Icy-MetaData: 1
01-27 14:20:38.538 21252-21582/com.welsee.classcard E/HttpProxyCacheDebuger: ****** injectCustomHeaders ****** :0
01-27 14:20:38.539 21252-21582/com.welsee.classcard E/HttpProxyCacheServer error: Error processing request. Version: 8.0.0
01-27 14:20:38.539 21252-21582/com.welsee.classcard I/HttpProxyCacheDebuger: Opened connections: 1
01-27 14:20:38.540 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 4
01-27 14:20:38.540 21252-22076/com.welsee.classcard V/IJKMEDIA: type:'[6][5][8]t' parent:'root' sz: 12 671679870 674815837
01-27 14:20:38.540 21252-22076/com.welsee.classcard V/IJKMEDIA: type:'[0][0]R0' parent:'root' sz: 1684369280 671679882 674815837
01-27 14:20:38.540 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 3
01-27 14:20:38.540 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131073
01-27 14:20:38.541 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 131074
01-27 14:20:38.541 21252-22076/com.welsee.classcard I/IJKMEDIA: tcp did open uri = tcp://127.0.0.1:40056, ip = 127.0.0.1
01-27 14:20:38.541 21252-22076/com.welsee.classcard D/IJKMEDIA: request: GET /http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4 HTTP/1.1
User-Agent: Lavf/58.12.100
Accept: /
Range: bytes=3136023-
Connection: close
Host: 127.0.0.1:40056
Icy-MetaData: 1
01-27 14:20:38.543 21252-22076/com.welsee.classcard V/IJKMEDIA: header='HTTP/1.1 206 PARTIAL CONTENT'
01-27 14:20:38.543 21252-22076/com.welsee.classcard V/IJKMEDIA: http_code=206
01-27 14:20:38.543 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Accept-Ranges: bytes'
01-27 14:20:38.543 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Length: 671679814'
01-27 14:20:38.543 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Range: bytes 3136023-674815836/674815837'
01-27 14:20:38.543 21252-22076/com.welsee.classcard V/IJKMEDIA: header='Content-Type: video/mp4'
01-27 14:20:38.543 21252-22076/com.welsee.classcard V/IJKMEDIA: header=''
01-27 14:20:38.543 21252-22076/com.welsee.classcard I/tv.danmaku.ijk.media.player.IjkMediaPlayer: onNativeInvoke 4
01-27 14:20:38.543 21252-22076/com.welsee.classcard E/IJKMEDIA: moov atom not found
01-27 14:20:38.543 21252-22076/com.welsee.classcard D/IJKMEDIA: Statistics: 16384 bytes read, 3 seeks
01-27 14:20:38.543 21252-22076/com.welsee.classcard E/IJKMEDIA: http://127.0.0.1:40056/http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4: Invalid data found when processing input
01-27 14:20:38.543 21252-22076/com.welsee.classcard I/IJKMEDIA: SDL_JNI_DetachThreadEnv: [22076]
01-27 14:20:38.543 21252-22074/com.welsee.classcard D/IJKMEDIA: FFP_MSG_ERROR: 0
01-27 14:20:38.544 21252-21563/com.welsee.classcard W/Failed to close socket on proxy side: {}. It seems client have already closed connection.: shutdown failed: ENOTCONN (Transport endpoint is not connected)
01-27 14:20:38.544 21252-21563/com.welsee.classcard I/HttpProxyCacheDebuger: Opened connections: 1
01-27 14:20:38.545 21252-21566/com.welsee.classcard W/Failed to close socket on proxy side: {}. It seems client have already closed connection.: shutdown failed: ENOTCONN (Transport endpoint is not connected)
01-27 14:20:38.545 21252-21566/com.welsee.classcard I/HttpProxyCacheDebuger: Opened connections: 0
01-27 14:20:38.548 21252-21580/com.welsee.classcard W/Last modified date {} is not set for file {}: Wed Jan 27 14:20:38 GMT+08:00 2021
/storage/emulated/0/.classcard/.video/2fa70912e85dc103e825470cf32e95c9.mp4.download
01-27 14:20:38.550 21252-21252/com.welsee.classcard E/tv.danmaku.ijk.media.player.IjkMediaPlayer: Error (-10000,0)
01-27 14:20:38.584 21252-21252/com.welsee.classcard D/IJKMEDIA: IjkMediaPlayer_release
01-27 14:20:38.584 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_set_android_surface(surface=0x0)
01-27 14:20:38.584 21252-21252/com.welsee.classcard D/IJKMEDIA: ffpipeline_set_surface()
01-27 14:20:38.584 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_set_android_surface(surface=0x0)=void
01-27 14:20:38.584 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_shutdown_l()
01-27 14:20:38.584 21252-21252/com.welsee.classcard D/IJKMEDIA: wait for read_tid
01-27 14:20:38.584 21252-22074/com.welsee.classcard D/IJKMEDIA: message_loop exit
01-27 14:20:38.584 21252-21252/com.welsee.classcard D/IJKMEDIA: wait for video_refresh_tid
01-27 14:20:38.584 21252-22074/com.welsee.classcard I/IJKMEDIA: SDL_JNI_DetachThreadEnv: [22074]
01-27 14:20:38.591 21252-22075/com.welsee.classcard I/IJKMEDIA: SDL_JNI_DetachThreadEnv: [22075]
01-27 14:20:38.591 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_shutdown_l()=void
01-27 14:20:38.591 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_dec_ref(): ref=0
01-27 14:20:38.591 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_shutdown_l()
01-27 14:20:38.591 21252-21252/com.welsee.classcard D/IJKMEDIA: ijkmp_shutdown_l()=void

@aglszz
Copy link
Author

aglszz commented Jan 27, 2021

补充 如果这个视频缓存完了 没有任何问题 离线也能播放 只有在未缓存完的情况下会无法播放

@CarGuo
Copy link
Owner

CarGuo commented Jan 27, 2021

我 demo 测试,缓存一半的可以正常播放

@aglszz
Copy link
Author

aglszz commented Jan 27, 2021

我想改您demo SimplePlayer 的链接试一下 但是编译您的项目一直卡在 debugRuntimeClasspath 编译不过去
image

@aglszz
Copy link
Author

aglszz commented Jan 27, 2021

各种办法都是了 库 改成ali的 还是编译不过去

@aglszz
Copy link
Author

aglszz commented Jan 27, 2021

至少 要缓存一半么 我只 缓存了一点点 500M的视频 我缓存了 70M 没有办法播放

@aglszz
Copy link
Author

aglszz commented Jan 27, 2021

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
detail_player = findViewById(R.id.detail_player);
detail_player.setUp("http://outin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com/customerTrans/b1fd6ff1b31697c2c9820edeecfdaf3c/2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4", true,"测试");
//增加title
detail_player.getTitleTextView().setVisibility(View.VISIBLE);
//设置返回键
detail_player.getBackButton().setVisibility(View.VISIBLE);
//设置旋转
orientationUtils = new OrientationUtils(this, detail_player);

    //设置全屏按键功能,这是使用的是选择屏幕,而不是全屏
    detail_player.getFullscreenButton().setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            orientationUtils.resolveByClick();
        }
    });
    detail_player.getFullscreenButton().setVisibility(View.GONE);
    //是否可以滑动调整
    detail_player.setIsTouchWiget(true);
    //设置返回按键功能
    detail_player.getBackButton().setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            onBackPressed();
        }
    });
    detail_player.startPlayLogic();
}

重新写了个demo 这有这点代码 缓存 了一半 还是无法播放
对接的 8.0.0

@aglszz
Copy link
Author

aglszz commented Jan 27, 2021

上边URL
为视频连接

@CarGuo
Copy link
Owner

CarGuo commented Jan 27, 2021

这是是视频流本身的兼容问题

E/IJKMEDIA: http://127.0.0.1:45879/http%3A%2F%2Foutin-fb4a3ad855dd11e9b9e400163e1c8dba.oss-cn-beijing.aliyuncs.com%2FcustomerTrans%2Fb1fd6ff1b31697c2c9820edeecfdaf3c%2F2d103b93-1773790c37b-0005-2842-c34-de7f8.mp4: Invalid data found when processing input

事实上缓存信息已经有了,但是读取的时候发现数据组合不起来,这个和视频本身的编码模式有关系,详细看这个链接 : https://mp.weixin.qq.com/s/HjSdmAsHuvixCH_EWdvk3Q

@CarGuo
Copy link
Owner

CarGuo commented Jan 27, 2021

你用 Exo2PlayerManager 和 ExoPlayerCacheManager 吧,这个是分片缓存的。
只能这样解决了

@CarGuo CarGuo closed this as completed Jan 27, 2021
@aglszz
Copy link
Author

aglszz commented Jan 27, 2021

恩恩额 上传到阿里 阿里做了一次转码

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

No branches or pull requests

2 participants