[no ci] add go2rtc package

pull/1204/head
gtxaspec 2023-12-18 21:13:51 -08:00
parent b69339b81b
commit 43cb043194
4 changed files with 59 additions and 0 deletions

View File

@ -109,3 +109,4 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/xiongmai-osdrv-xm530/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/xmdp/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/yaml-cli/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/zerotier-one/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/go2rtc/Config.in"

View File

@ -0,0 +1,7 @@
config BR2_PACKAGE_GO2RTC
bool "go2rtc streamer"
default n
help
Ultimate camera streaming application with support RTSP, WebRTC, HomeKit, FFmpeg, RTMP, etc.
Note: Binary will be UPX Compressed, binary size ~3.4mb
https://github.com/AlexxIT/go2rtc

View File

@ -0,0 +1,20 @@
log:
level: info # default level
api: trace
exec: debug
ngrok: info
rtsp: warn
streams: error
webrtc: fatal
rtsp:
listen: ":8553"
webrtc:
candidates:
- stun:8555
streams:
openipc_jpeg: http://username:password@127.0.0.1/image.jpg
openipc_rtsp-1: rtsp://username:password@127.0.0.1/stream=0
openipc_rtsp-2: rtsp://username:password@127.0.0.1/stream=1

View File

@ -0,0 +1,31 @@
################################################################################
#
# go2rtc
#
################################################################################
GO2RTC_VERSION = master
GO2RTC_SITE = $(call github,AlexxIT,go2rtc,$(GO2RTC_VERSION))
GO2RTC_LICENSE = MIT
GO2RTC_LICENSE_FILES = LICENSE
GO2RTC_INSTALL_TARGET = YES
GO2RTC_DEPENDENCIES = host-go host-upx
GO2RTC_GO_LDFLAGS = -s -w
define GO2RTC_BUILD_CMDS
(cd $(@D); \
CGO_ENABLED=0 \
GOOS=linux \
GOARCH=mipsle \
go build -ldflags "$(GO2RTC_GO_LDFLAGS)")
endef
define GO2RTC_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/go2rtc $(TARGET_DIR)/usr/bin/go2rtc
upx --best --lzma $(TARGET_DIR)/usr/bin/go2rtc
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/ $(GO2RTC_PKGDIR)/files/go2rtc.yaml
endef
$(eval $(golang-package))