Seems like MJPEG doesn't like quantisation - we'll have to work out a nice bitrate

This commit is contained in:
Jack Richardson 2018-01-31 17:12:29 +10:30
parent e33f4fded0
commit 26430f1ff8
2 changed files with 3 additions and 7 deletions

View File

@ -59,10 +59,10 @@ const (
mp2tPacketSize = 188 // MPEG-TS packet size mp2tPacketSize = 188 // MPEG-TS packet size
mp2tMaxPackets = 2016 * clipDuration // # first multiple of 7 and 8 greater than 2000 mp2tMaxPackets = 2016 * clipDuration // # first multiple of 7 and 8 greater than 2000
ringBufferSize = 100 / clipDuration ringBufferSize = 100 / clipDuration
ringBufferElementSize = 500000 ringBufferElementSize = 1000000
httpTimeOut = 5 // s httpTimeOut = 5 // s
packetsPerFrame = 7 packetsPerFrame = 7
h264BufferSize = 500000 h264BufferSize = 1000000
bitrateTime = 60 bitrateTime = 60
mjpegParserInChanLen = 100000 mjpegParserInChanLen = 100000
) )
@ -352,13 +352,9 @@ func (r *revidInst) Start() {
"-o", "-", "-o", "-",
"-n", "-n",
"-t", r.config.Timeout, "-t", r.config.Timeout,
/*
"-b", "0",
"-qp", r.config.Quantization,
"-w", r.config.Width, "-w", r.config.Width,
"-h", r.config.Height, "-h", r.config.Height,
"-fps", r.config.FrameRate, "-fps", r.config.FrameRate,
*/
) )
} }
stdout, _ := r.cmd.StdoutPipe() stdout, _ := r.cmd.StdoutPipe()

View File

@ -91,6 +91,6 @@ func TestRaspividMJPEGInput(t *testing.T){
return return
} }
revidInst.Start() revidInst.Start()
time.Sleep(10*time.Second) time.Sleep(5*time.Second)
revidInst.Stop() revidInst.Stop()
} }