diff --git a/cmd/revid-cli/main.go b/cmd/revid-cli/main.go index 5c10e51f..d6523ca1 100644 --- a/cmd/revid-cli/main.go +++ b/cmd/revid-cli/main.go @@ -105,7 +105,7 @@ func handleFlags() revid.Config { var ( cpuprofile = flag.String("cpuprofile", "", "write cpu profile to `file`") - inputPtr = flag.String("Input", "", "The input type: Raspivid, File, Webcam, RTSPCamera") + inputPtr = flag.String("Input", "", "The input type: Raspivid, File, Webcam, RTSP") rtspURLPtr = flag.String("RTSPURL", "", "The URL for an RTSP server.") inputCodecPtr = flag.String("InputCodec", "", "The codec of the input: H264, Mjpeg") rtmpMethodPtr = flag.String("RtmpMethod", "", "The method used to send over rtmp: Ffmpeg, Librtmp") @@ -181,8 +181,8 @@ func handleFlags() revid.Config { cfg.Input = revid.V4L case "File": cfg.Input = revid.File - case "RTSPCamera": - cfg.Input = revid.RTSPCamera + case "RTSP": + cfg.Input = revid.RTSP case "": default: log.Log(logger.Error, pkg+"bad input argument") diff --git a/revid/config.go b/revid/config.go index ab68e677..990182c9 100644 --- a/revid/config.go +++ b/revid/config.go @@ -131,7 +131,7 @@ const ( Udp MpegtsRtp Rtp - RTSPCamera + RTSP ) // Default config settings @@ -174,7 +174,7 @@ func (c *Config) Validate(r *Revid) error { } switch c.Input { - case Raspivid, V4L, File, RTSPCamera: + case Raspivid, V4L, File, RTSP: case NothingDefined: c.Logger.Log(logger.Info, pkg+"no input type defined, defaulting", "input", defaultInput) c.Input = defaultInput diff --git a/revid/revid.go b/revid/revid.go index 88a33b7e..6d8f219a 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -178,7 +178,7 @@ func (r *Revid) reset(config Config) error { switch r.config.Input { case Raspivid, File, V4L: st = mts.H264 - case RTSPCamera: + case RTSP: st = mts.H265 } e := mts.NewEncoder(dst, float64(fps), st) @@ -287,7 +287,7 @@ func (r *Revid) setupPipeline(mtsEnc, flvEnc func(dst io.WriteCloser, rate int) case File: r.setupInput = r.setupInputForFile r.lexTo = h264.Lex - case RTSPCamera: + case RTSP: r.setupInput = r.startRTSPCamera r.lexTo = h265.NewLexer(false).Lex }