Skip to content

rtmp pull resetted every 3 ~ 5 seconds, with default example code #310

@morya

Description

@morya

rtmp pull resetted every 3 ~ 5 seconds, with default example code

using default example code:

config file

global:
  loglevel: debug

rtmp:
  tcp:
    listenaddr: :1935

go code

package main

import (
	"context"
	"flag"

	"m7s.live/v5"
	// 导入您需要的插件
	_ "m7s.live/v5/plugin/flv"
	_ "m7s.live/v5/plugin/hls"
	_ "m7s.live/v5/plugin/rtmp"
	// 根据需要添加更多插件
)

func main() {
	conf := flag.String("c", "config.yaml", "config file")
	flag.Parse()
	m7s.Run(context.Background(), *conf)
}

logs

23:07:27.919352 DBG recv cmd server=2 plugin=RTMP remote=[::1]:55857 commandName=getStreamLength streamID=0
23:07:27.919358 DBG recv cmd server=2 plugin=RTMP remote=[::1]:55857 commandName=play streamID=1
23:07:27.919380 DBG task start server=2 plugin=RTMP streamPath=live/aa sId=27 taskId=27 taskType=1 ownerType=Subscriber reason=plugin.go:612
23:07:27.919386 INF subscribe server=2 plugin=RTMP streamPath=live/aa sId=27
23:07:27.919391 INF subscriber +1 server=2 plugin=RTMP streamPath=live/aa pId=13 count=1
23:07:27.919430 DBG create reader server=2 plugin=RTMP streamPath=live/aa pId=13 track=audio
23:07:27.919446 DBG create reader server=2 plugin=RTMP streamPath=live/aa pId=13 track=video
23:07:27.919450 INF start read server=2 plugin=RTMP streamPath=live/aa pId=13 track=video reader=*rtmp.RTMPVideo mode=0
23:07:27.919454 INF first frame read server=2 plugin=RTMP streamPath=live/aa pId=13 track=video reader=*rtmp.RTMPVideo firstTs=37.501s firstSeq=751
23:07:27.970054 INF start read server=2 plugin=RTMP streamPath=live/aa pId=13 track=audio reader=*rtmp.RTMPAudio mode=0
23:07:27.970097 INF first frame read server=2 plugin=RTMP streamPath=live/aa pId=13 track=audio reader=*rtmp.RTMPAudio firstTs=37.503s firstSeq=880
23:07:29.796672 INF jump server=2 plugin=RTMP streamPath=live/aa pId=13 track=audio reader=*rtmp.RTMPAudio skipSeq=293 skipTs=48.203s
23:07:29.796722 INF jump server=2 plugin=RTMP streamPath=live/aa pId=13 track=video reader=*rtmp.RTMPVideo skipSeq=250 skipTs=48.191s
23:07:30.474647 INF tick server=2 cpu=24.624060150299844 streams=1 subscribers=1 waits=0
23:07:32.919892 WRN ReadMessage server=2 plugin=RTMP remote=[::1]:55857 error=read tcp [::1]:1935->[::1]:55857: i/o timeout
23:07:32.919934 DBG task stop server=2 plugin=RTMP remote=[::1]:55857 caller=pkg/task/task.go:444 reason=read tcp [::1]:1935->[::1]:55857: i/o timeout elapsed=5.001161458s taskId=26 taskType=1 ownerType=RTMPServer
23:07:32.919957 DBG task dispose server=2 plugin=RTMP streamPath=live/aa sId=27 reason=read tcp [::1]:1935->[::1]:55857: i/o timeout taskId=27 taskType=1 ownerType=Subscriber
23:07:32.919967 INF unsubscribe server=2 plugin=RTMP streamPath=live/aa sId=27 reason=read tcp [::1]:1935->[::1]:55857: i/o timeout
23:07:32.919971 INF subscriber -1 server=2 plugin=RTMP streamPath=live/aa pId=13 count=0
23:07:32.919977 DBG task disposed server=2 plugin=RTMP streamPath=live/aa sId=27 reason=read tcp [::1]:1935->[::1]:55857: i/o timeout taskId=27 taskType=1 ownerType=Subscriber
23:07:32.919968 DBG task dispose server=2 plugin=RTMP remote=[::1]:55857 reason=read tcp [::1]:1935->[::1]:55857: i/o timeout taskId=26 taskType=1 ownerType=RTMPServer
23:07:32.920102 DBG task disposed server=2 plugin=RTMP remote=[::1]:55857 reason=read tcp [::1]:1935->[::1]:55857: i/o timeout taskId=26 taskType=1 ownerType=RTMPServer
23:07:32.962176 DBG task stop server=2 plugin=RTMP streamPath=live/aa sId=27 caller=subscriber.go:265 reason=context canceled elapsed=5.042842541s taskId=27 taskType=1 ownerType=Subscriber

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions