feat: 1080p60 NVENC selfbot broadcast (8 Mbps default)

Bump the default broadcast to 1080p 60fps at 8 Mbps and route both encode
stages through the GPU (RTX 5050, h264_nvenc) so 60fps stays smooth without
loading the 4-core host.

- selfbot.ts: capture ffmpeg uses h264_nvenc when streamHw is on (falls back
  to software x264 otherwise), and prepareStream now passes Encoders.nvenc()
  so the library's transcode runs on the GPU too. Guard loadLib for Encoders.
- config.ts: VNC_FRAMERATE default 30 -> 60, VNC_BITRATE_KBPS 4000 -> 8000.
- .env.example: document the new 1080p60/8 Mbps defaults and STREAM_HW.

Verified locally: h264_nvenc x11grab holds a steady 60fps with headroom,
Encoders.nvenc() returns valid h264_nvenc settings, and tsc --noEmit passes.
Live Discord voice-channel verification pending a host reboot.
This commit is contained in:
javis-bot
2026-06-10 11:17:44 +09:00
parent 5137fdeaf7
commit ad0caa8142
3 changed files with 23 additions and 8 deletions

View File

@@ -35,8 +35,8 @@ export const config = {
// x11grab source for the VNC display (TigerVNC runs the desktop on :1)
vncDisplay: opt("VNC_DISPLAY", ":1"),
vncResolution: opt("VNC_RESOLUTION", "1920x1080"),
vncFramerate: parseInt(opt("VNC_FRAMERATE", "30"), 10),
vncBitrateKbps: parseInt(opt("VNC_BITRATE_KBPS", "4000"), 10),
vncFramerate: parseInt(opt("VNC_FRAMERATE", "60"), 10),
vncBitrateKbps: parseInt(opt("VNC_BITRATE_KBPS", "8000"), 10),
// selfbot backend (ToS-risk; use a throwaway account token, never your main)
selfbotToken: opt("DISCORD_SELFBOT_TOKEN"),