diff --git a/camera/docker-compose.yml b/camera/docker-compose.yml index 0eba09e..434b526 100644 --- a/camera/docker-compose.yml +++ b/camera/docker-compose.yml @@ -7,19 +7,20 @@ services: command: > -i /dev/video0 -vf "vflip,hflip" - -profile:v baseline -pix_fmt yuvj420p -level:v 4.1 -preset ultrafast + -profile:v baseline -pix_fmt yuv420p -level:v 4.1 -preset ultrafast -c:v libx264 -x264-params keyint=20:min-keyint=20 -http_persistent 0 - -g 10 + -g 60 -sc_threshold 0 -f hls -b:v 2000k -s 1920x1080 -r 30 + -an -hls_init_time 0 - -hls_time 1 - -hls_segment_type fmp4 + -hls_time 3 + -hls_segment_type mpegts -hls_list_size 5 -hls_delete_threshold 1 -hls_flags delete_segments @@ -47,3 +48,4 @@ services: - "443:443" volumes: - ./caddy/Caddyfile:/etc/caddy/Caddyfile + \ No newline at end of file diff --git a/camera/nginx/nginx.conf b/camera/nginx/nginx.conf index 70f183b..f737fe8 100644 --- a/camera/nginx/nginx.conf +++ b/camera/nginx/nginx.conf @@ -32,7 +32,7 @@ http { # Valid tokens cache duration is set by backend returning a properly set Cache-Control header # Invalid tokens are shortly cached to protect backend but not flood Nginx cache proxy_cache_valid 401 30s; - # Valid tokens are cached for 5 minutes so we can get the backend to re-validate them from time to time + # Valid tokens are cached for 30 seconds so we can get the backend to re-validate them from time to time proxy_cache_valid 200 30s; #proxy_set_header Host ........; @@ -51,6 +51,7 @@ http { types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; + video/mp4 m4s; text/html html; } }