Skip to content
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

Add API and WebUI to export recordings #6550

Merged
merged 20 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add dir to nginx
  • Loading branch information
NickM-27 committed Jun 7, 2023
commit 9c32404e91b028bbcb37243ba1ce249db428b00c
21 changes: 21 additions & 0 deletions docker/rootfs/usr/local/nginx/conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,27 @@ http {
root /media/frigate;
}

location /exports/ {
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Expose-Headers' 'Content-Length';
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}

types {
video/mp4 mp4;
}

autoindex on;
autoindex_format json;
root /media/frigate;
}

location /ws {
proxy_pass http:https://mqtt_ws/;
proxy_http_version 1.1;
Expand Down
2 changes: 0 additions & 2 deletions frigate/record/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ def run(self) -> None:
p = sp.run(
ffmpeg_cmd,
input="\n".join(playlist_lines)
if len(playlist_lines) > 1
else playlist_lines,
encoding="ascii",
capture_output=True,
)
Expand Down