From c8c9c3f0d269a633fb7cb5473fb0d448cf6fd9fe Mon Sep 17 00:00:00 2001 From: Saxon Milton Date: Thu, 8 Feb 2018 12:23:44 +1030 Subject: [PATCH] Baby steps: starting by output rtmp to youtube via ffmpeg --- revid/RevidInstance.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/revid/RevidInstance.go b/revid/RevidInstance.go index adcd3b97..3c60e5a6 100644 --- a/revid/RevidInstance.go +++ b/revid/RevidInstance.go @@ -81,6 +81,8 @@ type Config struct { Input uint8 InputCodec uint8 Output uint8 + RtmpEncodingMethod uint8 + RtmpURL string Bitrate string OutputFileName string InputFileName string @@ -108,6 +110,8 @@ const ( None = 8 Mpegts = 9 Rtmp = 10 + Ffmpeg = 11 + Revid = 12 ) // Default config settings @@ -245,6 +249,14 @@ func (r *revidInst) ChangeState(config Config) error { switch config.Output { case HttpOut: case File: + case Rtmp: + switch config.RtmpEncodingMethod { + case Revid: + case Ffmpeg: + case NothingDefine: + r.Log(Warning, "No RTMP encoding method defined, defautling to ffmpeg!") + config.RtmpEncodingMethod = Ffmpeg + } case NothingDefined: r.Log(Warning, "No output defined, defaulting to httpOut!") config.Output = HttpOut