FIshing some issues with code

Something is breaking raspivid, need to work out what it is
This commit is contained in:
Unknown 2018-01-31 16:56:36 +10:30
parent 5a0aedff8c
commit e33f4fded0
1 changed files with 26 additions and 13 deletions

View File

@ -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)