mirror of https://bitbucket.org/ausocean/av.git
revid/revid.go MPEG lexer enabled and encoder options set for v4l
This commit is contained in:
parent
565ba3079c
commit
70802022bb
|
@ -191,7 +191,15 @@ func (r *Revid) reset(c config.Config) error {
|
|||
panic("unknown input codec for raspivid input")
|
||||
}
|
||||
case config.InputFile, config.InputV4L:
|
||||
st = mts.EncodeH264
|
||||
switch r.cfg.InputCodec {
|
||||
case codecutil.H264:
|
||||
st = mts.EncodeH264
|
||||
case codecutil.MJPEG:
|
||||
st = mts.EncodeMJPEG
|
||||
encOptions = append(encOptions, mts.PacketBasedPSI(int(r.cfg.MinFrames)))
|
||||
default:
|
||||
panic("unknown input codec for v4l or input file input")
|
||||
}
|
||||
case config.InputRTSP:
|
||||
switch r.cfg.InputCodec {
|
||||
case codecutil.H265:
|
||||
|
@ -329,7 +337,12 @@ func (r *Revid) setupPipeline(mtsEnc func(dst io.WriteCloser, rate float64) (io.
|
|||
|
||||
case config.InputV4L:
|
||||
r.input = webcam.New(r.cfg.Logger)
|
||||
r.lexTo = h264.Lex
|
||||
switch r.cfg.InputCodec {
|
||||
case codecutil.H264:
|
||||
r.lexTo = h264.Lex
|
||||
case codecutil.MJPEG:
|
||||
r.lexTo = mjpeg.Lex
|
||||
}
|
||||
|
||||
case config.InputFile:
|
||||
r.input = file.New()
|
||||
|
|
Loading…
Reference in New Issue