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

5
TODO
View File

@ -12,4 +12,7 @@
1. 虚拟设备应当一直运行,无阻塞 1. 虚拟设备应当一直运行,无阻塞
# 2022-10-10 # 2022-10-10
1. 视频设备延迟过高 1. 视频设备延迟过高
# 2022-10-11
1. 解决视频设备延迟

View File

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

View File

@ -39,7 +39,7 @@ func NewServer(o *Options) (*Server, error) {
options: o, options: o,
audioHeader: make(chan *audio.WavHeader, 1), audioHeader: make(chan *audio.WavHeader, 1),
pcm: make(chan []byte), 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) u, err := url.Parse(o.QmpAddress)
@ -130,7 +130,7 @@ func (s *Server) Run() error {
case <-ticker.C: case <-ticker.C:
continue continue
} }
//<-ticker.C <-ticker.C
} }
}() }()