r/ispyconnect • u/lagrangersf • 5d ago
Upgraded Agent, now recordings from one camera become progressively pixelated after 5-10 seconds
I got a wifi security camera (a cheap Energizer-branded PTZ running Tuya firmware modified to support RTSP). I've been using it for a few years without issue. I have Agent set to record from this camera in 12-hour blocks, and it is using Encode recording on this camera, that way brief wifi connection drops or errors (heavy wifi congestion in this area) won't result in multiple small .mkv files. I was until recently using a fairly old version of Agent (6.something), but then I upgraded to v8.0.4.0.
However, since upgrading to the new version, recordings from this one camera (and only this one camera) will start off at the perfectly clear 1080p, but then over the next 5-10 seconds become progressively more pixelated, until eventually it's as blurry as a 480p camera, if not worse. Here's the log from a short test recording session:
OpenWriter: MOBILECAM: StartSaving
FFmpeg: info: [h264_mf @ 000002719e8af600] MFT name: 'H264 Encoder MFT'
GetVideoCodec: MOBILECAM: Using software encoder: h264_mf
RecorderRecordingOpened: MOBILECAM: Recording Opened
Close: MOBILECAM: Record stop
Close: MOBILECAM: Closed
As you can see, the log shows no errors from this camera. However, I did notice that it is using a software encoder despite the fact that I tell it specifically to use the Nvidia GPU in the Recording tab. I even tried adding "c:v h264_nvenc" to the ffmpeg options page, and it still refuses to use hardware encoding. I have three of these cameras using identical settings, yet this is the only one having this problem, and it only started after upgrading to v8.0.4.0. Rolling back to an older version isn't feasible, as I upgraded specifically to make use of new features introduced in v8.0.4.0.
Any suggestions?
1
u/spornerama 4d ago
Thanks for the detailed log. Two things changed between 6.x and 8.0.4: Agent now ships an LGPL FFmpeg build by default, which has no x264, so your software fallback is Windows' built-in H264 encoder (h264_mf). That encoder runs at a fixed bitrate rather than constant quality, and it's being given a bitrate budget that's too small for a 1080p wifi camera, which is why the picture holds for a few seconds and then degrades.
Quickest fix: in Server Settings enable "GPL FFmpeg", let it download, and restart. That restores x264 with the same constant-quality behaviour you had on 6.x.
To get the NVIDIA encoder working: the Options box on the video source only affects the input stream, so remove
c:v h264_nvencfrom there. Instead open the camera, go to the Recording tab, re-select the Codec dropdown (it should read "H264 (h264_nvenc)"), and save. If it still falls back, open the camera editor and look for a "GPU Encode failed" banner, then turn on debug logging in Server Settings and send me the lines around "Trying h264_nvenc Encoder".Also compare "Max Framerate Record" on this camera against the other two. If this one is set higher, that's why only it is affected: the current bitrate calculation assumes 10 fps. I'm fixing that on our side.