name caps and encoder.

This commit is contained in:
Miroslav Šedivý 2022-09-10 23:24:27 +02:00
parent 0488976dd6
commit 6d2ba7b640

View File

@ -104,7 +104,7 @@ func (config *VideoConfig) GetPipeline(screen ScreenSize) (string, error) {
return "", err return "", err
} }
fpsPipeline = fmt.Sprintf("! video/x-raw,framerate=%d/100 ! videoconvert ! queue", int(val*100)) fpsPipeline = fmt.Sprintf("! capsfilter caps=video/x-raw,framerate=%d/100 name=framerate ! videoconvert ! queue", int(val*100))
} }
// get scale pipeline // get scale pipeline
@ -130,11 +130,11 @@ func (config *VideoConfig) GetPipeline(screen ScreenSize) (string, error) {
return "", err return "", err
} }
scalePipeline = fmt.Sprintf("! videoscale ! video/x-raw,width=%d,height=%d ! queue", w, h) scalePipeline = fmt.Sprintf("! videoscale ! capsfilter caps=video/x-raw,width=%d,height=%d name=resolution ! queue", w, h)
} }
// get encoder pipeline // get encoder pipeline
encPipeline := fmt.Sprintf("! %s", config.GstEncoder) encPipeline := fmt.Sprintf("! %s name=encoder", config.GstEncoder)
for key, expr := range config.GstParams { for key, expr := range config.GstParams {
if expr == "" { if expr == "" {
continue continue