mirror of https://bitbucket.org/ausocean/av.git
Add tuneable parameter to improve motion detect picture quality
This commit is contained in:
parent
5e2f968938
commit
faafee482d
|
@ -74,6 +74,7 @@ const (
|
|||
bitrateOutputDelay = 60 // s
|
||||
httpTimeOut = 5 // s
|
||||
motionThreshold = "0.0025"
|
||||
qscale = "3"
|
||||
)
|
||||
|
||||
// flag values
|
||||
|
@ -226,6 +227,7 @@ func input(input string, output string) {
|
|||
case *flags&filterMotionDetect != 0:
|
||||
args = []string{
|
||||
"-i", input,
|
||||
"-q:v", qscale,
|
||||
"-vf", "select=gt(scene\\," + motionThreshold + "),setpts=N/(FRAME_RATE*TB)",
|
||||
"-f", "mpegts", "-",
|
||||
}
|
||||
|
@ -283,8 +285,8 @@ func input(input string, output string) {
|
|||
for {
|
||||
upperBound := clipSize + mp2tPacketSize
|
||||
for _, err := io.ReadFull(br, clip[clipSize:upperBound]); err != nil; {
|
||||
inputErrChan <- err
|
||||
if err.Error() != "EFO" {
|
||||
if err.Error() != "EOF" {
|
||||
inputErrChan <- err
|
||||
return
|
||||
}
|
||||
_, err = io.ReadFull(br, clip[clipSize:upperBound])
|
||||
|
|
Loading…
Reference in New Issue