Skip to content

Add encoding subcommand for video compression settings#395

Open
lorek123 wants to merge 1 commit intoQuantumEntangledAndy:masterfrom
lorek123:feature/encoding-settings
Open

Add encoding subcommand for video compression settings#395
lorek123 wants to merge 1 commit intoQuantumEntangledAndy:masterfrom
lorek123:feature/encoding-settings

Conversation

@lorek123
Copy link
Copy Markdown

Summary

  • Adds neolink encoding subcommand to view and modify per-stream video encoding settings via BC protocol messages 56 (GET) and 57 (SET)
  • Gated behind the compress ability (compress_rw / compress_ro)
  • Supports main, sub, and third streams

Usage

# View current settings for all streams
neolink encoding --config=config.toml CameraName get

# Set sub stream to 15fps, 512kbps
neolink encoding --config=config.toml CameraName set \
  --stream sub --fps 15 --bitrate 512

Example output

Encoding settings (channel 0):
  Stream   Resolution          Bitrate      FPS  Type Profile
  ----------------------------------------------------------------
  main      2304x1296    2560 kbps   20 fps  cbr  high
  sub        704x480      384 kbps   10 fps  cbr  high
  third      720x416     1228 kbps   15 fps  cbr  high

Changes

  • crates/core/src/bc/model.rs — MSG_ID_GET_COMPRESSION (56), MSG_ID_SET_COMPRESSION (57)
  • crates/core/src/bc/xml.rs — Compression, StreamCompression, GopSettings structs
  • crates/core/src/bc_protocol/compression.rs — get_compression(), set_compression()
  • src/encoding/ — CLI subcommand (get/set with --stream, --bitrate, --fps, --rate-control, --profile)

Test plan

  • neolink encoding <camera> get reads and prints settings from E1 camera
  • neolink encoding <camera> set --stream sub --fps 15 modifies setting
  • Read-back after set confirms the change took effect

Implements MSG 56 (GET) and MSG 57 (SET) for the Compression XML,
gated behind the "compress" ability. Adds `neolink encoding` CLI
with get/set actions to view and modify per-stream encoding
parameters (bitrate, fps, rate control, encoder profile).

Tested against Reolink E1 camera.
janost added a commit to MutuallyAssuredDeployment/neolink that referenced this pull request Mar 18, 2026
Upstream PR QuantumEntangledAndy#395. Adds 'neolink encoding' subcommand to view and modify
per-stream (main/sub/third) video encoding settings via BC protocol
messages 56 (GET) and 57 (SET). Supports bitrate, fps, rate control
(cbr/vbr), and encoder profile. Gated behind the 'compress' ability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
janost added a commit to MutuallyAssuredDeployment/neolink that referenced this pull request Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant