CarGuo / GSYVideoPlayer

视频播放器(IJKplayer、ExoPlayer、MediaPlayer),HTTPS,16k page size,支持弹幕,外挂字幕,支持滤镜、水印、gif截图,片头广告、中间广告,多个同时播放,支持基本的拖动,声音、亮度调节,支持边播边缓存,支持视频自带rotation的旋转(90,270之类),重力旋转与手动旋转的同步支持,支持列表播放 ,列表全屏动画,视频加载速度,列表小窗口支持拖动,动画效果,调整比例,多分辨率切换,支持切换播放器,进度条小窗口预览,列表切换详情页面无缝播放,rtsp、concat、mpeg。
https://juejin.cn/user/817692379985752/posts
Apache License 2.0
20.23k stars 4.19k forks source link

HttpProxyCacheServer error com.danikula.videocache.ProxyCacheException #19

Closed aresa7796 closed 7 years ago

aresa7796 commented 7 years ago

播放这个链接

http://120.25.226.186:32812/resources/videos/minion_01.mp4 报了这个异常。

HttpProxyCacheServer error com.danikula.videocache.ProxyCacheException: Error closing socket output stream at com.danikula.videocache.HttpProxyCacheServer.closeSocketOutput(HttpProxyCacheServer.java:294) at com.danikula.videocache.HttpProxyCacheServer.releaseSocket(HttpProxyCacheServer.java:270) at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:242) at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:52) at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:337) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.net.SocketException: shutdown failed: ENOTCONN (Transport endpoint is not connected) at java.net.PlainSocketImpl.shutdownOutput(PlainSocketImpl.java:377) at java.net.Socket.shutdownOutput(Socket.java:652) at com.danikula.videocache.HttpProxyCacheServer.closeSocketOutput(HttpProxyCacheServer.java:291) at com.danikula.videocache.HttpProxyCacheServer.releaseSocket(HttpProxyCacheServer.java:270)  at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:242)  at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:52)  at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:337)  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)  at java.util.concurrent.FutureTask.run(FutureTask.java:237)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)  at java.lang.Thread.run(Thread.java:818)  Caused by: android.system.ErrnoException: shutdown failed: ENOTCONN (Transport endpoint is not connected) at libcore.io.Posix.shutdown(Native Method) at libcore.io.ForwardingOs.shutdown(ForwardingOs.java:149) at java.net.PlainSocketImpl.shutdownOutput(PlainSocketImpl.java:375) at java.net.Socket.shutdownOutput(Socket.java:652)  at com.danikula.videocache.HttpProxyCacheServer.closeSocketOutput(HttpProxyCacheServer.java:291)  at com.danikula.videocache.HttpProxyCacheServer.releaseSocket(HttpProxyCacheServer.java:270)  at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:242)  at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:52)  at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:337)  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)  at java.util.concurrent.FutureTask.run(FutureTask.java:237)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)  at java.lang.Thread.run(Thread.java:818) 

CarGuo commented 7 years ago

这个异常是正常情况的,因为它强行关闭socket,新版本已经不抱这个异常了。这个视频应该是编码格式IJK不支持,IJK支持H264的,详情可以看首页问题集锦,DEMO里切换成EXO播放器就可以了,但是EXO播放器一些细节处理不好,所以个人建议还是调整视频格式。