diff --git a/revid/RevidInstance.go b/revid/RevidInstance.go index a4fbd54b..06683b6f 100644 --- a/revid/RevidInstance.go +++ b/revid/RevidInstance.go @@ -332,22 +332,35 @@ func (r *revidInst) Start() { switch r.config.InputCodec { case H264: codec = "H264" + r.cmd = exec.Command("raspivid", + "-cd", codec, + "-o", "-", + "-n", + "-t", r.config.Timeout, + "-b", "0", + "-qp", r.config.Quantization, + "-w", r.config.Width, + "-h", r.config.Height, + "-fps", r.config.FrameRate, + "-ih", + "-g", r.config.IntraRefreshPeriod, + ) case Mjpeg: codec = "MJPEG" + r.cmd = exec.Command("raspivid", + "-cd", codec, + "-o", "-", + "-n", + "-t", r.config.Timeout, + /* + "-b", "0", + "-qp", r.config.Quantization, + "-w", r.config.Width, + "-h", r.config.Height, + "-fps", r.config.FrameRate, + */ + ) } - r.cmd = exec.Command("raspivid", - "-cd", codec, - "-o", "-", - "-n", - "-t", r.config.Timeout, - "-b", "0", - "-qp", r.config.Quantization, - "-w", r.config.Width, - "-h", r.config.Height, - "-fps", r.config.FrameRate, - "-ih", - "-g", r.config.IntraRefreshPeriod, - ) stdout, _ := r.cmd.StdoutPipe() err := r.cmd.Start() r.inputReader = bufio.NewReader(stdout)