ITADN

timelapse: wget command fails with URLs containing query strings and times out on RTSP streams

#1053OpenMathildeuh 创建于 2026-02-25
enhancement
M
Mathildeuhcommented
### Is your feature request related to a problem? Please describe The timelapse component builds the wget command without quoting the snapshot URL, causing the shell to interpret the `?` character as a glob wildcard. This breaks any snapshoturl containing query parameters (e.g. go2rtc's `/api/frame.jpeg?src=streamname`). Additionally, the hardcoded 2-second timeout in `scmd.run(timeout=2.)` is too short for RTSP-based cameras, as go2rtc needs more time to decode the stream and generate the JPEG frame, causing the command to be cancelled. ### Describe the solution you'd like 1. Quote the snapshoturl in the wget command: cmd = "wget " + options + '"' + self.config['snapshoturl'] + '"' + " -O " + ... 2. Increase the timeout or make it configurable (e.g. via a `snapshot_timeout` config option). A default of 10 seconds works for RTSP streams. ### Describe alternatives you've considered - URL-encoding the `?` as `%3F` in the config — rejected by go2rtc (returns HTTP 8) - Using curl instead of wget — would also work but requires more changes ### Additional information Tested on go2rtc with a Tapo C202 camera via RTSP. Both fixes applied manually to timelapse.py confirmed working.
1 条评论