mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix default pipeline.
This commit is contained in:
parent
1fb5ae43dd
commit
7601af9917
@ -72,7 +72,7 @@ func (Capture) Init(cmd *cobra.Command) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().String("capture.video.pipelines", "", "pipelines config in JSON used for video streaming")
|
cmd.PersistentFlags().String("capture.video.pipelines", "[]", "pipelines config in JSON used for video streaming")
|
||||||
if err := viper.BindPFlag("capture.video.pipelines", cmd.PersistentFlags().Lookup("capture.video.pipelines")); err != nil {
|
if err := viper.BindPFlag("capture.video.pipelines", cmd.PersistentFlags().Lookup("capture.video.pipelines")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -190,12 +190,22 @@ func (s *Capture) Set() {
|
|||||||
s.VideoCodec = codec.VP8()
|
s.VideoCodec = codec.VP8()
|
||||||
s.VideoPipelines = map[string]types.VideoConfig{
|
s.VideoPipelines = map[string]types.VideoConfig{
|
||||||
"main": {
|
"main": {
|
||||||
GstPipeline: "ximagesrc display-name={display} show-pointer=false use-damage=false " +
|
Fps: "25",
|
||||||
"! video/x-raw " +
|
GstEncoder: "vp8enc",
|
||||||
"! videoconvert " +
|
GstParams: map[string]string{
|
||||||
"! queue " +
|
"target-bitrate": "round(3072 * 650)",
|
||||||
"! vp8enc end-usage=cbr cpu-used=4 threads=4 deadline=1 keyframe-max-dist=25 " +
|
"cpu-used": "4",
|
||||||
"! appsink name=appsink",
|
"end-usage": "cbr",
|
||||||
|
"threads": "4",
|
||||||
|
"deadline": "1",
|
||||||
|
"undershoot": "95",
|
||||||
|
"buffer-size": "(3072 * 4)",
|
||||||
|
"buffer-initial-size": "(3072 * 2)",
|
||||||
|
"buffer-optimal-size": "(3072 * 3)",
|
||||||
|
"keyframe-max-dist": "25",
|
||||||
|
"min-quantizer": "4",
|
||||||
|
"max-quantizer": "20",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
s.VideoIDs = []string{"main"}
|
s.VideoIDs = []string{"main"}
|
||||||
|
Loading…
Reference in New Issue
Block a user