wanghaoxi3000 / gin-rtsp Goto Github PK
View Code? Open in Web Editor NEW基于Gin + WebSocket + JSMpeg,在HTML页面上直接播放RTSP视频流。
License: MIT License
基于Gin + WebSocket + JSMpeg,在HTML页面上直接播放RTSP视频流。
License: MIT License
WebSocket connection to 'ws://127.0.0.1:3000/stream/live/08066448-ebcb-3465-996e-af4148687b23' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
一直报这个错误,请问如何解决呀
可以在IOS Safari上播放吗?
FFMPEG 视频转换:收到前端的请求后,启动一个Goroutine调用系统的FFMPEG命令转换指定的RTSP视频流并推送到后台对应的接口,我这里一直没有收到推送的请求,很奇怪,不知道为什么
在windows环境下编译并启动项目,过一段时间之后 /stream/play 这个请求就进不去了,项目似乎堵塞了? @wanghaoxi3000
在网上找到一段可以播放rtsp流,测试可以用,但掉接口 play 时报错,请教下这个时什么原因
2020-03-25 22:12:42 [I] Websocket manage start
2020-03-25 22:12:45 [I] Websocket client 01177f66-b333-443e-9c67-9437589b870c connect
2020-03-25 22:12:45 [I] Register client 01177f66-b333-443e-9c67-9437589b870c to 4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6 group success
[GIN] 2020/03/25 - 22:12:45 | 200 | 4.8815ms | 127.0.0.1 | GET /stream/live/4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6
2020-03-25 22:12:45 [I] Websocket client 78607b85-042f-4880-96ba-c694d17dfb48 connect
2020-03-25 22:12:45 [I] Register client 78607b85-042f-4880-96ba-c694d17dfb48 to 4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6 group success
[GIN] 2020/03/25 - 22:12:45 | 200 | 975.8µs | 127.0.0.1 | GET /stream/live/4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6
[GIN] 2020/03/25 - 22:13:00 | 200 | 975.9µs | 127.0.0.1 | POST /stream/play
2020-03-25 22:13:00 [E] Start ffmpeg err:exec: "ffmpeg": executable file not found in %PATH%
2020-03-25 22:13:00 [I] Stop translate rtsp rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
在网上找到一段可以播放rtsp流,测试可以用,但掉接口 play 时报错,请教下这个时什么原因
2020-03-25 22:12:42 [I] Websocket manage start
2020-03-25 22:12:45 [I] Websocket client 01177f66-b333-443e-9c67-9437589b870c connect
2020-03-25 22:12:45 [I] Register client 01177f66-b333-443e-9c67-9437589b870c to 4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6 group success
[GIN] 2020/03/25 - 22:12:45 | 200 | 4.8815ms | 127.0.0.1 | GET /stream/live/4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6
2020-03-25 22:12:45 [I] Websocket client 78607b85-042f-4880-96ba-c694d17dfb48 connect
2020-03-25 22:12:45 [I] Register client 78607b85-042f-4880-96ba-c694d17dfb48 to 4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6 group success
[GIN] 2020/03/25 - 22:12:45 | 200 | 975.8µs | 127.0.0.1 | GET /stream/live/4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6
[GIN] 2020/03/25 - 22:13:00 | 200 | 975.9µs | 127.0.0.1 | POST /stream/play
2020-03-25 22:13:00 [E] Start ffmpeg err:exec: "ffmpeg": executable file not found in %PATH%
2020-03-25 22:13:00 [I] Stop translate rtsp rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
在网上找到一段可以播放rtsp流,测试可以用,但掉接口 play 时报错,请教下这个时什么原因
2020-03-25 22:12:42 [I] Websocket manage start
2020-03-25 22:12:45 [I] Websocket client 01177f66-b333-443e-9c67-9437589b870c connect
2020-03-25 22:12:45 [I] Register client 01177f66-b333-443e-9c67-9437589b870c to 4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6 group success
[GIN] 2020/03/25 - 22:12:45 | 200 | 4.8815ms | 127.0.0.1 | GET /stream/live/4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6
2020-03-25 22:12:45 [I] Websocket client 78607b85-042f-4880-96ba-c694d17dfb48 connect
2020-03-25 22:12:45 [I] Register client 78607b85-042f-4880-96ba-c694d17dfb48 to 4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6 group success
[GIN] 2020/03/25 - 22:12:45 | 200 | 975.8µs | 127.0.0.1 | GET /stream/live/4ff578b3-8a0e-37e9-91b8-1a57fc4c4af6
[GIN] 2020/03/25 - 22:13:00 | 200 | 975.9µs | 127.0.0.1 | POST /stream/play
2020-03-25 22:13:00 [E] Start ffmpeg err:exec: "ffmpeg": executable file not found in %PATH%
2020-03-25 22:13:00 [I] Stop translate rtsp rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
reflush := make(chan int) # make 不应该写在函数外层作为全局变量么。。
if cmd, stdin, err := runFFMPEG(service.URL, processCh); err != nil {
return serializer.Err(400, err.Error(), err)
} else {
go keepFFMPEG(cmd, stdin, &reflush, processCh)
}
无论是容器还是浏览器没有任何报错信息,ws连接也没有看到有消息收发
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.