mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-05-26 07:08:11 +00:00
chore(vp8channel): update default fps to 60 and batch size to 64
This commit is contained in:
@@ -50,8 +50,8 @@ engine:
|
||||
token: ""
|
||||
|
||||
vp8:
|
||||
fps: 25
|
||||
batch_size: 1
|
||||
fps: 60
|
||||
batch_size: 64
|
||||
|
||||
sei:
|
||||
fps: 20
|
||||
|
||||
@@ -206,8 +206,8 @@ Hardware acceleration (none/nvenc) [default: none]:
|
||||
### Параметры транспорта (только для vp8channel)
|
||||
|
||||
```
|
||||
VP8 FPS [default: 25]: 60
|
||||
VP8 batch size (frames per tick) [default: 1]: 64
|
||||
VP8 FPS [default: 60]: 60
|
||||
VP8 batch size (frames per tick) [default: 64]: 64
|
||||
```
|
||||
|
||||
Введи `60` и `64` - это оптимальные значения.
|
||||
|
||||
@@ -51,8 +51,8 @@ engine:
|
||||
|
||||
# vp8channel tuning (only when net.transport == vp8channel)
|
||||
vp8:
|
||||
fps: 25
|
||||
batch_size: 1
|
||||
fps: 60
|
||||
batch_size: 64
|
||||
|
||||
# seichannel tuning (only when net.transport == seichannel)
|
||||
sei:
|
||||
|
||||
@@ -167,8 +167,8 @@ gen:
|
||||
|
||||
| YAML поле | Описание | По умолчанию |
|
||||
|-----------|----------|:------------:|
|
||||
| `vp8.fps` | FPS VP8 потока | `25` |
|
||||
| `vp8.batch_size` | Кадров за тик | `1` |
|
||||
| `vp8.fps` | FPS VP8 потока | `60` |
|
||||
| `vp8.batch_size` | Кадров за тик | `64` |
|
||||
|
||||
---
|
||||
|
||||
|
||||
2
go.sum
2
go.sum
@@ -235,8 +235,6 @@ github.com/xtaci/smux v1.5.57/go.mod h1:IGQ9QYrBphmb/4aTnLEcJby0TNr3NV+OslIOMrX8
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/zarazaex69/gr v0.0.0-20260430043628-45b595f4fef0 h1:dMjHX/YPV3ZD/KJKFjQdlMBwj2/rZIuOVKOvGv26m9k=
|
||||
github.com/zarazaex69/gr v0.0.0-20260430043628-45b595f4fef0/go.mod h1:7vALI2tjaLTOGiDKV7V2JkVU9bA1YADBDQA6uvpp1ac=
|
||||
github.com/zarazaex69/j v0.0.0-20260518184342-a2f5f0758dc5 h1:Hz9RxS2fwLdSeeacX9jVCCs13uRqqBIzn+gmrxyhUbI=
|
||||
github.com/zarazaex69/j v0.0.0-20260518184342-a2f5f0758dc5/go.mod h1:7/ypJTenOIPx23fpo5uF7l4u+rxZqg9cFbTL/N77Ktc=
|
||||
github.com/zarazaex69/j v0.0.0-20260518222913-cb593e3bc582 h1:5ZvS/7kBTqTMKMjMO3S/4neE4YHRoYKbQdx/4y8Kobc=
|
||||
github.com/zarazaex69/j v0.0.0-20260518222913-cb593e3bc582/go.mod h1:7/ypJTenOIPx23fpo5uF7l4u+rxZqg9cFbTL/N77Ktc=
|
||||
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
|
||||
|
||||
@@ -45,8 +45,8 @@ const (
|
||||
defaultVideoBitrate = "2M"
|
||||
defaultVideoHW = "none"
|
||||
defaultVideoQRRecovery = "low"
|
||||
defaultVP8FPS = 25
|
||||
defaultVP8BatchSize = 1
|
||||
defaultVP8FPS = 60
|
||||
defaultVP8BatchSize = 64
|
||||
defaultSEIFPS = 60
|
||||
defaultSEIBatchSize = 64
|
||||
defaultSEIFragmentSize = 900
|
||||
|
||||
@@ -22,7 +22,7 @@ func TestApplyTransportDefaults(t *testing.T) {
|
||||
{
|
||||
name: "vp8",
|
||||
in: Config{Transport: transportVP8},
|
||||
want: Config{Transport: transportVP8, VP8: VP8Config{FPS: 25, BatchSize: 1}},
|
||||
want: Config{Transport: transportVP8, VP8: VP8Config{FPS: 60, BatchSize: 64}},
|
||||
},
|
||||
{
|
||||
name: "sei",
|
||||
|
||||
@@ -643,7 +643,7 @@ func validSessionConfig(mode, carrierName, transportName string) session.Config
|
||||
Width: 1080, Height: 1080, FPS: 30, Bitrate: "1M",
|
||||
HW: videoHWNone, Codec: "tile", TileModule: 4, TileRS: 20,
|
||||
},
|
||||
VP8: session.VP8Config{FPS: 60, BatchSize: 8},
|
||||
VP8: session.VP8Config{FPS: 60, BatchSize: 64},
|
||||
SEI: session.SEIConfig{FPS: 30, BatchSize: 4, FragmentSize: 512, AckTimeoutMS: 1500},
|
||||
}
|
||||
}
|
||||
@@ -668,7 +668,7 @@ func e2eTransportOptions(transportName string) transport.Options {
|
||||
TileRS: 20,
|
||||
}
|
||||
case "vp8channel":
|
||||
return vp8channel.Options{FPS: 60, BatchSize: 8}
|
||||
return vp8channel.Options{FPS: 60, BatchSize: 64}
|
||||
case "seichannel":
|
||||
return seichannel.Options{FPS: 30, BatchSize: 4, FragmentSize: 512, AckTimeoutMS: 1500}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@ import (
|
||||
"github.com/openlibrecommunity/olcrtc/internal/transport"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultFPS = 60
|
||||
defaultBatchSize = 64
|
||||
)
|
||||
|
||||
// Options tunes the vp8channel transport. Zero values fall back to documented defaults.
|
||||
type Options struct {
|
||||
FPS int
|
||||
|
||||
@@ -156,10 +156,10 @@ func New(ctx context.Context, cfg transport.Config) (transport.Transport, error)
|
||||
fps := opts.FPS
|
||||
batchSize := opts.BatchSize
|
||||
if fps <= 0 {
|
||||
fps = 25
|
||||
fps = defaultFPS
|
||||
}
|
||||
if batchSize <= 0 {
|
||||
batchSize = 1
|
||||
batchSize = defaultBatchSize
|
||||
}
|
||||
|
||||
tr := &streamTransport{
|
||||
|
||||
Reference in New Issue
Block a user