From 3bee3ddbe65f70ae159cbc451495fa2d51adac09 Mon Sep 17 00:00:00 2001 From: zarazaex69 Date: Tue, 19 May 2026 09:08:01 +0300 Subject: [PATCH] chore(vp8channel): update default fps to 60 and batch size to 64 --- docs/client.example.yaml | 4 ++-- docs/fast.md | 4 ++-- docs/server.example.yaml | 4 ++-- docs/settings.md | 4 ++-- go.sum | 2 -- internal/app/session/session.go | 4 ++-- internal/app/session/session_test.go | 2 +- internal/e2e/tunnel_test.go | 4 ++-- internal/transport/vp8channel/options.go | 5 +++++ internal/transport/vp8channel/transport.go | 4 ++-- 10 files changed, 20 insertions(+), 17 deletions(-) diff --git a/docs/client.example.yaml b/docs/client.example.yaml index d678e18..81c4de1 100644 --- a/docs/client.example.yaml +++ b/docs/client.example.yaml @@ -50,8 +50,8 @@ engine: token: "" vp8: - fps: 25 - batch_size: 1 + fps: 60 + batch_size: 64 sei: fps: 20 diff --git a/docs/fast.md b/docs/fast.md index 72c8d01..94de631 100644 --- a/docs/fast.md +++ b/docs/fast.md @@ -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` - это оптимальные значения. diff --git a/docs/server.example.yaml b/docs/server.example.yaml index 607fec1..edd5fcb 100644 --- a/docs/server.example.yaml +++ b/docs/server.example.yaml @@ -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: diff --git a/docs/settings.md b/docs/settings.md index 1b590d6..2e564af 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -167,8 +167,8 @@ gen: | YAML поле | Описание | По умолчанию | |-----------|----------|:------------:| -| `vp8.fps` | FPS VP8 потока | `25` | -| `vp8.batch_size` | Кадров за тик | `1` | +| `vp8.fps` | FPS VP8 потока | `60` | +| `vp8.batch_size` | Кадров за тик | `64` | --- diff --git a/go.sum b/go.sum index 8accb79..6d03686 100644 --- a/go.sum +++ b/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= diff --git a/internal/app/session/session.go b/internal/app/session/session.go index 84d688d..6610463 100644 --- a/internal/app/session/session.go +++ b/internal/app/session/session.go @@ -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 diff --git a/internal/app/session/session_test.go b/internal/app/session/session_test.go index 7310907..ca6f38d 100644 --- a/internal/app/session/session_test.go +++ b/internal/app/session/session_test.go @@ -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", diff --git a/internal/e2e/tunnel_test.go b/internal/e2e/tunnel_test.go index ee3475e..50340da 100644 --- a/internal/e2e/tunnel_test.go +++ b/internal/e2e/tunnel_test.go @@ -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} } diff --git a/internal/transport/vp8channel/options.go b/internal/transport/vp8channel/options.go index cc4d545..7e12733 100644 --- a/internal/transport/vp8channel/options.go +++ b/internal/transport/vp8channel/options.go @@ -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 diff --git a/internal/transport/vp8channel/transport.go b/internal/transport/vp8channel/transport.go index 80852c9..ed36bed 100644 --- a/internal/transport/vp8channel/transport.go +++ b/internal/transport/vp8channel/transport.go @@ -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{