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

使用http-flv訪問和多級路由有問題 #4

Open
opo2000tw opened this issue Aug 11, 2021 · 1 comment
Open

使用http-flv訪問和多級路由有問題 #4

opo2000tw opened this issue Aug 11, 2021 · 1 comment

Comments

@opo2000tw
Copy link

opo2000tw commented Aug 11, 2021

FLV264, FV265

想要存取 FLV 推流有要調整路由和輸入影像嗎? 怎麼調整我的指令和路徑呢謝謝

routetable和 ffmpeg 指令如下

## routetable
{
	"total": 2,
	"next_page_token": "/hr/",
	"routes": [
		{
			"pattern": "/group/door",
			"url": "rtsp://192.168.0.111:1554/1",
			"keepalive": true
		},
		{
			"pattern": "/hr/",
			"url": "rtsp://192.168.0.111:1554/2"
		}
	]
}

## ffmpeg 
ffmpeg -re -fflags +genpts -stream_loop -1 -i ./videoplayback.mp4 -rtsp_transport udp -c:v copy -c:a copy -f rtsp rtsp://localhost:1554/1

多級路由要如何使用呢,這一段看不太懂

範例的意思是要多設兩個推流嗎?
但是這樣跟直接存取有什麼差異,是因為要設存取權限嗎?

[
	{
        "pattern": "/group/door",
        "url": "rtsp://admin:[email protected]:8554/H264MainStream",
        "keepalive":true
    },
    {
        "pattern": "/hr/",
        "url": "rtsp://admin:[email protected]:1554",
		"keepalive": false
	}
]

我们配置了两个路由:
/group/door : 集团大门直接连接到摄像头
/hr/ : 人力资源部门的摄像头路由到下级的服务器 假设下级服务器有 /door/video1 和 /door/video2 两个摄像头,那么你可以通过 .../hr/door/video1 和 .../hr/door/video2 访问它们。

@opo2000tw opo2000tw changed the title quickstart.md 3.4 使用http-flv访问有問題 使用http-flv訪問和多級路由有問題 Aug 11, 2021
@cnotch
Copy link
Owner

cnotch commented Aug 12, 2021

多级路由是指可以将多个ipchub服务器串联起来。本来面向的是摄像头,推流一般是测试用的。
至于意义,1. 浏览器可能无法访问多级服务器,需要通过中间的代理;2. 很多时候是安全或权限的原因。3. 在很多时候它可以节省带宽(跨级)
你可以把/hr/ 这种模式的源,假想为windows中的网络硬盘的映射,它可以映射远程的某个硬盘(ipchub服务器),也可以是某个目录(ipchub服务器中某组模式的源)。
如果我还没说清楚,可以看看代码

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