Giter Site home page Giter Site logo

Comments (5)

cnotch avatar cnotch commented on August 19, 2024

routetable.json 直接放在可执行文件的目录中。内容可以参考如下:

[
	{
		"pattern": "/test/live1",
		"url": "rtsp://admin:[email protected]:8554/H264MainStream"
	},
	{
		"pattern": "/easy/live1",
		"url": "rtsp://admin:admin@localhost:5540/test/live1"
	}
]

其他的可能:

  1. 想放在其他位置或其他文件,可以在config.json 中配置 routetable 段
	"routetable":{
		"provider":"json",
		"config":{
 			"file":"./cfg/routetable.json"
		}
	}
  1. 如果想存储到数据库或其他位置
    目前只能自己修改源代码,增加 Provider。未来会考虑提供 Provider Plugin功能

from ipchub.

1157457050 avatar 1157457050 commented on August 19, 2024

你好,路由表已经配置好了,但是怎么配置可以打开。m3u8
WARN 2021-01-13 10:39:20.204830 github.com/cnotch/ipchub/service/streamapis.go:66: request file ext is not supported: .m3m8
下面是我的配置文件
{
"listen": ":1554",
"auth": false,
"cache_gop": true,
"hlspath":"./hls",
"hlsfragment":10,
"profile": true,
"log": {
"level": "DEBUG",
"tofile": false,
"filename": "./logs/ipchub.log",
"maxsize": 20,
"maxdays": 7,
"maxbackups": 14,
"compress": false
}
}

from ipchub.

cnotch avatar cnotch commented on August 19, 2024

m3m8->m3u8

from ipchub.

1157457050 avatar 1157457050 commented on August 19, 2024

你好,大佬。我又有几个问题。
3.2 使用websocket-rtsp 可以播放视频
3.3 使用websocket-rtsp 不可以播放视频
[MSEController] > MediaSource onSourceOpen
[IOController] > Loader error, code = -1, msg = Failed to fetch
[TransmuxingController] > IOException: type = Exception, code = -1, msg = Failed to fetch

3.5使用 http-hls访问
然后使用VLC播放器打开http://localhost:1554/streams/group/door.m3u8 也打开不了。

from ipchub.

cnotch avatar cnotch commented on August 19, 2024

音视频调试是比较麻烦的,如果websocket-rtsp能播,说明视频源已经连接。flv不能播,看是否地址输错了。hls 播放在视频刚接入服务器时需要等待一段时间。
也可以先查询一下流的基本信息,先登录再查询
curl -H "Content-Type: application/json" -X POST --data '{"username":"admin","password":"admin"}' http://localhost:1554/api/v1/login
curl http://localhost:1554/api/v1/streams/test/live1?token=你的token

同时看看日志,是否有一些其他有用信息。
兼职项目,很难及时回复;您可以自己试着调试一下。

from ipchub.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.