mirror of
https://github.com/onyx-and-iris/gobs-cli.git
synced 2026-01-11 00:17:50 +00:00
Compare commits
2 Commits
6eb8a5ffed
...
b0437b1656
| Author | SHA1 | Date | |
|---|---|---|---|
| b0437b1656 | |||
| 30f40aee2e |
@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
# [0.16.0] - 2026-01-26
|
# [0.16.2] - 2026-01-26
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|||||||
25
README.md
25
README.md
@ -749,29 +749,32 @@ gobs-cli settings profile SimpleOutput VBitrate 6000
|
|||||||
```
|
```
|
||||||
|
|
||||||
- stream-service: Get/Set stream service setting.
|
- stream-service: Get/Set stream service setting.
|
||||||
- args: Type
|
|
||||||
- flags:
|
- flags:
|
||||||
- --key: Stream key.
|
- --key: Stream key.
|
||||||
- --server: Stream server URL.
|
- --server: Stream server URL.
|
||||||
|
|
||||||
|
*optional*
|
||||||
|
- args: Type
|
||||||
|
|
||||||
```console
|
```console
|
||||||
gobs-cli settings stream-service
|
gobs-cli settings stream-service
|
||||||
|
|
||||||
gobs-cli settings stream-service rtmp_common --key='live_xyzxyzxyzxyz'
|
gobs-cli settings stream-service --key='live_xyzxyzxyzxyz' rtmp_common
|
||||||
```
|
```
|
||||||
|
|
||||||
- video: Get/Set video setting.
|
- video: Get/Set video setting.
|
||||||
- flags:
|
- flags:
|
||||||
- --show: Show video settings.
|
|
||||||
- --base-width: Base (canvas) width.
|
*optional*
|
||||||
- --base-height: Base (canvas) height.
|
- --base-width: Base (canvas) width.
|
||||||
- --output-width: Output (scaled) width.
|
- --base-height: Base (canvas) height.
|
||||||
- --output-height: Output (scaled) height.
|
- --output-width: Output (scaled) width.
|
||||||
- --fps-num: Frames per second numerator.
|
- --output-height: Output (scaled) height.
|
||||||
- --fps-den: Frames per second denominator.
|
- --fps-num: Frames per second numerator.
|
||||||
|
- --fps-den: Frames per second denominator.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
gobs-cli settings video --show
|
gobs-cli settings video
|
||||||
|
|
||||||
gobs-cli settings video --base-width=1920 --base-height=1080
|
gobs-cli settings video --base-width=1920 --base-height=1080
|
||||||
```
|
```
|
||||||
|
|||||||
22
settings.go
22
settings.go
@ -189,7 +189,7 @@ func (cmd *SettingsProfileCmd) Run(ctx *context) error {
|
|||||||
|
|
||||||
// SettingsStreamServiceCmd gets/ sets stream service settings.
|
// SettingsStreamServiceCmd gets/ sets stream service settings.
|
||||||
type SettingsStreamServiceCmd struct {
|
type SettingsStreamServiceCmd struct {
|
||||||
Type string `arg:"" help:"Stream type (e.g., rtmp_common, rtmp_custom)." required:""`
|
Type string `arg:"" help:"Stream type (e.g., rtmp_common, rtmp_custom)." optional:""`
|
||||||
Key string ` help:"Stream key." flag:""`
|
Key string ` help:"Stream key." flag:""`
|
||||||
Server string ` help:"Stream server URL." flag:""`
|
Server string ` help:"Stream server URL." flag:""`
|
||||||
}
|
}
|
||||||
@ -202,7 +202,7 @@ func (cmd *SettingsStreamServiceCmd) Run(ctx *context) error {
|
|||||||
return fmt.Errorf("failed to get stream service settings: %w", err)
|
return fmt.Errorf("failed to get stream service settings: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if cmd.Key == "" && cmd.Server == "" {
|
if cmd.Type == "" {
|
||||||
t := table.New().Border(lipgloss.RoundedBorder()).
|
t := table.New().Border(lipgloss.RoundedBorder()).
|
||||||
BorderStyle(lipgloss.NewStyle().Foreground(ctx.Style.border)).
|
BorderStyle(lipgloss.NewStyle().Foreground(ctx.Style.border)).
|
||||||
Headers("Stream Service Setting", "Value").
|
Headers("Stream Service Setting", "Value").
|
||||||
@ -219,7 +219,7 @@ func (cmd *SettingsStreamServiceCmd) Run(ctx *context) error {
|
|||||||
return style
|
return style
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Row("Type", cmd.Type)
|
t.Row("Type", resp.StreamServiceType)
|
||||||
t.Row("Key", resp.StreamServiceSettings.Key)
|
t.Row("Key", resp.StreamServiceSettings.Key)
|
||||||
t.Row("Server", resp.StreamServiceSettings.Server)
|
t.Row("Server", resp.StreamServiceSettings.Server)
|
||||||
|
|
||||||
@ -252,13 +252,12 @@ func (cmd *SettingsStreamServiceCmd) Run(ctx *context) error {
|
|||||||
|
|
||||||
// SettingsVideoCmd gets/ sets video settings.
|
// SettingsVideoCmd gets/ sets video settings.
|
||||||
type SettingsVideoCmd struct {
|
type SettingsVideoCmd struct {
|
||||||
Show bool `flag:"" help:"Show video settings."`
|
BaseWidth int `flag:"" help:"Base (canvas) width." min:"8"`
|
||||||
BaseWidth int `flag:"" help:"Base (canvas) width." min:"8"`
|
BaseHeight int `flag:"" help:"Base (canvas) height." min:"8"`
|
||||||
BaseHeight int `flag:"" help:"Base (canvas) height." min:"8"`
|
OutputWidth int `flag:"" help:"Output (scaled) width." min:"8"`
|
||||||
OutputWidth int `flag:"" help:"Output (scaled) width." min:"8"`
|
OutputHeight int `flag:"" help:"Output (scaled) height." min:"8"`
|
||||||
OutputHeight int `flag:"" help:"Output (scaled) height." min:"8"`
|
FPSNum int `flag:"" help:"Frames per second numerator." min:"1"`
|
||||||
FPSNum int `flag:"" help:"Frames per second numerator." min:"1"`
|
FPSDen int `flag:"" help:"Frames per second denominator." min:"1"`
|
||||||
FPSDen int `flag:"" help:"Frames per second denominator." min:"1"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run executes the gets/ set video command.
|
// Run executes the gets/ set video command.
|
||||||
@ -269,7 +268,8 @@ func (cmd *SettingsVideoCmd) Run(ctx *context) error {
|
|||||||
return fmt.Errorf("failed to get video settings: %w", err)
|
return fmt.Errorf("failed to get video settings: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if cmd.Show {
|
if cmd.BaseWidth == 0 && cmd.BaseHeight == 0 && cmd.OutputWidth == 0 &&
|
||||||
|
cmd.OutputHeight == 0 && cmd.FPSNum == 0 && cmd.FPSDen == 0 {
|
||||||
t := table.New().Border(lipgloss.RoundedBorder()).
|
t := table.New().Border(lipgloss.RoundedBorder()).
|
||||||
BorderStyle(lipgloss.NewStyle().Foreground(ctx.Style.border)).
|
BorderStyle(lipgloss.NewStyle().Foreground(ctx.Style.border)).
|
||||||
Headers("Video Setting", "Value").
|
Headers("Video Setting", "Value").
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user