EasyDarwin 安装部署

时间:2021-6-4 作者:qvyue
一、源码运行

参考
https://github.com/EasyDarwin/EasyDarwin
运行EasyDarwin—-技术栈golang、nodejs环境搭建+运行
http://www.easydarwin.org/doc/EasyDarwin.html

1.git clone

我现在的go版本已经是1.16了,新项目推荐使用GoModule。但是EasyDarwin仍然在使用go Vendor模式,区别参见go modules,所以我们在Git clone EasyDarwin时要注意放在Go Path目录中,这里严格按照官方文档操作即可。

  cd $GOPATH/src/github.com
  mkdir EasyDarwin && cd EasyDarwin
  git clone https://github.com/EasyDarwin/EasyDarwin.git --depth=1 EasyDarwin
  cd EasyDarwin

windows下也可以手动进入GoPath路径,先创建好文件夹结构,然后手动git clone

src
--github.com
    --EasyDarwin
        --EasyDarwin
--gitee.com
     --easydarwin

EasyDarwin 安装部署
以GoPath=d:GoPath为例
2.准备工具
        go get -u -v github.com/kardianos/govendor//包管理工具
        go get -u -v github.com/penggy/gobuild//热编译工具,下载可能会遇到被翻墙限制的问题

安装成功会有对应的可以执行文件在bin目录下

EasyDarwin 安装部署
image.png
3.以开发模式运行
  npm run dev

报错了

PS C:Usersadmingosrcgithub.comEasyDarwinEasyDarwin> npm run dev

> easydarwin@8.1.0 dev C:Usersadmingosrcgithub.comEasyDarwinEasyDarwin
> go build -o EasyDarwin.exe

# github.com/EasyDarwin/EasyDarwin/vendor/github.com/mattn/go-sqlite3
cgo: exec gcc: exec: "gcc": executable file not found in %PATH%

参考基于 VS Code + MinGW-w64 的C语言/C++简单环境配置,专致小白,安装mingw,执行CMDgcc-v看到版本号表示安装成功。再次npm run dev,编译成功。

4.执行ServiceInstall-EasyDarwin.exe报错
EasyDarwin 安装部署
image.png

这是因为本地路径下找不到EasyDarwin.exe文件,这个文件因为太大(约32M),被Git忽略了,没有提交到源码项目中。

EasyDarwin 安装部署
image.png

使用npm run dev生成EasyDarwin.exe后,就不会报错了。

5.运行服务
直接运行(Windows)

EasyDarwin.exe

以 Ctrl + C 停止服务

以服务启动(Windows)

ServiceInstall-EasyDarwin.exe

以 ServiceUninstall-EasyDarwin.exe 卸载 EasyDarwin 服务

EasyDarwin 安装部署
image.png

现在打开浏览器输入 http://localhost:10008, 进入控制页面,默认用户名密码是admin/admin

6.推流拉流
ffmpeg -re -i D:nginx1.7vodjay.flv -rtsp_transport tcp -vcodec h264 -f rtsp rtsp://localhost/test

在VLC中播放以下地址

rtsp://localhost/test
EasyDarwin 安装部署
image.png
7.使用本地摄像头来推拉流

参考ffmpeg easydarwin 做流媒体服务器

ffmpeg -f dshow -i video="HP TrueVision HD Camera":audio="麦克风阵列 (英特尔® 智音技术)" 
-vcodec libx264 -r 25 -preset:v ultrafast -tune:v zerolatency -f rtsp rtsp://127.0.0.1/test

二、
8.

EasyDarwin+ffmpeg进行PC(摄像头+麦克风)流媒体直播服务

EasyDarwinGo录像功能发布

声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:qvyue@qq.com 进行举报,并提供相关证据,工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。