-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Takes ages to try and download video and then fails #6
Comments
Did two things, a) gave the user all rights which removed the timeout |
Now it downloads 1 video and fails. sigh |
Same issue for me :( |
I'm getting the same 504 Gateway timeout, but the content is actually successfully downloading and the file appears in the output directory. |
After some debugging it appears that the 504 request comes back when the request is deemed too large by the NVR and that it will return a smaller thumbnail sized (640x360) videos as a fallback. Switching to use the hourly option with my 2K camera in a timelapse fetch has allowed me to download the timelapses at full resolution without the 504 error. I then have to stitch them together afterwards. |
Yea since the maintainer isn't answering i consider this abandoned and defunct. |
unifi-protect-bulk-download download https://192.168.0.1 Hurr Durr /Flightrecorder hourly rotating 2024-11-01 2024-11-03
Logging in...
Logged in!
Fetching cameras...
Warning: Unable to parse complete set of camera data - data formats dont match
Found 9 cameras
Camera: E063DA00C494 6707ead000b9af03e4000461 'G3-3'
Camera: E063DAEFCD65 6707e411007e6b03e4000405 'G3-2'
Camera: E063DAEFCD4F 6707e6f500e06b03e4000413 'G3-1'
Camera: E063DAEFCD09 6707f82801d50203e4000436 'G3-4'
Camera: AC8BA90C949A 6707fdbe025d0203e400058c 'G4-3'
Camera: AC8BA90C9497 6707f9ef020d0203e40004c4 'G4-1'
Camera: 74ACB90B1AD1 67248a2c01fffe03e40071d6 'G3 Instant'
Camera: AC8BA90C968D 6707fc7902370203e4000546 'G4-2'
Camera: 74ACB90B1F15 67248978011cfe03e400716e 'Ei1'
Downloading videos...
Downloading video for time frame '2024-11-01 00:00:00 +01:00' to '2024-11-01 00:59:59 +01:00'
Downloading rotating video for camera 'G3-3' (file path: /Flightrecorder/2024-11-01-00-G3-3-rotating.mp4)
Error: Response { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(192.168.0.1)), port: None, path: "/proxy/protect/api/video/export", query: Some("camera=6707ead000b9af03e4000461&channel=0&filename=E063DA00C494.mp4&lens=0&start=1730415600000&end=1730419199000&type=rotating"), fragment: None }, status: 504, headers: {"server": "nginx", "date": "Tue, 05 Nov 2024 18:27:34 GMT", "content-type": "application/json", "content-length": "50", "connection": "keep-alive", "referrer-policy": "no-referrer", "strict-transport-security": "max-age=15552000; includeSubDomains", "x-content-type-options": "nosniff", "x-dns-prefetch-control": "off", "x-frame-options": "SAMEORIGIN", "x-xss-protection": "1; mode=block"} }
Unknown Error - Status Code: 504 Gateway Timeout
Failed to download video.
Error: Response { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(192.168.0.1)), port: None, path: "/proxy/protect/api/video/export", query: Some("camera=6707ead000b9af03e4000461&channel=1&filename=E063DA00C494.mp4&lens=0&start=1730415600000&end=1730419199000&type=rotating"), fragment: None }, status: 504, headers: {"server": "nginx", "date": "Tue, 05 Nov 2024 18:37:34 GMT", "content-type": "application/json", "content-length": "50", "connection": "keep-alive", "referrer-policy": "no-referrer", "strict-transport-security": "max-age=15552000; includeSubDomains", "x-content-type-options": "nosniff", "x-dns-prefetch-control": "off", "x-frame-options": "SAMEORIGIN", "x-xss-protection": "1; mode=block"} }
Unknown Error - Status Code: 504 Gateway Timeout
Failed to download video.
Error: Response { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(192.168.0.1)), port: None, path: "/proxy/protect/api/video/export", query: Some("camera=6707ead000b9af03e4000461&channel=2&filename=E063DA00C494.mp4&lens=0&start=1730415600000&end=1730419199000&type=rotating"), fragment: None }, status: 504, headers: {"server": "nginx", "date": "Tue, 05 Nov 2024 18:47:34 GMT", "content-type": "application/json", "content-length": "50", "connection": "keep-alive", "referrer-policy": "no-referrer", "strict-transport-security": "max-age=15552000; includeSubDomains", "x-content-type-options": "nosniff", "x-dns-prefetch-control": "off", "x-frame-options": "SAMEORIGIN", "x-xss-protection": "1; mode=block"} }
Unknown Error - Status Code: 504 Gateway Timeout
Failed to download video.
Error: Response { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(192.168.0.1)), port: None, path: "/proxy/protect/api/video/export", query: Some("camera=6707ead000b9af03e4000461&channel=3&filename=E063DA00C494.mp4&lens=0&start=1730415600000&end=1730419199000&type=rotating"), fragment: None }, status: 504, headers: {"server": "nginx", "date": "Tue, 05 Nov 2024 18:57:34 GMT", "content-type": "application/json", "content-length": "50", "connection": "keep-alive", "referrer-policy": "no-referrer", "strict-transport-security": "max-age=15552000; includeSubDomains", "x-content-type-options": "nosniff", "x-dns-prefetch-control": "off", "x-frame-options": "SAMEORIGIN", "x-xss-protection": "1; mode=block"} }
Unknown Error - Status Code: 504 Gateway Timeout
Failed to download video.
No video found for time frame '2024-11-01 00:00:00 +01:00' to '2024-11-01 00:59:59 +01:00' for camera 'G3-3'
Downloading rotating video for camera 'G3-2' (file path: /Flightrecorder/2024-11-01-00-G3-2-rotating.mp4)
thread 'main' panicked at /home/housemeista/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unifi_protect-0.5.2/src/api/download_footage.rs:64:63:
Failed to create file: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with
RUST_BACKTRACE=1
environment variable to display a backtraceThe text was updated successfully, but these errors were encountered: