Open yuban10703 opened 1 year ago
表现为停止推流,程序异常退出了还是正常运行但是无内容输出呢
表现为停止推流,程序异常退出了还是正常运行但是无内容输出呢
程序正常运行,无日志输出
可能是时间消息通信的问题,准备发布的版本已尝试解决可能造成的原因。
如果下次遇到,请附上log/core.log
日志文件方便排查。谢谢
现在是0.5.6版本
可以看见在9点左右停止了所有的推流
这是core.log
https://pastebin.com/fv9abacY
这是程序的状态
Broken pipe [-22] 通常是无法连接到推流服务器。配合core.log查看
[2022-10-01 00:33:35.865] [libkplayer] [info] [KPCache.cpp:53] hit cache file. path: cache/2021-10-15 23-32-47.mkv.kpc
[2022-10-01 00:33:35.866] [libkplayer] [info] [KPCache.cpp:161] start play resource. path: /nas/杂物/录播/2021-10-15 23-32-47.mkv
[2022-10-01 01:18:03.281] [libkplayer] [error] [kplayer.cpp:545] Failed to resolve hostname live-push.bilivideo.com: Try again
[2022-10-01 01:18:03.281] [libkplayer] [error] [kplayer.cpp:545] Cannot open connection tcp://live-push.bilivideo.com:1935
[2022-10-01 01:18:03.281] [libkplayer] [error] [KPEncode.cpp:88] could not open output stream; path: rtmp:xxxxxxx
主要错误是Failed to resolve hostname live-push.bilivideo.com: Try again
导致的,在推流过程中尝试连接服务器地址无法解析live-push.bilivideo.com的域名DNS。请排查一下这阶段服务器的网络连接情况,可能存在这几种情况:
是否可以增加一个断网后重连的功能..
好的,已记录 近期排查一下原因。谢谢
我看日志里打印已经配置了重连,也有可能是服务端直播间主动关掉也会触发这个错误。如果打开了自动重连,下次再出现相同的问题先不关闭kplayer,直接去后台打开直播间然后观察是不是可以重新恢复推流
我看日志里打印已经配置了重连,也有可能是服务端直播间主动关掉也会触发这个错误。如果打开了自动重连,下次再出现相同的问题先不关闭kplayer,直接去后台打开直播间然后观察是不是可以重新恢复推流
平时是可以正常重连的,比如在网页端开关直播间
但是在日志的1.18分的时候可以看到服务器的网络状态那里瞬间没有出站的流量了(时区没调整,日志里慢了8小时)kplayer我也没有关闭,而且我的推流列表还有虎牙的直播间,虎牙的直播间推流码不会变,也不会关闭直播间,在网页后台查看也没关闭。但是没有重连的行为。。
0.5.7也有这个问题,日志没取到,下次贴上日志....
程序目前就这个状态,我没有关闭kplayer,一直卡在这里,也不会尝试重连.....
下面是core.log
[2022-10-06 18:08:50.054] [libkplayer] [info] [kplayer.cpp:275] start play resource. path: /nas/杂物/录播/2021-09-10 17-07-46.mkv. uid: 6niqay
[2022-10-06 18:08:50.067] [libkplayer] [error] [kplayer.cpp:649] VPS 0 does not exist
[2022-10-06 18:08:50.068] [libkplayer] [error] [kplayer.cpp:649] SPS 0 does not exist.
[2022-10-06 18:08:50.204] [libkplayer] [error] [kplayer.cpp:649] VPS 0 does not exist
[2022-10-06 18:08:50.204] [libkplayer] [error] [kplayer.cpp:649] SPS 0 does not exist.
[2022-10-06 18:08:50.206] [libkplayer] [info] [KPCache.cpp:58] hit cache file. path: cache/2021-09-10 17-07-46.mkv.kpc
[2022-10-06 18:08:50.207] [libkplayer] [info] [KPCache.cpp:166] start play resource. path: /nas/杂物/录播/2021-09-10 17-07-46.mkv
[2022-10-06 18:09:22.961] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: me_b
[2022-10-06 18:09:23.364] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: szj_b_8
[2022-10-06 18:09:24.207] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: szj_b_7
[2022-10-06 18:09:25.254] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: szj_b_5
[2022-10-06 18:09:26.298] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: szj_b_1
[2022-10-06 18:09:27.187] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: sjh_b
[2022-10-06 18:09:28.353] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: szj_b_4
[2022-10-06 18:09:29.172] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: szj_b_2
[2022-10-06 18:09:30.186] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: gjq_b
[2022-10-06 18:09:31.176] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: szj_b_6
[2022-10-06 18:09:32.263] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: szj_b_3
[2022-10-06 18:09:33.161] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: wdcdd_b
[2022-10-06 20:15:40.847] [libkplayer] [info] [KPDistribute.cpp:133] prev input checkpoint stream_index: 0, pts: 7611000. dts: 7611000
[2022-10-06 20:15:40.863] [libkplayer] [info] [KPDistribute.cpp:133] prev input checkpoint stream_index: 1, pts: 7611000. dts: 7611000
[2022-10-06 20:15:40.863] [libkplayer] [info] [kplayer.cpp:295] free resource instance finished
[2022-10-06 20:15:40.863] [libkplayer] [info] [kplayer.cpp:268] resource play finished. path: /nas/杂物/录播/2021-09-10 17-07-46.mkv. uid: 6niqay
[2022-10-06 20:15:40.866] [libkplayer] [info] [kplayer.cpp:275] start play resource. path: /nas/杂物/录播/2021-10-15 23-32-47.mkv. uid: iQVzym
[2022-10-06 20:15:40.902] [libkplayer] [error] [kplayer.cpp:649] VPS 0 does not exist
[2022-10-06 20:15:40.903] [libkplayer] [error] [kplayer.cpp:649] SPS 0 does not exist.
[2022-10-06 20:15:41.059] [libkplayer] [error] [kplayer.cpp:649] VPS 0 does not exist
[2022-10-06 20:15:41.059] [libkplayer] [error] [kplayer.cpp:649] SPS 0 does not exist.
[2022-10-06 20:15:41.061] [libkplayer] [info] [KPCache.cpp:58] hit cache file. path: cache/2021-10-15 23-32-47.mkv.kpc
[2022-10-06 20:15:41.061] [libkplayer] [info] [KPCache.cpp:166] start play resource. path: /nas/杂物/录播/2021-10-15 23-32-47.mkv
[2022-10-06 22:16:07.892] [libkplayer] [info] [KPDistribute.cpp:133] prev input checkpoint stream_index: 0, pts: 14838000. dts: 14838000
[2022-10-06 22:16:07.903] [libkplayer] [info] [KPDistribute.cpp:133] prev input checkpoint stream_index: 1, pts: 14838000. dts: 14838000
[2022-10-06 22:16:07.903] [libkplayer] [info] [kplayer.cpp:295] free resource instance finished
[2022-10-06 22:16:07.904] [libkplayer] [info] [kplayer.cpp:268] resource play finished. path: /nas/杂物/录播/2021-10-15 23-32-47.mkv. uid: iQVzym
[2022-10-06 22:16:07.907] [libkplayer] [info] [kplayer.cpp:275] start play resource. path: /nas/杂物/录播/录播.mkv. uid: ueARbq
[2022-10-06 22:16:07.935] [libkplayer] [error] [kplayer.cpp:649] VPS 0 does not exist
[2022-10-06 22:16:07.935] [libkplayer] [error] [kplayer.cpp:649] SPS 0 does not exist.
[2022-10-06 22:16:08.046] [libkplayer] [error] [kplayer.cpp:649] VPS 0 does not exist
[2022-10-06 22:16:08.046] [libkplayer] [error] [kplayer.cpp:649] SPS 0 does not exist.
[2022-10-06 22:16:08.047] [libkplayer] [info] [KPCache.cpp:58] hit cache file. path: cache/录播.mkv.kpc
[2022-10-06 22:16:08.048] [libkplayer] [info] [KPCache.cpp:166] start play resource. path: /nas/杂物/录播/录播.mkv
[2022-10-07 00:13:58.174] [libkplayer] [info] [KPDistribute.cpp:133] prev input checkpoint stream_index: 0, pts: 21908000. dts: 21908000
[2022-10-07 00:13:58.188] [libkplayer] [info] [KPDistribute.cpp:133] prev input checkpoint stream_index: 1, pts: 21908000. dts: 21908000
[2022-10-07 00:13:58.189] [libkplayer] [info] [kplayer.cpp:295] free resource instance finished
[2022-10-07 00:13:58.189] [libkplayer] [info] [kplayer.cpp:268] resource play finished. path: /nas/杂物/录播/录播.mkv. uid: ueARbq
[2022-10-07 00:13:58.191] [libkplayer] [info] [kplayer.cpp:275] start play resource. path: /nas/杂物/录播/2021-09-10 17-07-46.mkv. uid: 6niqay
[2022-10-07 00:13:58.214] [libkplayer] [error] [kplayer.cpp:649] VPS 0 does not exist
[2022-10-07 00:13:58.214] [libkplayer] [error] [kplayer.cpp:649] SPS 0 does not exist.
[2022-10-07 00:13:58.342] [libkplayer] [error] [kplayer.cpp:649] VPS 0 does not exist
[2022-10-07 00:13:58.342] [libkplayer] [error] [kplayer.cpp:649] SPS 0 does not exist.
[2022-10-07 00:13:58.344] [libkplayer] [info] [KPCache.cpp:58] hit cache file. path: cache/2021-09-10 17-07-46.mkv.kpc
[2022-10-07 00:13:58.344] [libkplayer] [info] [KPCache.cpp:166] start play resource. path: /nas/杂物/录播/2021-09-10 17-07-46.mkv
[2022-10-07 00:46:33.554] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: gjq_b
[2022-10-07 02:20:48.989] [libkplayer] [info] [KPDistribute.cpp:133] prev input checkpoint stream_index: 0, pts: 29519000. dts: 29519000
[2022-10-07 02:20:49.000] [libkplayer] [info] [KPDistribute.cpp:133] prev input checkpoint stream_index: 1, pts: 29519000. dts: 29519000
[2022-10-07 02:20:49.001] [libkplayer] [info] [kplayer.cpp:295] free resource instance finished
[2022-10-07 02:20:49.001] [libkplayer] [info] [kplayer.cpp:268] resource play finished. path: /nas/杂物/录播/2021-09-10 17-07-46.mkv. uid: 6niqay
[2022-10-07 02:20:49.005] [libkplayer] [info] [kplayer.cpp:275] start play resource. path: /nas/杂物/录播/2021-10-15 23-32-47.mkv. uid: iQVzym
[2022-10-07 02:20:49.041] [libkplayer] [error] [kplayer.cpp:649] VPS 0 does not exist
[2022-10-07 02:20:49.041] [libkplayer] [error] [kplayer.cpp:649] SPS 0 does not exist.
[2022-10-07 02:20:49.198] [libkplayer] [error] [kplayer.cpp:649] VPS 0 does not exist
[2022-10-07 02:20:49.198] [libkplayer] [error] [kplayer.cpp:649] SPS 0 does not exist.
[2022-10-07 02:20:49.199] [libkplayer] [info] [KPCache.cpp:58] hit cache file. path: cache/2021-10-15 23-32-47.mkv.kpc
[2022-10-07 02:20:49.200] [libkplayer] [info] [KPCache.cpp:166] start play resource. path: /nas/杂物/录播/2021-10-15 23-32-47.mkv
[2022-10-07 02:45:44.850] [libkplayer] [info] [KPDistribute.cpp:82] add output success. path: tmp://live-push.bilivideo.com/live-bvc/? uid: me_b
我目前收集到的信息除了视频资源有问题之外,没有大量的自动断开的情况。看日志情况来看很大概率是直播间推流的连接被拒绝,如果想排查是不是类似bilibili平台对直播的关闭策略可以尝试在本地搭建rtmp-server使用kplayer来进行推流。观察24-48小时是否出现异常。
使用nginx搭建rtmp-server:https://github.com/arut/nginx-rtmp-module
OK,我搭个本地的看一下
好像找到复现的办法了 在推流过程中断网一下(我这里是openwrt路由器上重启防火墙),然后kplayer会重连,然后就卡死了.... 本地的推流也会断开
在主机上用ifconfig eth0 down 和ifconfig eth0 up好像没效果 我看看有没有简单的方法复现
作者是否可以留个邮箱之类的联系方式, 我把复现过程的视频发你....
邮箱地址:kplayer@bytelang.com
如果断网时间过长并且没有重连成功,主流的直播平台是会主动关闭直播间 需要手动开启。这也可能是影响因素
会在这个版本修复么,最近总是断....
会在这个版本修复么,最近总是断....
出现这个问题请排查一下stdout和log/core.log中有无错误级别的信息输出,如果有需要具体错误具体解决
如果没有任何错误情况,可能是消息通信中断导致,正在解决这个问题。下版本修复这个问题
会在这个版本修复么,最近总是断....
出现这个问题请排查一下stdout和log/core.log中有无错误级别的信息输出,如果有需要具体错误具体解决
如果没有任何错误情况,可能是消息通信中断导致,正在解决这个问题。下版本修复这个问题
最近发现推流目标少的时候不会出现这个问题(4个),推流源多的时候很频繁(20个),希望能有点帮助
会在这个版本修复么,最近总是断....
出现这个问题请排查一下stdout和log/core.log中有无错误级别的信息输出,如果有需要具体错误具体解决 如果没有任何错误情况,可能是消息通信中断导致,正在解决这个问题。下版本修复这个问题
最近发现推流目标少的时候不会出现这个问题(4个),推流源多的时候很频繁(20个),希望能有点帮助
好的,已大致排查出问题原因。谢谢
会在这个版本修复么,最近总是断....
出现这个问题请排查一下stdout和log/core.log中有无错误级别的信息输出,如果有需要具体错误具体解决 如果没有任何错误情况,可能是消息通信中断导致,正在解决这个问题。下版本修复这个问题
最近发现推流目标少的时候不会出现这个问题(4个),推流源多的时候很频繁(20个),希望能有点帮助
好的,已大致排查出问题原因。谢谢
0.5.8还是会出现这个问题....
谢谢。 已记录可能会断流的问题,正在处理下版本提高稳定性的问题
偶尔发生,目前遇到两次,kplayer没有重连之类的日志输出 下面是我的配置文件