mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Undo DASH change
This commit is contained in:
parent
4ef3a7282a
commit
a3623290ff
@ -126,8 +126,8 @@ RUN wget -qO edgetpu_model.tflite https://github.com/google-coral/test_data/raw/
|
|||||||
RUN wget -qO cpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite
|
RUN wget -qO cpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite
|
||||||
COPY labelmap.txt .
|
COPY labelmap.txt .
|
||||||
# Copy OpenVino model
|
# Copy OpenVino model
|
||||||
COPY --from=ov-converter /models/public/ssdlite_mobilenet_v2/FP16 openvino-model
|
#COPY --from=ov-converter /models/public/ssdlite_mobilenet_v2/FP16 openvino-model
|
||||||
RUN wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/dataset_classes/coco_91cl_bkgr.txt -O openvino-model/coco_91cl_bkgr.txt
|
#RUN wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/dataset_classes/coco_91cl_bkgr.txt -O openvino-model/coco_91cl_bkgr.txt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
target: devcontainer
|
target: devcontainer
|
||||||
devices:
|
# devices:
|
||||||
- /dev/bus/usb:/dev/bus/usb
|
# - /dev/bus/usb:/dev/bus/usb
|
||||||
# - /dev/dri:/dev/dri # for intel hwaccel, needs to be updated for your hardware
|
# - /dev/dri:/dev/dri # for intel hwaccel, needs to be updated for your hardware
|
||||||
volumes:
|
volumes:
|
||||||
- .:/workspace/frigate:cached
|
- .:/workspace/frigate:cached
|
||||||
@ -21,7 +21,7 @@ services:
|
|||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- ./config/config.yml:/config/config.yml:ro
|
- ./config/config.yml:/config/config.yml:ro
|
||||||
- ./debug:/media/frigate
|
- ./debug:/media/frigate
|
||||||
- /dev/bus/usb:/dev/bus/usb
|
# - /dev/bus/usb:/dev/bus/usb
|
||||||
mqtt:
|
mqtt:
|
||||||
container_name: mqtt
|
container_name: mqtt
|
||||||
image: eclipse-mosquitto:1.6
|
image: eclipse-mosquitto:1.6
|
||||||
|
|||||||
@ -61,12 +61,12 @@ http {
|
|||||||
vod_mode mapped;
|
vod_mode mapped;
|
||||||
vod_max_mapping_response_size 1m;
|
vod_max_mapping_response_size 1m;
|
||||||
vod_upstream_location /api;
|
vod_upstream_location /api;
|
||||||
|
vod_align_segments_to_key_frames on;
|
||||||
|
vod_manifest_segment_durations_mode accurate;
|
||||||
vod_ignore_edit_list on;
|
vod_ignore_edit_list on;
|
||||||
vod_segment_duration 4000;
|
vod_segment_duration 10000;
|
||||||
vod_align_segments_to_key_frames on;
|
vod_hls_mpegts_align_frames off;
|
||||||
vod_manifest_duration_policy min;
|
vod_hls_mpegts_interleave_frame on;
|
||||||
vod_dash_manifest_format segmenttemplate;
|
|
||||||
vod_dash_profiles urn:mpeg:dash:profile:isoff-live:2011;
|
|
||||||
|
|
||||||
# file handle caching / aio
|
# file handle caching / aio
|
||||||
open_file_cache max=1000 inactive=5m;
|
open_file_cache max=1000 inactive=5m;
|
||||||
@ -84,14 +84,14 @@ http {
|
|||||||
|
|
||||||
# gzip manifests
|
# gzip manifests
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_types application/vnd.apple.mpegurl video/f4m application/dash+xml text/xml;
|
gzip_types application/vnd.apple.mpegurl;
|
||||||
|
|
||||||
location /vod/ {
|
location /vod/ {
|
||||||
aio threads;
|
aio threads;
|
||||||
vod dash;
|
vod hls;
|
||||||
|
|
||||||
secure_token $args;
|
secure_token $args;
|
||||||
secure_token_types application/dash+xml;
|
secure_token_types application/vnd.apple.mpegurl;
|
||||||
|
|
||||||
add_header Access-Control-Allow-Headers '*';
|
add_header Access-Control-Allow-Headers '*';
|
||||||
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range';
|
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range';
|
||||||
@ -101,11 +101,6 @@ http {
|
|||||||
expires off;
|
expires off;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /vod_status {
|
|
||||||
vod_status;
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /stream/ {
|
location /stream/ {
|
||||||
add_header Cache-Control "no-store";
|
add_header Cache-Control "no-store";
|
||||||
expires off;
|
expires off;
|
||||||
|
|||||||
@ -5,6 +5,7 @@ CACHE_DIR = "/tmp/cache"
|
|||||||
YAML_EXT = (".yaml", ".yml")
|
YAML_EXT = (".yaml", ".yml")
|
||||||
PLUS_ENV_VAR = "PLUS_API_KEY"
|
PLUS_ENV_VAR = "PLUS_API_KEY"
|
||||||
PLUS_API_HOST = "https://api.frigate.video"
|
PLUS_API_HOST = "https://api.frigate.video"
|
||||||
|
MAX_SEGMENT_DURATION = 600
|
||||||
|
|
||||||
# Regex Consts
|
# Regex Consts
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ from peewee import SqliteDatabase, operator, fn, DoesNotExist
|
|||||||
from playhouse.shortcuts import model_to_dict
|
from playhouse.shortcuts import model_to_dict
|
||||||
|
|
||||||
from frigate.config import FrigateConfig
|
from frigate.config import FrigateConfig
|
||||||
from frigate.const import CLIPS_DIR, RECORD_DIR
|
from frigate.const import CLIPS_DIR, MAX_SEGMENT_DURATION, RECORD_DIR
|
||||||
from frigate.models import Event, Recordings
|
from frigate.models import Event, Recordings
|
||||||
from frigate.object_processing import TrackedObject
|
from frigate.object_processing import TrackedObject
|
||||||
from frigate.stats import stats_snapshot
|
from frigate.stats import stats_snapshot
|
||||||
@ -1050,13 +1050,19 @@ def vod_ts(camera_name, start_ts, end_ts):
|
|||||||
|
|
||||||
clips = []
|
clips = []
|
||||||
durations = []
|
durations = []
|
||||||
|
max_duration_ms = MAX_SEGMENT_DURATION * 1000
|
||||||
|
|
||||||
recording: Recordings
|
recording: Recordings
|
||||||
for recording in recordings:
|
for recording in recordings:
|
||||||
clip = {"type": "source", "path": recording.path}
|
clip = {"type": "source", "path": recording.path}
|
||||||
duration = int(recording.duration * 1000)
|
duration = int(recording.duration * 1000)
|
||||||
|
|
||||||
if duration > 0:
|
# Determine if we need to end the last clip early
|
||||||
|
if recording.end_time > end_ts:
|
||||||
|
duration -= int((recording.end_time - end_ts) * 1000)
|
||||||
|
|
||||||
|
if 0 < duration < max_duration_ms:
|
||||||
|
clip["keyFrameDurations"] = [duration]
|
||||||
clips.append(clip)
|
clips.append(clip)
|
||||||
durations.append(duration)
|
durations.append(duration)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import multiprocessing as mp
|
|||||||
import os
|
import os
|
||||||
import queue
|
import queue
|
||||||
import random
|
import random
|
||||||
import shutil
|
|
||||||
import string
|
import string
|
||||||
import subprocess as sp
|
import subprocess as sp
|
||||||
import threading
|
import threading
|
||||||
@ -16,7 +15,7 @@ import psutil
|
|||||||
from peewee import JOIN, DoesNotExist
|
from peewee import JOIN, DoesNotExist
|
||||||
|
|
||||||
from frigate.config import RetainModeEnum, FrigateConfig
|
from frigate.config import RetainModeEnum, FrigateConfig
|
||||||
from frigate.const import CACHE_DIR, RECORD_DIR
|
from frigate.const import CACHE_DIR, MAX_SEGMENT_DURATION, RECORD_DIR
|
||||||
from frigate.models import Event, Recordings
|
from frigate.models import Event, Recordings
|
||||||
from frigate.util import area
|
from frigate.util import area
|
||||||
|
|
||||||
@ -173,7 +172,7 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
duration = -1
|
duration = -1
|
||||||
|
|
||||||
# ensure duration is within expected length
|
# ensure duration is within expected length
|
||||||
if 0 < duration < 600:
|
if 0 < duration < MAX_SEGMENT_DURATION:
|
||||||
end_time = start_time + datetime.timedelta(seconds=duration)
|
end_time = start_time + datetime.timedelta(seconds=duration)
|
||||||
self.end_time_cache[cache_path] = (end_time, duration)
|
self.end_time_cache[cache_path] = (end_time, duration)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -561,8 +561,8 @@ export default function Events({ path, ...props }) {
|
|||||||
autoplay: true,
|
autoplay: true,
|
||||||
sources: [
|
sources: [
|
||||||
{
|
{
|
||||||
src: `${apiHost}/vod/event/${event.id}/manifest.mpd`,
|
src: `${apiHost}vod/event/${event.id}/master.m3u8`,
|
||||||
type: 'application/dash+xml',
|
type: 'application/vnd.apple.mpegurl',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -69,11 +69,11 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se
|
|||||||
description: `${camera} recording @ ${h.hour}:00.`,
|
description: `${camera} recording @ ${h.hour}:00.`,
|
||||||
sources: [
|
sources: [
|
||||||
{
|
{
|
||||||
src: `${apiHost}/vod/${year}-${month}/${day}/${h.hour}/${camera}/${timezone.replaceAll(
|
src: `${apiHost}vod/${year}-${month}/${day}/${h.hour}/${camera}/${timezone.replaceAll(
|
||||||
'/',
|
'/',
|
||||||
'_'
|
'_'
|
||||||
)}/manifest.mpd`,
|
)}/master.m3u8`,
|
||||||
type: 'application/dash+xml',
|
type: 'application/vnd.apple.mpegurl',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user