video latency should be less

This commit is contained in:
TonyChyi 2022-10-11 07:47:04 +08:00
parent 07d3ae3717
commit 935d5ade76
3 changed files with 7 additions and 4 deletions

3
TODO
View File

@ -13,3 +13,6 @@
# 2022-10-10
1. 视频设备延迟过高
# 2022-10-11
1. 解决视频设备延迟

View File

@ -119,7 +119,7 @@ func setupCodec(videoBPS int) (*mediadevices.CodecSelector, error) {
return nil, err
}
x264Prarm.BitRate = videoBPS
x264Prarm.Preset = x264.PresetMedium
x264Prarm.Preset = x264.PresetFaster
opusParam, err := opus.NewParams()
if err != nil {

View File

@ -39,7 +39,7 @@ func NewServer(o *Options) (*Server, error) {
options: o,
audioHeader: make(chan *audio.WavHeader, 1),
pcm: make(chan []byte),
ppm: make(chan io.ReadCloser, int(o.Video.FPS)), // to be configured
ppm: make(chan io.ReadCloser), // to be configured
}
u, err := url.Parse(o.QmpAddress)
@ -130,7 +130,7 @@ func (s *Server) Run() error {
case <-ticker.C:
continue
}
//<-ticker.C
<-ticker.C
}
}()