srs录像丢失调查,50s video lost when recording 6hrs.

SRS录像,发现统计直播时长和录像时长不一致。录像6hour,差了50s。
调查发现,on_publish事件和on_unpublish事件之间,差距就有4s。这4s是合理的,并不是录像视频丢失。
录像时长实际上是正确的,只是两个ts切片之间有视频计算上的丢失。平均两个ts之间就有15ms的时间被
gap。这个问题其实很好解决,上一个ts的end_time作为下一个ts的start_time就行了。
[16446][59hd9wz8] hls#1:start_dts=0,dts=8949,duration=8949000
[16446][59hd9wz8] hls#1:start_dts=8966,dts=8966,duration=0
On average, 15ms is lost for two ts. 1h lost 600*15=9s, 6 hours lost 54s.
[2021-03-31 07:58:27.215][Trace][19130][8571p0e1] publisher-stat: add publisher:127.0.0.1-live/ap01-1000
[2021-03-31 07:58:27.716][Trace][19130][8571p0e1] hls#1:start_dts=0,dts=0,duration=0
Start slicing, 0.5s later than the on_publish event. 3.5s after the end of slicing, the on_unpublish event is issued. The total difference is 4s.
[2021-03-31 07:58:45.257][Trace][19130][8571p0e1] hls#1:start_dts=8949000,dts=17912000,duration=8963000
[2021-03-31 07:58:48.711][Trace][19130][8571p0e1] publisher-stat: del publisher:127.0.0.1-live/ap01-1000
fixed and verified 3 times. difference is only 4s. that's normal.
[2021-03-31 08:39:44.387][Trace][20553][y86e90f6] publisher-stat-history: add {"uri":"live/ap01-1000","type":"rtmp","publisher_ip":"127.0.0.1","online":0,"start_ts":1617204747,"end_ts":1617205184,"duration":437}
hls-player shows video length is: 7:13
 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

草根大哥

进军大神程序员路上,谢谢支持!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值