revid/revid.go adding CBR=true for MJPEG encoded video for RaspiVid and RSTP

This commit is contained in:
Ella Pietraroia 2020-01-07 10:45:45 +10:30
parent b9df8e388a
commit 04b7a79055
1 changed files with 2 additions and 0 deletions

View File

@ -209,6 +209,7 @@ func (r *Revid) reset(c config.Config) error {
case codecutil.MJPEG:
st = mts.EncodeMJPEG
encOptions = append(encOptions, mts.TimeBasedPSI(time.Duration(r.cfg.PSITime)*time.Second))
r.cfg.CBR = true
default:
panic("unknown input codec for raspivid input")
}
@ -232,6 +233,7 @@ func (r *Revid) reset(c config.Config) error {
case codecutil.MJPEG:
st = mts.EncodeMJPEG
encOptions = append(encOptions, mts.TimeBasedPSI(time.Duration(r.cfg.PSITime)*time.Second))
r.cfg.CBR = true
default:
panic("unknown input codec for RTSP input")
}